How Lumi is built

For district technology leads and engineering managers: what runs where, how it was built, and what stands between a commit and production.

Architecture

Lumi runs entirely on Cloudflare. A single Worker renders every page with Astro, close to the visitor, and pages are cached at the edge until an editor publishes a change.

Lumi architectureDraft requestSync into D1VisitorFamilies, studentsand staffDistrict editorAdmin editor,Google sign-inCloudflare edgeGlobal cache,purged on publishCache misses goto the WorkerLumi WorkerAstro SSRPublic pagesAdmin editorAsk assistantD1ContentR2MediaKVSessionsAI SearchAsk retrievalAnthropic APIAI page composerScheduled jobsCron TriggersGoogle CalendarArbiterLiveGoogle Workspace

The diagram in words:

  • Visitors and district editors both reach Lumi through Cloudflare's edge. Public pages are cached there and purged whenever an editor publishes.
  • On a cache miss, the request goes to a single Cloudflare Worker running Astro with server-side rendering. It serves the public site, the admin editor and the Ask assistant.
  • The Worker stores content in D1, media in R2, sessions in KV, and uses AI Search to find the pages Ask cites in its answers.
  • When an editor uses the AI page composer, the Worker sends the request to the Anthropic API.
  • Scheduled jobs pull events from Google Calendar, athletics schedules from ArbiterLive and the staff directory from Google Workspace, and write them into D1.

By the numbers

lines of strict TypeScript
About 61K
automated tests
About 3,200
commits
1,228
commits co-authored by AI
563
planned phases
28
from kickoff to production
8 weeks

Agent-driven development

Lumi was built with agent-driven development in Claude Code. The work was split into 28 planned phases, and every phase went through the same four steps. AI co-authored 563 of the 1,228 commits.

  1. Context

    Gather what the phase touches: the requirements, the existing code, and the decisions already made.

  2. Plan

    Write down the tasks, the files involved and how the result will be checked, before any code changes.

  3. Execute

    Build the planned tasks in Claude Code.

  4. Verify

    Check the result against the plan before the phase is closed.

Every deploy is gated

Continuous integration gates every deploy. Nothing reaches production until it passes:

  • Lint
  • Type-check, with TypeScript in strict mode
  • About 3,200 automated tests

Database migrations apply automatically as part of the deploy.

In production

  • Edge-cached pages, purged on publish
  • Rate limiting and security logging
  • Error monitoring with Sentry, plus analytics
  • Google Workspace sign-in locked to the district domain

The stack

Astro
Server-side rendering for public pages and the admin
Preact
Interactive components
Cloudflare Workers
Runs the whole application at the edge
D1 and Drizzle ORM
Content database and typed queries
R2
Media storage
KV
Sessions
AI Search
Retrieval for Ask
Anthropic API
Claude for the AI page composer
Zod
Schema validation
Tiptap
Rich text editing
Sentry
Error monitoring
Vitest
Automated tests
GitHub Actions
CI and deploys

Talk to the people who built it.

Bring your IT and accessibility questions. We'll walk through the architecture, the tests and how a district's data flows into Lumi.