MinbarLive
A deep-dive into the architecture, AI pipeline, and infrastructure powering live khutbah captions for mosques worldwide.
Detaljan pregled arhitekture, AI pipeline-a i infrastrukture koja pokreće live titlove hutbe za džamije širom svijeta.
A shared web + mobile platform for live sermon captions with real-time AI transcription, multilingual translation, and persistent archive.
Dijeljeni web + mobile platforma za live titlove hutbe s real-time AI transkripcijom, višejezičnim prijevodom i trajnom arhivom.
Browser mic (ScriptProcessorNode), phone upload, or external mixer. Admin selects ingest mode at session start.
Browser mikrofon (ScriptProcessorNode), upload s telefona, ili eksterni mikser. Admin bira mode pri startu sesije.
Audio chunks sent via Socket.IO to backend. Smart buffering + segmentation for smooth subtitle display.
Audio chunk-ovi šalju se putem Socket.IO na backend. Smart buffering + segmentacija za glatki prikaz titlova.
Real-time speech-to-text via Deepgram WebSocket streaming. 20 source languages + auto-detect. Islamic vocabulary keyword boosting for BS/HR/SR.
Real-time speech-to-text putem Deepgram WebSocket streaminga. 20 izvornih jezika + auto-detekcija. Keyword boosting islamskog rječnika za BS/HR/SR.
OpenAI GPT-4 translates only into languages with active listeners. Dynamic per-stream prompts. Tuned for Islamic terminology and subtitle brevity.
OpenAI GPT-4 prevodi samo u jezike aktivnih slušalaca. Dinamički per-stream promptovi. Prilagođeno islamskoj terminologiji i kratkim titlovima.
Translated segments pushed to Supabase. Audience receives via Supabase Realtime subscription + polling fallback.
Prevedeni segmenti guraju se u Supabase. Publika prima putem Supabase Realtime pretplate + polling fallback.
Session ends → transcript generation triggered (background thread, Redis job tracking). Export available per language.
Sesija završi → generacija transkripta pokreće se (background thread, Redis job tracking). Export dostupan po jeziku.
Backend (FastAPI + Python)
Backend (FastAPI + Python)
server.py — app assembly, Socket.IO wiring (1050 lines)sklapanje app-a, Socket.IO wiring (1050 linija)audio_pipeline.py — STT orchestration (513 lines, ↓59%)STT orkestracija (513 linija, ↓59%)transcript_service.py — transcript lifecyclelifecycle transkriptasession_store.py — Redis-backed session storeRedis-backed session storeauth_helpers.py — auth/session/access helpersauth/session/access helperirouters/admin.py — 1026 lines (modularization target)1026 linija (cilj modularizacije)costing/ — 6 billing modules (~1621 lines)6 billing modula (~1621 linija)Frontend (Expo / React Native Web)
Frontend (Expo / React Native Web)
app/admin.tsx — 1053 lines (was 2776, ↓62%)1053 linija (bilo 2776, ↓62%)app/index.tsx — 956 lines (was 1257, ↓24%)956 linija (bilo 1257, ↓24%)app/super-admin.tsx — 1323 lines (billing section extracted)1323 linija (billing sekcija izvučena)lib/adminAuth.ts — admin API client + auth sessionadmin API klijent + auth sesijalib/adminAccess.ts — role-based frontend access logicrole-based frontend access logika21 extracted components — 6 extracted hooks from admin6 izvučenih hookova iz admin-a6-module billing engine: fixed costs, usage events (Deepgram + OpenAI), org allocation (equal/custom), daily breakdowns, monthly reports, markup separation.
6-modularni billing engine: fiksni troškovi, usage eventi (Deepgram + OpenAI), org alokacija (jednaka/custom), dnevni pregledi, mjesečni izvještaji, markup odvajanje.
Phase 1 — Stabilization
Phase 2 — Optimization
Phase 3 — Scaling
Phase 4 — Enterprise
Replace email-based owner truth with explicit is_owner backend field. Clean governance policy.
Zamjena email-based owner truth-a s eksplicitnim is_owner backend poljem.
Organization switcher for scoped super admin. Master/child org UX. Scope badge.
Organization switcher za scoped super admin. Master/child org UX. Scope badge.
ARQ + Redis Streams. Retry + dead-letter handling. Transcript job survives restarts.
ARQ + Redis Streams. Retry + dead-letter handling. Transcript job preživi restart.
Backend SSE/Socket.IO namespace. Remove frontend direct Supabase subscriptions.
Backend SSE/Socket.IO namespace. Ukloniti direktne Supabase pretplate iz frontenda.
Real daily/monthly aggregates. PDF export. Invoice generation. Email dispatch.
Stvarni dnevni/mjesečni agregati. PDF export. Generacija faktura. Email dispatch.
custom_domains + brand_settings model. Tenant resolution by Host header. Host-aware link generation.
custom_domains + brand_settings model. Tenant resolution po Host headeru.
Final sweep: copy, error states, empty states, diacritics (č, ć, ž, š, đ).
Završni sweep: copy, error stanja, prazna stanja, dijakritika.
Router modularization. Deployment health score. Session health reporting.
Modularizacija routera. Deployment health score. Session health izvještavanje.
CTO Assessment: "The product is viable. The architecture is now partially investable." — CTO Audit 2026-03-24
CTO Procjena: "Proizvod je viabilan. Arhitektura je sada djelimično investabilna." — CTO Audit 2026-03-24