ΜMetanoia
Docs · Architecture

How Metanoia is built

One diagram — each layer maps to a folder you can open.

Layers
src/kit/ — 12-file GTK widget kit (ffi, widget, signal, theme, components/*) — see docs/KIT.md
src/bible_db.zig — core.db + sharded verses/interlinear + lexicon, ATTACH pattern (docs/DB_SHARDING.md)
src/main.zig:403-417 load_chapter_into_study — picks LXXE+GNT vs NKJV+MT by config.ot_source
aikit/ — native TTS/LLM GGML/MLX backends, sidecar pattern (like septcheck lxx_server.py)
mobile/ — Kotlin + Compose, BibleManager.kt mirrors same otTextTradition flag
site/ — this Next.js 16 + Bun + @bytecats/ui-kit static export (output: export)
Why Zig + GTK4
Same reason Fedora is no-build vanilla JS and septcheck is FastAPI: own the hot path. Zig gives C-interop for sqlite3 + GTK without Node, and kit/signal.zig catches DestroyNotify ABI bugs at compile time (docs/SIGNAL_SAFETY.md).