Skip to main content
URTEXT AI · A 3-MINUTE ARCHITECTURAL TOUR

A Course in Miracles,

alive.

The original 1965 manuscript — answering, in any language, in real time.

Built on Anthropic Claude Sonnet 4.6 — fast enough for a real conversation, capable enough to hold the full Urtext discipline without ever losing the thread.

~1.2 MB single-file PWA · ~2.2 MB lazy locale pack 27 native languages Claude Sonnet 4.6 in the loop 1965 Urtext as source

Why this exists

An AI grounded in a single sacred text.


For over sixty years the 1965 Urtext of A Course in Miracles has lived in archives — pre-edit, pre-publication, the text exactly as it was scribed.

For the first time, every passage can be queried conversationally — in twenty-seven languages, on a phone, with a capable model grounded by the Urtext discipline on every turn.

System architecture · on one page

How it's built.

Three tiers. One sacred source. Twenty-seven languages.

◉  User · phone or desktop
TIER 1 · THE BROWSER
A ~1.2 MB single-file PWA
in your hand
TIER 2 · THE PROXY
Supabase Edge Function
serverless
TIER 3 · THE BRAIN
Anthropic Claude Sonnet 4.6
Claude Sonnet 4.6
By the numbers
~1.2 MB
single-file PWA · English inline · ≈ 330 KB gzipped
~2.2 MB
lazy locale bundle · 26 non-English languages · loaded on demand
~1,050
lines of server code · one Edge Function
Sonnet
Anthropic Claude Sonnet 4.6 in the loop
27
native languages · 13,800 hand-translated strings
81
canonical Urtext glossary terms

TIER 1 · THE BROWSER

A self-contained PWA in your hand.

Hand-written HTML, CSS, and vanilla JavaScript. No framework. No build step. Loads from cache. Installable.

A ~1.2 MB single-file PWA
runs in your browser
UI Layer
Hand-written HTML, CSS, vanilla JS · no framework, no build step.
Logic Layer
~700 KB of JS · translation helpers, depth controller, voice input.
Data Layer
~13,800 native-language strings + 81 glossary entries — English inline, 26 other locales lazy-loaded.
Local Persist.
localStorage — chat history, language, theme, depth preferences. An optional account adds Postgres-backed sync for bookmarks, highlights and notes.

TIER 2 · THE PROXY

One function that holds the only secret.

A Supabase Edge Function — Deno runtime, serverless. The browser never sees the API key.

Supabase Edge Function
Deno · serverless
Attaches the secret
ANTHROPIC_API_KEY lives in environment variables — never in the page.
Forwards to Claude
POST /functions/v1/chat with anon JWT · forwards to the Anthropic Messages API.
Syncs your reading
Optional sign-in (email + password — no verification email, no inbox round-trip). Bookmarks, highlights and notes sync through Supabase Auth with Row-Level Security; conversations never leave your device.
Enforces the gate
Per-IP rate limiting (10/min · 100/hour · 500/day) · spend alert fires at $35/day · $200 daily hard cap · Supabase anon key required · rate-limit counters stored server-side and never exposed to the client.

TIER 3 · THE BRAIN

Anthropic Claude Sonnet 4.6.

Anthropic's Sonnet model — grounded by the Urtext discipline and a fresh system prompt on every turn.

Anthropic Claude Sonnet 4.6
Claude Sonnet 4.6
0
modes, each with its own Urtext system prompt — all four live server-side; depth, length and style travel as notes inside the message
Ask  ·  Advice  ·  Discuss  ·  Laugh
Vocabulary discipline
A curated block of forbidden terms — academic philosophy, ACIM commentary tradition, New Age vocabulary, therapy-speak — guides the model to reach for the Urtext's own register rather than any outside framework. Assembled fresh on every request.
On-demand translation
Quotes are translated into the reader's language at inference, then cached locally.
Citation discipline
Every Ask answer returns prose plus a citation — cross-checked server-side against a curated Urtext passage index using fuzzy text matching. Citations that don't meet the threshold are stripped, never displayed.
Laugh mode personas
Four distinct voices — deadpan, storyteller, cold absurdist, direct — selected at random each turn, so the comedy never sounds scripted. A comedic timing pause of 200–800 ms is inserted before streaming begins.

The source

The 1965 Urtext.

Pre-publication. Pre-edit. The text exactly as it was scribed.


Every answer is cited to its origin — chapter, section, principle.
No paraphrase
Only the manuscript.
81 Glossary Terms
Anchors the canonical vocabulary.
1,046 Manuscript Pages
The complete Urtext, readable in-app. Every answer citable to chapter and section — citations deep-link to their page.
On-the-fly translation
Quotes translate live — cached in localStorage.

The voice

Twenty-seven languages.

None of them an afterthought.

ENESFRPTITDE NLSVDANOFIRU UKPLCSROHUEL TRJAKOZHVITH IDHIBN
0
Hand-translated strings

UI · mode pills · empty states · placeholders · bubble actions · loading messages · citation refs · topic chips · glossary · taglines · tour steps · privacy modal — every visible string in every language. The Scribe answers in your chosen language, with a server-side language lock that prevents drift mid-thread. In Laugh mode, each language also carries a rhythm instruction — Finnish silence, Japanese 間, Madrileño sardonic register — so the comedy lands in the cadence native speakers expect.

The request lifecycle

From a tap to an answer, in six steps.


1
User types or speaks
Voice input uses the browser's SpeechRecognition API in the active language.
2
Front-end assembles
Sends mode flag · pulls chat history from localStorage · prepends the language directive.
3
POST to the Edge Function
Identified with the Supabase anon key. Body carries messages · mode · max_tokens. System prompts never leave the server.
4
Edge assembles and forwards
Selects the correct Urtext system prompt for the mode · attaches ANTHROPIC_API_KEY · appends the language lock · enforces rate limits · streams to Claude.
5
Claude Sonnet 4.6 generates
Returns prose in the user's active language, a verbatim Urtext citation, and a source reference — generated by Claude in a single pass, language and all.
6
Front-end parses & persists
parseResp() splits prose from citation. Renders. Saves the turn to localStorage.

The architectural choice

One file. No framework.

Considered carefully. Chosen with eyes open.

Three modern stacks would be defensible alternatives for a site like this. Each is the right answer for a different app. Here is the matchup against the one you are reading.

React + Next.js
App Router · Server Components · ISR
declined The right answer for an app with auth, accounts, dashboards, frequently-changing CMS content. None of those exist here. We would pay the build pipeline, the hydration tax, and the framework-version-treadmill for none of the benefits the user would notice on an app this focused.
Astro · Islands
declined Astro shines when most of a page is static and a few interactive islands need hydration. Our case is different — the entire page is one interactive surface (the chat). Islands give us nothing the inline JS does not already give, plus a build step.
SvelteKit · code splitting
declined Excellent for an app with five distinct routes. We have one route — the chat. Splitting one route across N chunks would give every visitor more network round-trips, not fewer.
Vanilla, single file
chosen One round-trip on first visit. Fully cached on every visit after. No client-side hydration to wait for — the page is interactive the moment the HTML parses. No node_modules tree to rot. No major-version migration to schedule. Three platform contracts — HTML, JS, CSS — bet on by the entire web.
The cost, named
Lighthouse simulates a $50 Android on rural Slow 4G with 4× CPU throttling and reports mobile Performance: 64. That is a deliberately punitive worst case. On any real device with any real connection, FCP lands under 3 seconds and the page is fully interactive. After the first visit, every open is instant.
What you get for it
A site that will still work in 2040 with zero maintenance. No framework whose major version deprecates the API we built on. No transitive dependency to discover a vulnerability in. No build step to break six months from now. The browser is the runtime; the runtime is forever.
Mastery is knowing when not to add.

The English app shell (~1.2 MB) and the 26-language locale bundle (i18n/non-en.js, ~2.2 MB) are separate files — the locale is fetched and cached only when a non-English language is selected. The principle stands: zero frameworks, zero build steps, zero node_modules. File separation, not architectural complexity.

By deliberate omission

What this stack is not.

No frameworks. No content database. No required account. No tracking. No advertising.

No framework
No React. No Vue. No Svelte. Vanilla JS, hand-written CSS. Build step zero.
No content database
All English UI strings, glossary, taglines, and term titles ship inside the main file. Non-English strings (26 languages) are lazy-loaded from i18n/non-en.js on demand.
No required account
Everything works anonymously from localStorage. Sign in — email + password, no verification email — only if you want bookmarks, highlights and notes to sync across devices.
No tracking
No analytics SDK. No advertising. No cross-session identity. Anonymous, opt-out usage counters stay in your browser; per-IP rate-limit counts are pruned on a rolling schedule. Nothing else is logged about you.

The principle

The internet was built
to harvest your attention.

This was built to return it to you.

— the screen as a doorway, not a destination.

A user, on first opening URTEXT AI

“It’s like having God in your pocket who you can ask anything.”
A Course in Miracles, alive. In twenty-seven languages. In real time.