An agentic handwriting tutor for children that helps them practice and improve basic word writing through intelligent, step-by-step guidance.
Prerequisites: Node 20+, npm
cd server
cp .env.example .env # Add your OPENAI_API_KEY
npm install
npm run dev # http://localhost:3000cd client
npm install
npx expo start --web # http://localhost:8081Create server/.env with:
OPENAI_API_KEY=your-key
PORT=3000
CORS_ORIGIN=http://localhost:8081
See server/README.md for full API documentation and all environment options.
When testing the Expo app on a physical device or emulator, localhost won't work. Use ngrok to expose your server:
# Terminal 1: Start the server
cd server && npm run dev
# Terminal 2: Expose via ngrok
ngrok http 3000Then update BASE_URL in client/App.js:
// For ngrok use https://<id>.ngrok-free.app (no port)
// For LAN use http://<ip>:3000
const BASE_URL = "https://abc123.ngrok-free.app";This is the preferred approach for mobile testing with Expo.
Handwriting flows through a 3-agent pipeline:
Evaluator → Diagnosis Summarizer → Coach Planner
- Evaluator – Grades the handwriting (1-10), identifies weak letters
- Diagnosis Summarizer – Creates one child-friendly goal and fix steps
- Coach Planner – Picks the next word and generates spoken instructions
Results stream to the client via Server-Sent Events. TTS speaks feedback aloud for non-readers.
See server/README.md for detailed agent architecture, data flow, and model configuration.
- Start both server and client
- Tap "Start practice" to connect to the server
- Draw on the canvas, press "Submit" to send the strokes to the server
- Watch: evaluation overlays appear, spoken feedback plays, coach card updates
- Repeat to see mastery progression
See server/README.md for endpoint documentation:
POST /v1/sessions– create sessionGET /v1/sessions/:id/events– SSE streamPOST /v1/sessions/:id/ink– submit strokes
Learn to Write combines stroke rasterization with a 3-agent coaching loop tuned for early writers. Kids see a clean canvas, draw a word, and instantly hear encouragement plus one doable fix. Session-local mastery means no accounts needed—ideal for classroom centers or quick practice at home.
- Dictation mode – Children listen to a word and write it from memory, building spelling skills
- Advanced vocabulary – Expand word banks with sentences, sight words, and phonics patterns
- Drawing evaluation – Evaluate freeform drawings (shapes, objects, scenes) with age-appropriate feedback