Back to Work Archive
◈፩
CASE STUDY 01

Ai Mentor Plus

Automated Curriculum & Learning Path Generator

ROLELead Fullstack Architect: Designed database schema, engineered streaming SSE infrastructure, and crafted responsive user interface.
TIMELINE8 Weeks (August – October 2024)
DOMAINAI & Systems
Ai Mentor Plus
፩THE CHALLENGE

The Problem Space

Self-directed learners struggle to build coherent roadmaps across complex technical topics without getting lost in unstructured search results or out-of-order tutorials.

፪SYSTEM ARCHITECTURE

Technologies & Tools

Next.js App RouterReact 19TypeScriptTailwind CSS v4PostgreSQLPrisma ORMNode.js SSEOpenAI

Architectural Highlights

  • End-to-end streaming token pipeline using Server-Sent Events with graceful reconnection
  • Normalized relational schema enforcing milestone dependency trees
  • Zero-CLS loading states with optimistic UI updates and localStorage cache fallback
፫ENGINEERING CHOICES

Key Architectural Decisions

DECISION 01

Server-Sent Events over WebSockets for Stream Delivery

Chose SSE because communication is unidirectional (server to client) during curriculum generation. SSE runs cleanly over HTTP/2, requires no socket server maintenance, and reconnects automatically without custom heartbeat protocols.

DECISION 02

Prisma Schema with Cascade Invalidation for Curriculum Modules

Modelled modules, lessons, and quizzes with foreign-key cascading to guarantee database referential integrity when users regenerate individual sections.

፬OBSTACLES & RESOLUTION

Challenges Faced

Token Chunk Fragmenting in Streaming JSON
HOW IT WAS SOLVED:

Built a lightweight stream chunk reassembly buffer that parses partial JSON tokens safely without crashing mid-stream parsing.

High Concurrency Database Writes on Progress Checkpoints
HOW IT WAS SOLVED:

Implemented debounced optimistic client updates paired with batched upsert transactions on the PostgreSQL backend.

፭VERIFIED OUTCOMES

Results & Deliverables

01.Sub-600ms Time-to-First-Token on syllabus generation requests
02.85% reduction in manual curriculum compilation time reported by beta users
03.100% Lighthouse Accessibility score with full ARIA announcement support for streaming text
NEXT CASE STUDYZembil E-Commerce
Read Next Case Study