Live demo: sfjc.dev/veridian · Video take: sfjc.dev/veridian?demo=1
Local-first AI math whiteboard — write by hand, analyze mistakes, get Socratic hints. No login, no database.
Repo: sfjchen/veridian-whiteboard · Domain: [2] Application / Product
Bottlenecks: handwritten feedback is slow; tutors/apps often leak full answers; LaTeX editors ≠ paper workflow; LMS bloat slows iteration.
Solution: draw → analyze → red mistake dots → hint-only chat on the same canvas.
"Write math like on paper, get mistake-specific feedback in seconds, without the app doing your homework."
Pipeline (browser → Vercel → OpenRouter Gemini):
- OCR — canvas PNG → LaTeX
- Mistake analysis — JSON tags + severity vs. reference/context
- Coordinates — red dots on the image
- Chat — Socratic tutor with analysis in context
Stack: Next.js 16 (App Router) · Vercel serverless /api/* · OpenRouter · localStorage only · deployed at sfjc.dev/veridian via path proxy
Not custom model training — prompted multimodal LLM (Large Language Model).
4-min video script + diagram: docs/VIDEO_DEMO_RUBRIC.md
| Who | Use |
|---|---|
| Students | Check homework before class; ask "why is this wrong?" without full solutions |
| TAs / tutors | First pass on handwritten drafts in office hours |
| Step-heavy courses | Algebra, calculus, linear algebra |
Impact: faster formative feedback loops; scales routine mistake detection beyond 1:1 tutoring.
- Teacher rubrics and assignment templates
- Stronger handwriting OCR
- Confidence scores + human escalation
- Classroom analytics; on-device analysis for privacy-sensitive schools
- Open ?demo=1 — problem + context pre-filled
- Draw
2x + 5 = 13, then an intentional balance error - Analyze work → dots + LaTeX
- Explain this mistake in chat → Socratic reply (no spoiler answer)
Canvas shortcuts: ← pen · → eraser · Shift+move draw/erase · ⌘Z / ⌘⇧Z / ⌘Y undo/redo
npm install && cp .env.example .env.local # set OPENROUTER_API_KEY npm run dev # http://localhost:3000/veridian
| Script | Purpose |
|---|---|
npm run build / lint / type-check |
CI checks |
npm run test:e2e |
Playwright (local) |
npm run smoke:deploy |
Prod health + API contracts |
npm run test:e2e:deployment |
Playwright vs prod |
Deploy: Vercel project veridian-whiteboard → vercel --prod → npm run smoke:deploy. Details: WORKING.md · REMOTES.md
src/components/whiteboard/ InkCanvas, ChatPanel, MistakeOverlay
src/app/api/ analyze, chat, health
src/lib/server/ai.ts OpenRouter (OCR + analysis + chat)
src/lib/whiteboard/ capture, types, localStorage
2026-06
- README tightened to rubric Q1–Q4; full video script stays in
docs/VIDEO_DEMO_RUBRIC.md. - Canvas shortcuts from original Veridian (←/→ tools, Shift+move, undo/redo).
- Original org UI (DM Sans, green palette, forest backdrop); OpenRouter Gemini on Vercel at sfjc.dev/veridian.
- Refactored from EdTech monorepo to solo Next.js whiteboard (no Supabase/auth in v1).