MinbarLive

MinbarLive

Technical Architecture Presentation

Prezentacija tehničke arhitekture

Authorized presentation access

Pristup prezentaciji za ovlaštene osobe

01 / 01
MinbarLiveMinbarLiveTechnical Architecture · July 2026Tehnička arhitektura · juli 2026.
Architecture, runtime and product systems
Arhitektura, runtime i produktni sistemi

A modular platform for
realtime speech,
Qur'an sync and content.

Modularna platforma za
govor u realnom vremenu,
Quran sync i sadržaj.

Current architecture of the main branch: live delivery, specialized Qur'an tracking, Studio processing, public content distribution and organization operations.

Trenutna arhitektura main grane: live isporuka, specijalizirano praćenje Kur'ana, Studio obrada, javna distribucija sadržaja i organizacijske operacije.

Next.js 15React 19FastAPISocket.IOSupabaseRedisWhisper sidecar
System domains
Sistemske domene

Product modules share infrastructure, but keep separate domain responsibilities.

Produktni moduli dijele infrastrukturu, ali zadržavaju odvojene domenske odgovornosti.

Realtime communication

Realtime komunikacija

HutbaLive
Join Experience
Quran Sync
Podcast live companion

Content processing

Obrada sadržaja

Studio jobs and segments
Translations and subtitle outputs
Summaries and polished articles
Meeting artifacts

Public distribution

Javna distribucija

Public Videos / Library
Backend-rendered SEO pages
Community Hub / white-label
Localized URLs and sharing

Organization operations

Organizacijske operacije

Users and roles
Organizations and profiles
Plans, access and settings
Customer Success signals

Commercial control

Komercijalna kontrola

Usage events
Cost rollups
Billing and reports
Module entitlements

Partner surface

Partnerska površina

Separate partner application area
Reseller and network workflows
Kept distinct from platform admin
Runtime architecture
Runtime arhitektura

Browser capture → backend orchestration → AI providers → realtime audience.

Browser capture → backend orkestracija → AI provideri → realtime publika.

ClientsKlijenti
Admin captureJoin viewerPersonal/GuestStudio editorMeetings
↓ Socket.IO / HTTP / authenticated API
FastAPI + Socket.IO
Stream lifecycleAudio eventsSTT routingTranslation fan-outPersistencePublic routes
↓ pipeline-specific dispatch
Live STTLive STT

Preferred realtime engine selected by language quality, latency and organization policy.

Preferirani realtime engine bira se prema kvaliteti jezika, latenciji i pravilima organizacije.

Quran Whisper sidecar

Async ingest/alignment plus stateless transcription for discovery.

Asinkroni ingest/alignment i stateless transkripcija za discovery.

Batch STTBatch STT

Preferred batch engine selected by source language, translation bundle and processing economics, with fallback.

Preferirani batch engine bira se prema izvornom jeziku, paketu prijevoda i ekonomici obrade, uz fallback.

State and persistenceStanje i persistence
Supabase/PostgreSQLSupabase Auth / app auth layersRedis cache/runtime stateSelected auxiliary/legacy storesFilesystem media/config where applicable
Live pipeline
Live pipeline

Realtime delivery is optimized as a socket-first, resilient pipeline.

Realtime isporuka je optimizirana kao socket-first, otporan pipeline.

1
CaptureHvatanje

Web Audio and selected input

Web Audio i odabrani ulaz

2
Chunk transportTransport chunkova

500 ms send chunks and bounded pending queue

500 ms chunkovi i ograničeni pending queue

3
STT

Engine selected by pipeline policy, language and organization

Engine prema pravilima pipelinea, jeziku i organizaciji

4
TranslatePrijevod

Integrated single-language translation where available + multilingual fan-out

Integrirani prijevod na jedan jezik gdje je dostupan + višejezični fan-out

5
DeliverIsporuka

Socket events, merge logic and polling fallback

Socket događaji, merge logika i polling fallback

Why the 500 ms audio change mattered

Zašto je promjena na 500 ms bila važna

Very small chunks combined with serial acknowledgements made audio throughput RTT-bound. Larger chunks reduced overhead and prevented queue drops that delayed both STT and Qur'an tracking.

Vrlo mali chunkovi uz serijske potvrde činili su audio throughput ovisnim o RTT-u. Veći chunkovi smanjili su overhead i spriječili dropove koji su usporavali STT i Quran tracking.

Progressive text states

Progresivna stanja teksta

The client architecture supports merging transcript and translation updates. Join optimization continues toward earlier interim translation display with visually distinct provisional/final states.

Klijentska arhitektura spaja transcript i translation update. Join optimizacija nastavlja prema ranijem prikazu interim prijevoda s vizualno različitim privremenim i finalnim stanjem.

Quran Mode architecture
Arhitektura Quran Modea

Two independent authorities solve two different tracking problems.

Dva nezavisna autoriteta rješavaju dva različita problema praćenja.

Quran Sync V3

Position inside the current surah

Pozicija unutar trenutne sure

Whisper-first alignmentWhisper-first alignment
Confirmed monotonic progressPotvrđen monoton napredak
Freeze on silenceZamrzavanje tokom tišine
Bounded catch-up behaviorOgraničeni catch-up
Quran text locator

Detect a change to another surah

Detekcija prelaska na drugu suru

Rolling audio-window transcriptionTranskripcija kliznog audio prozora
Uthmani text matchingUsporedba s Uthmani tekstom
IDF, density, sequence and distinctive wordsIDF, gustoća, niz i prepoznatljive riječi
Hard anchors and multi-switch supportHard anchors i više uzastopnih prebacivanja
Browser audioBrowser audio
Whisper sidecar

/v1/audio + /v1/transcribe

V3 progress or locator handoffV3 napredak ili locator handoff
quran_progress / commit

Manual seed remains authoritative. The older ONNX audio-embedding locator is disabled as Competition authority and remains only in legacy/sequential-related paths pending retirement.

Ručni seed ostaje autoritativan. Stariji ONNX audio-embedding locator je isključen kao Competition autoritet i ostaje samo u legacy/sequential putanjama do uklanjanja.

Provider routing
Usmjeravanje providera

Speech processing is pipeline-aware, policy-routed and organization-configurable.

Obrada govora je svjesna pipelinea, policy-routed i podesiva po organizaciji.

PipelineDefaultDefaultRouting rulesPravila usmjeravanja
LivePreferred realtime enginePreferirani realtime engineRealtime-only providers; policy routing selects the best validated engine by language, latency and organization profile.Samo realtime provideri; policy routing bira najbolji validirani engine prema jeziku, latenciji i profilu organizacije.
Studio batchPreferred batch enginePreferirani batch engineBatch-only providers; routing considers source language, included translation outputs, organization policy and runtime fallback.Samo batch provideri; routing uzima u obzir izvorni jezik, uključene prijevode, pravila organizacije i runtime fallback.
MeetingsPreferred batch enginePreferirani batch engineSame batch safety rules, optimized for segmentation, timing and downstream summaries.Ista batch sigurnosna pravila, optimizirano za segmentaciju, timing i naknadne sažetke.
Podcast postprocessPreferred realtime enginePreferirani realtime engineLatency-classified path; batch-only providers are rejected.Putanja klasificirana kao latency-critical; batch-only provideri se odbijaju.
Quran liveSpecialized pathSpecijalizirana putanjaQuran Sync V3 and Whisper sidecar own position tracking; generic provider output is not the sole positioning signal.Quran Sync V3 i Whisper sidecar vode praćenje pozicije; generički provider nije jedini signal.

Policy routing protects the product from placing batch engines on latency-critical paths, while allowing quality, language coverage and commercial efficiency to evolve without redesigning the product.

Policy routing štiti proizvod od postavljanja batch enginea na latency-critical putanje, a istovremeno omogućava promjenu kvalitete, jezičke pokrivenosti i ekonomike bez redizajna proizvoda.

Provider names, negotiated commercial terms and language-specific preference rules are intentionally excluded from this presentation.

Imena providera, ugovoreni komercijalni uvjeti i jezički specifična pravila preferiranja namjerno nisu prikazani u ovoj prezentaciji.

Live Text-to-Speech architecture
Live Text-to-Speech arhitektura

Translated text becomes a shared, language-specific audio stream.

Prevedeni tekst postaje zajednički audio stream po jeziku.

1
Translation updatesPrijevod

Confirmed text enters the audio path

Potvrđeni tekst ulazi u audio putanju

2
Text aggregationAgregacija teksta

Sentence, size and timeout boundaries

Granice rečenice, veličine i vremena

3
TTS provider abstractionTTS apstrakcija

Two configurable synthesis engines

Dva konfigurabilna synthesis enginea

4
Audio sequencingAudio sekvenciranje

Ordered chunks, encoding and continuity

Redoslijed chunkova, encoding i kontinuitet

5
Listener playerPlayer slušatelja

One generated stream serves many listeners

Jedan generirani stream služi mnogim slušateljima

Configuration

Konfiguracija

Provider override by organization/session
Odabir enginea po organizaciji/sesiji
Language allowlist and voice mapping
Lista jezika i voice mapping
Voice speed, model and output-format controls
Kontrola brzine glasa, modela i formata

Playback quality

Kvaliteta reprodukcije

Sentence-aware aggregation reduces choppy speech
Agregacija rečenica smanjuje isprekidan govor
Continuous encoding and ordered sequence metadata
Kontinuirani encoding i metadata redoslijeda
Mobile-oriented chunk coalescing and gap handling
Spajanje chunkova i obrada razmaka za mobilne uređaje

Safety and economics

Sigurnost i ekonomika

TTS errors never interrupt live text delivery
TTS greške ne prekidaju live tekst
Idle-session cleanup and concurrency protection
Čišćenje neaktivnih sesija i zaštita konkurentnosti
Monthly soft limits and package-based enablement
Mjesečni soft limiti i uključivanje prema paketu

Provider names, credentials and negotiated commercial terms are intentionally excluded from this presentation.

Imena providera, pristupni podaci i ugovoreni komercijalni uvjeti namjerno nisu prikazani u ovoj prezentaciji.

Join frontend
Join frontend

The public viewer is a realtime state-merging client, not a static transcript page.

Javni prikaz je realtime klijent za spajanje stanja, a ne statična stranica transkripta.

Input event families

Vrste ulaznih događaja

transcript_updatetranslation_updateQuran metadatasession stateHTTP message hydration

The client merges events by message identity, applies language-specific rendering and preserves a polling fallback.

Klijent spaja događaje prema identitetu poruke, primjenjuje jezički prikaz i zadržava polling fallback.

Recent Quran latency fix

Nedavni Quran latency fix

When a translation event carried Qur'an metadata before a transcript row existed, the old client discarded it and waited for polling. The Join client now creates/merges the Qur'an message immediately.

Kada je translation event nosio Quran metadata prije postojanja transcript reda, stari klijent ga je odbacivao i čekao polling. Join sada odmah kreira/spaja Quran poruku.

LTR / RTL

Viewer language controls direction and language UX.

Jezik gledatelja upravlja smjerom i UX-om.

Autoscroll and focus

Autoscroll i fokus

Latest content remains visible while preserving user control.

Najnoviji sadržaj ostaje vidljiv uz kontrolu korisnika.

Deployment safety

Sigurnost deploya

Standalone Next.js deployments must include refreshed static assets to avoid route chunk failures.

Standalone Next.js deploy mora uključiti osvježene static assete kako bi se izbjegli chunk problemi.

Studio

Recorded media becomes structured, editable and publishable content.

Snimljeni medij postaje strukturiran, uređiv i objavljiv sadržaj.

1
IngestUnos

Upload or supported URL import

Upload ili podržani URL import

2
ExtractEkstrakcija

FFmpeg / media validation

3
TranscribeTranskripcija

Provider-routed batch STT

Batch STT kroz provider routing

4
Edit & translateUređivanje i prijevod

Segments, speakers, subtitle translations

Segmenti, govornici i prijevodi titlova

5
OutputOutput

Subtitle files, summary, article, public page

Titlovi, sažetak, članak i javna stranica

YouTube CC

Organization default plus per-job override determines whether existing captions are used.

Organizacijski default i per-job override odlučuju koriste li se postojeći titlovi.

Domain outputs

Domenski outputi

studio_jobs, studio_segments, studio_translations, studio_outputs

Publishing link

Veza s objavom

Article payload and localized outputs feed the Public Videos / Knowledge Library surface.

Article payload i lokalizirani outputi hrane Public Videos / Knowledge Library.

Public content & organization surfaces
Javni sadržaj i organizacijske površine

Public distribution combines frontend discovery with backend SEO rendering.

Javna distribucija spaja frontend discovery s backend SEO renderiranjem.

Public Videos / Knowledge Library

Listing, filters and article-first discoveryListing, filteri i article-first discovery
Overview, full article and transcript viewsOverview, cijeli članak i transkript
Localized slugs, canonical and hreflangLokalizirani slugovi, canonical i hreflang
Backend HTML/SEO route responsibilityBackend odgovornost za HTML/SEO rute

Community Hub / White-label

Logo, colors, welcome message and footerLogo, boje, welcome poruka i footer
Prayer times, announcements and community messagesVaktija, obavijesti i community poruke
Qur'an/adhan elements and recent archiveKur'an/ezan elementi i recent arhiva
Custom domain/subdomain where configuredCustom domena/subdomena gdje je konfigurirana

Important boundary: Studio creates and maintains content; Library and public SEO routes distribute it.

Važna granica: Studio stvara i održava sadržaj; Library i javne SEO rute ga distribuiraju.

Adjacent workflows
Povezani procesi

Shared AI infrastructure, distinct product privacy and output models.

Zajednička AI infrastruktura, odvojeni modeli privatnosti i outputa.

Live
🎧

Podcast Companion

External episode + companion session + live/archived transcript and translation + QR access.

Vanjska epizoda + companion sesija + live/arhivirani transkript i prijevod + QR.

Private
👥

Meetings

Private by default: transcript, summary, key points, actions, suggestions, attendees, sharing, audit and exports.

Privatno po defaultu: transkript, sažetak, ključne tačke, zadaci, sugestije, sudionici, dijeljenje, audit i export.

Personal
📲

Personal / Guest

Self-capture and translation flows using the same core audio, STT, translation and usage infrastructure.

Self-capture i prijevod kroz istu audio, STT, translation i usage infrastrukturu.

Guest provisioning hardening

Jačanje guest provisioninga

Idempotent creation and self-healing reduce orphaned guest organization/mosque records and support repeat entry.

Idempotentno kreiranje i self-heal smanjuju orphaned guest organization/mosque zapise i podržavaju ponovni ulaz.

Why separate domains matter

Zašto su odvojene domene važne

Studio is a public content workflow. Meetings is a private organizational workflow. Podcast is an interactive external-media companion.

Studio je javni content workflow. Meetings je privatni organizacijski workflow. Podcast je interaktivni companion za vanjski medij.

Data, tenancy and access
Podaci, tenancy i pristup

Multi-tenant boundaries are enforced across organization, role and public/private surfaces.

Multi-tenant granice provode se kroz organizacije, uloge i javne/privatne površine.

ActorAkterScopeScopePrimary capabilitiesGlavne mogućnosti
Owner / PlatformCross-platformCijela platformaOrganizations, plans, logs, cost, platform operations and privileged controls.Organizacije, planovi, logovi, troškovi i privilegirane kontrole.
Super AdminManaged organizationsDodijeljene organizacijeMulti-org governance without unrestricted owner-only actions.Multi-org upravljanje bez neograničenih owner akcija.
Organization AdminSingle organizationJedna organizacijaLive sessions, Studio, Podcasts, Meetings, branding and allowed billing views.Live sesije, Studio, Podcasti, Meetings, branding i dozvoljeni billing prikazi.
Public viewerJavni gledateljPublic session/contentJavna sesija/sadržajJoin, public video/library and organization pages without admin privileges.Join, public video/library i organizacijske stranice bez admin prava.
Meeting participantSudionik sastankaExplicit share/permissionEksplicitna dozvolaControlled access to private meeting artifacts and exports.Kontrolirani pristup privatnim meeting artefaktima i exportima.
Organization-scoped queriesRole-gated routesPublic DTO minimizationAudit-sensitive actionsPlan/module entitlements
CRM and communication integrations
CRM i komunikacijske integracije

Product operations connect to controlled CRM and email workflows.

Operacije proizvoda povezane su s kontroliranim CRM i email procesima.

🤝

Zoho Bigin

Production OAuth2 connection, owner-only administration
Produkcijska OAuth2 veza i owner-only administracija
Current direction: MinbarLive → Bigin Contacts
Trenutni smjer: MinbarLive → Bigin Contacts
Approved administrators joined with organization data
Odobreni administratori povezani s podacima organizacije
Email matching with create/update, never destructive delete
Email matching s create/update logikom, bez destruktivnog brisanja
Dry-run preview, guarded live sync and sync audit summary
Dry-run pregled, zaštićeni live sync i sažetak audita
✉️

SendGrid + SMTP fallback

Central transactional email service
Centralni servis za transakcijski email
Registration confirmation and owner notification
Potvrda registracije i obavijest vlasniku
Approval, rejection and onboarding communication
Komunikacija za odobrenje, odbijanje i onboarding
Operational/AutoPilot fallback notifications
Operativne i AutoPilot fallback obavijesti
SendGrid first; configured SMTP path can provide delivery fallback
SendGrid primarno; podešeni SMTP može služiti kao rezervni put

These integrations sit behind platform operations: they reduce manual follow-up without exposing CRM credentials or provider configuration to organization users.

Integracije rade iza Platform Operations sloja: smanjuju ručni follow-up bez izlaganja CRM pristupa ili konfiguracije providera organizacijskim korisnicima.

Cost and billing architecture
Arhitektura troškova i billinga

Usage-driven AI costs are converted into controlled commercial entitlements.

Varijabilni AI troškovi pretvaraju se u kontrolirane komercijalne kvote.

Usage inputs

Ulazi potrošnje

Live STT minutesTranslation outputsStudio media minutesMeeting processingAudience/hosting loadAI assistant calls

Commercial controls

Komercijalne kontrole

Plan entitlementsMinute quotasOverageModule accessLanguage/audience tiersCost reports
Usage eventsUsage eventi
Operational rollupsOperativni rollupi
Billing/session rollupsBilling/session rollupi
Reports and plan decisionsIzvještaji i odluke o planu

The former large costing rollup module was decomposed into a compatibility facade plus core, operational, billing and session responsibilities, protected by regression tests.

Raniji veliki costing rollup modul razdvojen je na kompatibilni facade te core, operational, billing i session odgovornosti, uz regresijske testove.

Reliability, security and observability
Pouzdanost, sigurnost i observability

Operational safety is built around fallbacks, feature flags and explicit diagnostics.

Operativna sigurnost se temelji na fallbackovima, feature flagovima i eksplicitnoj dijagnostici.

Reliability

Pouzdanost

Socket-first + HTTP fallback
Provider compatibility guards and fallback
Provider compatibility guard i fallback
Background processing and retry/backoff paths
Background obrada i retry/backoff putanje
Feature-flag rollback for Quran components
Feature-flag rollback za Quran komponente

Security boundaries

Sigurnosne granice

Role and organization scope
Scope uloge i organizacije
Private-by-default meetings
Meetings privatni po defaultu
Public/admin route separation
Odvajanje public/admin ruta
Consent and legal content surfaces
Consent i legalne površine

Observability

Health endpoints and service status
Correlation/request logging
Quran diagnostic reports and tuning snapshots
Session/capture health UI
Cost and usage reporting
Friday Readiness benchmarks and quality reports

Known work remains: stronger centralized secrets/key rotation, cluster-safe audit storage and deeper live Join timing instrumentation.

Otvoreni rad ostaje na jačem centraliziranom upravljanju tajnama/ključevima, cluster-safe audit storageu i dubljoj Join timing instrumentaciji.

Pre-flight reliability and learning loop
Pre-flight pouzdanost i petlja učenja

Friday Readiness verifies the system before Jumu'ah; Quality Management improves it after the event.

Friday Readiness provjerava sistem prije džume, a Quality Management ga poboljšava nakon događaja.

Friday Readiness

Owner-controlled, opt-in weekly scheduler; default pre-Friday check on Thursday
Owner-controlled, opcionalni sedmični scheduler; zadani test četvrtkom prije džume
Production-like audio fixture streamed through the realtime socket path
Produkcijski sličan audio fixture prolazi kroz realtime socket putanju
Configurable target languages, listener count, duration and optional TTS
Podesivi jezici, broj slušatelja, trajanje i opcionalni TTS
Measures audio transport, STT cadence, translation lag and public-listener delivery
Mjeri audio transport, STT ritam, kašnjenje prijevoda i isporuku javnim slušateljima
PASS / WARNING / FAIL result with in-app owner notification
PASS / WARNING / FAIL rezultat s in-app obavijesti vlasniku

AI Quality Management

AI upravljanje kvalitetom

Completed-session heuristic checks and 0–100 quality score
Heurističke provjere završene sesije i quality score 0–100
Detects garbled transliteration, mixed scripts, repetition, noise and translation passthrough
Otkriva pogrešnu transliteraciju, miješana pisma, ponavljanje, šum i neuspjeli prijevod
AI classifies issues and extracts concrete correction candidates
AI klasificira probleme i izvlači konkretne prijedloge korekcija
Owner can accept, edit or reject each correction
Vlasnik može prihvatiti, urediti ili odbiti svaku korekciju
Accepted terms enter organization keyterms and translation glossary for future sessions
Prihvaćeni termini ulaze u rječnik i translation glossary organizacije za buduće sesije
SessionSesija
Quality reportIzvještaj kvalitete
AI correctionsAI korekcije
Human approvalLjudska potvrda
Better next sessionBolja iduća sesija
Maintainability
Održivost koda

Recent work reduced “god files” and preserved compatibility through facades and tests.

Nedavni rad je smanjio “god files” i sačuvao kompatibilnost kroz facade slojeve i testove.

Frontend decomposition

JoinSessionPage.jsx decomposed and simplified
useActiveSession.js split into capture, realtime, preferences and health concerns
useAudioCapture.js and useStreamRealtime.js extracted
Vitest + Testing Library available for frontend contracts

Backend decomposition

pipeline_persistence.py split behind stable imports
costing/rollups.py converted into a thin facade
Specialized Studio, Meetings, public-video and Quran modules
Regression suites for high-risk Quran and persistence behavior
Smaller

files and clearer responsibilities

datoteke i jasnije odgovornosti

Stable

facade/import contracts

facade/import ugovori

Tested

high-risk behavior before deploy

visokorizično ponašanje prije deploya

Current state and technical roadmap
Trenutno stanje i tehnički roadmap

Production-capable modules with targeted reliability and scaling work remaining.

Produkcijski sposobni moduli uz ciljani preostali rad na pouzdanosti i skaliranju.

CurrentTrenutno
Quran Sync V3 in production path
Competition text-locator authority
Studio batch routing optimized for source language and included translation outputs
Join socket merge + polling fallback
Community, Podcast, Meetings and Personal surfaces
Friday Readiness and AI Quality Management
Zoho Bigin and SendGrid operational integrations
Live TTS with two configurable synthesis engines
P1
Live multi-switch validation and tuning on stable networks
Live multi-switch validacija i tuning na stabilnoj mreži
Same-surah re-anchor and richer locator diagnostics
Same-surah re-anchor i bogatija locator dijagnostika
Sequential migration from ONNX to text locator
Sequential migracija s ONNX-a na text locator
Interim translation UX and client timing instrumentation
Interim translation UX i client timing instrumentacija
P2 / Scale
Retire ONNX Tilawa service after migration
Ukloniti ONNX Tilawa nakon migracije
Centralized router/worker scaling when demand requires it
Centralni router/worker scaling kada potražnja to traži
Cluster-safe audit and stronger secrets management
Cluster-safe audit i jače upravljanje tajnama
Automated benchmark streams and richer production telemetry
Automatizirani benchmark streamovi i bogatija telemetrija

Architecture principle: scale infrastructure with proven demand; do not introduce new paid services without a clear product or reliability case.

Arhitektonski princip: skalirati infrastrukturu s dokazanom potražnjom; ne uvoditi nove plaćene servise bez jasnog produktnog ili reliability razloga.

Open sales deckOtvori sales prezentaciju