Smith For Christ · berean-dashboard.pages.dev

Berean Dashboard Architecture

One HTML file that is the whole app, one worker at the edge, and four outside services it is a good guest to. Measured against the v46 build on 13 September 2026, the release branch the day it was cut.

v46Words that have moved, and the O·I·A rail
The system map

Where a verse comes from, and where your notes go

Read it top to bottom: the device you hold, the one file that runs on it, the edge that serves it, and the services beyond. Every arrow is labelled with what actually moves along it.

IN YOUR HAND · THE SAME FILE, THREE SHAPES iPhone · Android phone Pocket mode, automatic ≤ 640 px One version on screen · tap a verse for all Read · Lexicon · Notes · Partner · More Safari · Chrome · Home-screen PWA iPad · tablet Full grid, or the emulated phone by choice Study view · A− A+ · Comfort text Voice-in: Safari tab only, not the PWA Safari · Chrome · Home-screen PWA Mac · PC Four columns side by side, Study view, or the emulated phone, by choice (v38) BLB beside it is window management Chrome · Safari · Edge · Firefox Every device, every theme Dark · Light · Auto (follows the device) Works with no signal after the first visit Nothing to install · no account · no key Web Speech API where the browser offers it the same 666 KB file, laid out for the screen it lands on ON THE DEVICE · ONE FILE IS THE WHOLE APP index.html 16,096 lines · no build step · no framework · no bundler Reader grid KJV · NASB · YLT · Hebrew / Greek marks, highlights, variant lens Pocket mode primary + peek · verse sheet word peek · ref picker · the frame (v38) Study layer O · I · A notes · a note on a verse · the study log (v40) legend marks · whole-verse marks (v40) · pictures · sync Lexicon Strong's · BDB · Thayer's every occurrence · add to notes Deeper commentary shelf · six seats · cross references (v39) Guzik by link · Gill by verse Study Partner Coach (default) · Teacher (opt-in) passage-aware · streams · engine badge Search whole Bible · phrase counts your own notes · Strong's Exports .md with pictures · PDF · Word .xmind mind map (ZIP writer inside) Speech · Settings · About Web Speech both ways (demoted) theme · type · "am I up to date?" 71 @testable blocks: pure logic the suites lift out and run · the rest is asserted by reading the shipping file THE STUDENT'S OWN STORE localStorage one key: notes, marks, studies, settings IndexedDB pictures in notes, kept apart from the words Cache Storage the shell + every chapter you have opened sw.js network-first shell, cache-first Scripture store.set() / load fetch → cache → offline If a save ever fails: a banner and one-tap export · persistent storage is requested once real notes exist OUT THERE · FOUR SERVICES, TWO LINKS bolls.life the text on the page · 180+ translations · TR · WLC dictionary: Strong's → BDB / Thayer's sequential · back off on 429 · cap 128 · be a good guest bible.helloao.org the commentary shelf, rendered in John Gill · Matthew Henry · Jamieson-Fausset-Brown api.anthropic.com only ever through the worker — the key never ships Coach: claude-haiku-4-5 · Teacher: claude-sonnet-5 smithforchrist.com Ed's blog for this passage (WP REST, _fields always) the /watch film streams from the same media library Linked, never hosted Enduring Word (Guzik, by letter) · Blue Letter Bible (deep links) get-text · dictionary-definition · every chapter, every word commentary JSON, cached per chapter posts for this chapter a visible, labelled link · never a silent redirect Partner asks · POST /api/chat the answer streams back AT THE EDGE · CLOUDFLARE PAGES, ADVANCED MODE Static bundle · 44 guarded files index.html · sw.js · manifest · icons · robots text-KJV / WEB / YLT.json — the three canons text-WLCC · text-NTGT — Hebrew and Greek letters seq-ot · seq-nt — sequence indexes wordfreq × 3 · eng2strong-KJV · xrefs (v39) none loaded at boot · a static dump beats a live harvest _worker.js · the only server /api/chat system prompt lives here · SSE stream · 503 names the missing key /studies/… · /api/notes (v39) study PDFs to R2 · sealed note vaults to KV — the worker reads neither R2 · studies  ·  KV · NOTES the published study PDFs, unlisted note vaults sealed on the device (v39) Workers AI · fallback seat llama-3.1-8b when no key is set the engine badge says which answered the Anthropic key lives in Pages secrets — the worker carries it, the file never sees it served over HTTPS · sw.js keeps a copy HOW IT SHIPS · MERGE TO MAIN IS THE DEPLOY GitHub · main branches only, PRs get no CI Claude proposes · Paul merges one task, one branch deploy.yml · Verify bundle (27 s) 19-file guard fails closed · inline script parses 117 suites run · no file:/// · APP_VER = sw.js VER a red step stops the deploy; nothing half-ships Deploy (48 s) assemble dist · pages deploy --branch=main Pages replaces the whole site — every time then curl / must answer 200, or the run fails Live · berean-dashboard.pages.dev the About panel compares its baked APP_VER with the live sw.js and offers "Update now" a status code proves serving; only content proves the file
The app is the gold band. Nothing above it is installed; nothing below it holds a student's notes. The worker is the one server, and the four services on the right are the only things the file ever asks another computer for.
the app itself the student's store & offline Scripture text & static data commentary shelf the Study Partner Smith For Christ build & deploy
Where it runs

Same file, laid out for the screen it lands on

There is no phone build and no tablet build. index.html reads the viewport and the pointer and puts on the shape that fits: pocket mode under 640 px, the four-column grid above it, and every switch in Settings on both.

Phone ≤ 640 px · pocket mode

  • One version on screen; the chip switches it with no fetch
  • Tap a verse number → every loaded version of that verse
  • Tap a word → lemma, transliteration, Strong's, one-line gloss
  • Strong's numbers fold to dots; interlinear is a switch
  • Five tabs, Settings under More, a real reference picker
iOS SafariiOS ChromeAndroid ChromeHome-screen PWAVoice-in: Safari tab only, not the PWA

iPad Safari · PWA · grid or pocket

  • Study view: Scripture beside the notes pane — the daily screen
  • Pocket mode by choice: since v38 it draws as an emulated phone, a centred frame
  • A−/A+, Comfort text, five typefaces, Verdana for dyslexia
  • Pictures from the camera roll go into the notes
  • Held upright, the fourth column folds and a chip says which; every control sized for a finger (v39)
  • Undo works across chapter and study switches (⌘Z too)
iPadOS SafariChromeHome-screen PWAChapter read-aloud: verified on hardware, not here

Mac · PC any modern browser

  • Four columns side by side: KJV, NASB, YLT, Hebrew or Greek — or the emulated phone, by choice
  • Study Partner, Deeper shelf, Search, Patterns Lab, ELS Explorer
  • Exports: Markdown with pictures, PDF, Word, .xmind mind map
  • Blue Letter Bible in the next window needs no code at all
  • A verse tap opens the commentary beside the Bible, not over it (v39, your last choice wins)
  • Keyboard: tabs, Esc closes sheets, ⌘Z undo
ChromeSafariEdgeFirefoxArc / Brave
The parts

Every component, by colour

The app · one file

index.html
16,096 lines, 892 KB. Reader, pocket mode, study layer, lexicon, Deeper with cross references, Search, Partner UI, exports, speech, settings, sync, the study log, the peek, verse landing, the camera — live, frozen, from a photo, or on a Mac through an iPhone — and, since v45, the Verse Cockpit at /cockpit: one verse in the middle, the tagged original beneath it, the helps in columns either side, the AI in three groups one gesture away, and the King James words that have quietly changed sense marked in the verse itself. 79 @testable blocks.
manifest.json
Name, icons, standalone display — what makes "Add to Home Screen" an app.
doc pages
about · manual · field guide · why · architecture · Hebrew 101 · Greek 101 · Patterns Lab · ELS Explorer · change log · inductive method · /watch. Folding header on phones.

The student's store & offline

localStorage
One key. Notes, marks, named studies, legend, settings. Safety-critical: every write path is tested against a throwing store. Still the source of truth with sync on.
KV · NOTES (v39)
One sealed blob per passphrase-derived vault id, encrypted on the device with AES-GCM under a key the server never sees. Field-level three-way merge on the device; conflicts keep both sides. No reset. The worker answers 503 naming the binding if it is missing.
IndexedDB
Pictures in notes — kept apart so a big photo can never cost a sentence.
sw.js
Precaches the shell; network-first for the app, cache-first for chapters; a real Response every time, never undefined.

Scripture text & static data

bolls.life
Every translation on the page and the BDB/Thayer dictionary. KJV is the one that counts — it drives search and analytics.
sidecars
ocr/ — Tesseract in WebAssembly and the English model, ~6 MB on the first shutter press, never at boot (v42); text-KJV/WEB/YLT, text-WLCC, text-NTGT, seq-ot/nt, wordfreq ×3, eng2strong-KJV, and since v39 xrefs.json — 344,756 openbible.info cross references, CC BY 4.0. Ship with the app, loaded on demand, never at boot.

The commentary shelf

helloao
Gill, Henry, Jamieson-Fausset-Brown — rendered in, verse-keyed, cached per chapter.
Enduring Word
Guzik is a per-chapter link and nothing else, by written permission; a suite fails the build if that ever changes.
Blue Letter Bible
The shelf for lookups: deep links carry book, chapter, verse and version.

The Study Partner

_worker.js
577 lines. Holds the system prompt and docs/DOCTRINE.md's 27 load-bearing phrases; streams SSE; answers 503 naming the missing setting. Since v39 also /api/notes, a GET and a PUT of a blob it cannot read.
Coach
claude-haiku-4-5 — the default seat, pinned by nine literal values and a prompt hash.
Teacher
claude-sonnet-5, opt-in, five method lenses, never fabricates a living teacher's words. Env-overridable.
Workers AI
llama-3.1-8b fallback when no key is set; the engine badge always says which answered.

Build & deploy

117 suites
Plain Node, no browser. Bonds as well as tests: version-agreement, docs-version-agreement, board-arithmetic, guzik-linked-not-hosted.
deploy.yml
Push to main only. Guard 19 files, parse the inline script, run every suite, check APP_VER = sw VER, deploy, curl for 200.
R2 · /studies/
Weekly study PDFs published behind a token, served as unlisted links.
By the numbers · measured 11 September 2026 against the v44 build
1HTML file is the app
15,630lines in index.html
106test suites, all green
83@testable blocks, repo-wide
43files the deploy guard requires
4outside services · 2 links
0accounts, keys, or installs for a reader
4,701 pxActs 17 on a phone (was 22,327)