Architecture
Project Structure
How the repo is laid out and where to look for what.
The repo is a polyglot monorepo with a React frontend, a Rust workspace backend, a Bun-driven data pipeline, and a Next.js marketing/docs site.
types/ — TypeScript type definitions
lib/ — Context search (Fuse.js), verse renderer (Canvas 2D), themes
Frontend conventions
- Components are organized by domain (
broadcast/,panels/,controls/) rather than by atomic level (atoms/,molecules/), which makes it easier to find the place where the verse-overlay rendering lives or where the queue actually mutates. - Hooks are thin and only own subscription/cleanup logic — the business logic lives in stores.
- Stores are Zustand slices, one per domain. Cross-store coordination happens through small, named helpers rather than global selectors, so a refactor stays local.
Backend conventions
- Each crate has a single owner concept (audio, STT, Bible, detection, broadcast, API). Adding a new sense — say, a transcription engine — means a new module in the existing crate, not a new crate.
- Tauri command handlers live in
rhema-api. Other crates expose pure Rust surfaces and never importtauri::.
Data pipeline conventions
- Idempotent: every script in
data/checks for existing output and skips if it's already done.setup:allis the orchestrator that runs them in order. - Reproducible: model versions and translation sources are pinned
in script constants, not environment variables, so two operators
running
setup:allproduce identical artifacts.