A tutor photographs a student's schoolwork. The system reads it, matches it against the official curriculum, keeps a canonical record of what that child has mastered, and writes human-readable notes about it. Everything else exists to make that chain reliable.
- docs/architecture.md β how the system works: the narrative, the flows, the one-way facts invariant. Start here.
- docs/production.md β production access, infrastructure, deploy.
- TODO.md β outstanding engineering work.
- deploy/DEPLOYMENT.md β canonical deployment guide.
# Install Node 24.11.1 (managed via mise or nvm)
# mise: mise install node@24.11.1
# nvm: nvm install 24.11.1
# Clone and setup
git clone https://github.com/ofrades/mohshoo.git
cd mohshoo
# Copy environment template
cp .env.example .env
# One-time setup: install deps + migrate
bun install
bun run setup
# Terminal 1: API server
bun run dev:server
# Terminal 2: Vite web client
bun run dev:web
# Terminal 3: Expo native client, when needed
bun run dev:client- API: http://localhost:3333
- Vite web client: http://localhost:8082
- Expo dev server: http://localhost:8081
bun run dev:serverruns the API by itself.
bun run dev:webruns the browser client by itself.
bun run dev:clientruns the Expo native client by itself.If you need to refresh local state, run
bun run dev:resetto re-run the local database setup.Local development runs directly on your machine (Node 24 + Expo) and uses SQLite at
./data/homeschool.sqlite.The
predev,prestart, andpretestscripts underapps/api/package.jsoninvokescripts/ensure-native-binding.shto automatically rebuildbetter-sqlite3whenever the active Node ABI differs from the cached native binding.
Background analysis (file analysis β requirements β prose) runs in a separate worker process:
bun run dev:analysis-workerSee docs/architecture.md for what it does and
docs/production.md for operator controls
(bun run pipeline status|run|interrupt|resume).
Local development now uses the same Google OAuth flow as other environments.
Set up GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, PUBLIC_BASE_URL, and ALLOWED_RETURN_TO_ORIGINS, then sign in with your Google account from the app.
Local development starts from your migrated database and Google sign-in only.
- Create OAuth credentials in Google Cloud Console.
- Add redirect URI:
https://your-domain/api/auth/google/callback - Configure
.env:
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-secret
PUBLIC_BASE_URL=https://your-domain
ALLOWED_RETURN_TO_ORIGINS=http://localhost:8082,http://localhost:3333,http://localhost:8081,https://your-app-domainProduction runs natively on Cloudflare Workers with D1 and R2 and is managed by Alchemy:
bunx alchemy plan --stage prod
bunx alchemy deploy --stage prodCanonical operations guide: docs/production.md.
βββ apps/
β βββ api/ # Effect API server + analysis worker + SQL migrations
β β βββ index.ts
β β βββ db/
β β βββ src/
β βββ web/ # Vite web client
βββ packages/
β βββ api-client/
β βββ contracts/
β βββ rendering/
βββ scripts/ # operator CLI (pipeline), seeds, maintenance runners
βββ docs/ # architecture, pipeline internals, production, pilot e2e
βββ infra/ # Cloudflare Worker, D1, and R2 resources
βββ alchemy.run.ts # production infrastructure stack
- Runtime: Cloudflare Workers + Effect 4 (pinned
4.0.0-rc.111) - Database: Cloudflare D1
- Object storage: Cloudflare R2
- Web client: Vite + React + shadcn-style DOM components (
apps/web) - Auth: Google OAuth with PKCE
- Hosting: Cloudflare Workers
MIT