Case study · Language learning
LinguaCoach AI
English coaching for Arabic speakers, designed to keep teaching even when no paid AI provider is connected.
A deterministic curriculum
Placement follows the CEFR levels. The catalog is seeded once and courses are derived by grouping activities by level and topic — there is no course table to drift out of sync.
A governed AI runtime
- R1
- Routes between deterministic dev/test providers and OpenAI, Gemini, Ollama or any OpenAI-compatible endpoint.
- R2
- Bounded retry and backoff policies.
- R3
- A monthly budget and per-user daily limits.
- R4
- When a provider call is skipped, the result says so. Progress is never invented.
Work that survives restarts
Structured AI workflows are persisted as queued runs and executed by a bounded in-process worker that holds durable PostgreSQL row leases.
Coaching conversations stream over Server-Sent Events.
Real screens
Captured from a local build of the web app, unedited.


Inside the product
Logged-in screens from a local build running on the project's own demo seed. The names, units and amounts are fictional test data, not production figures.





Architecture
A monorepo: a Next.js and TypeScript web app; a FastAPI, Pydantic and async SQLAlchemy 2 API with Alembic migrations; PostgreSQL in production; a Redis-compatible cache; Docker Compose for local development.
Stack
Next.js · TypeScript · FastAPI · Pydantic · SQLAlchemy 2 · Alembic · PostgreSQL · Redis · Docker Compose · Vitest · Playwright
Source
Private repository

