Overview
Zerang is an AI study companion built for Konkur — Iran's national university entrance exam — where students spend a year working through a fixed set of courses under real time pressure. The product's job is to sit inside that year: answer questions grounded in what a teacher actually assigned, turn a loose set of goals into a concrete two-week schedule, and keep nudging a student back onto that schedule without ever pretending to have changed it when it hasn't. I co-founded the product with the Sharif AI Products team and owned the engineering end to end — architecture, web client, and Android delivery — built as a production system rather than an MVP.
Chat scoped to what was actually taught
The chat surface is not a general assistant bolted onto a login page. Teachers create Classes and Sessions, upload PDFs and voice notes into each Session, and students ask questions scoped to that material through a Retrieval- Augmented Generation pipeline against an external RAG service. Voice notes are chunked into five-minute segments and transcribed concurrently rather than as one long blocking call, so a lecture recording becomes queryable text in roughly the time it takes to upload it. There are three separate streaming chat surfaces — course-scoped chat, session chat, and general/exam-review chat — each backed by Server-Sent Events, because course-scoped chat is the majority of real student traffic and treating it as a special case of a generic "chat" endpoint would have made it too easy to add a feature to the wrong one and have it silently miss most users.
A planner that will not lie about its own state
The study planner turns a structured intake — courses, available hours, exam provider's published topic budget — into a strict 14-day grid anchored to the start of the week, generated by an LLM constrained to structured JSON output. On top of that sits a persistent AI counselor the student can talk to in natural language about falling behind or wanting to change the plan. The counselor never writes to the plan directly. When it commits to a change, the backend drafts a proposal — a frozen-past, regenerated-future merge of the plan — and the student has to explicitly apply it before anything changes. That separation exists because a chat model that can silently rewrite persistent state will eventually rewrite it based on a misread message, and the fix has to be structural rather than a prompt asking it to be careful. The counselor is also fed back the outcome of its own last proposal — applied, rejected, expired, or still pending — because without that it happily tells a student it changed a plan they never applied.
Making the habit itself the product
Underneath both features is a shared incentive layer: a per-user chat streak counted on local day boundaries, a "shapool" credit balance that meters AI usage and is topped up through packages, referrals, and streak rewards, and a Zarinpal-compatible payment flow. Package changes follow one deliberate rule — renewing the same tier stacks the remaining time, but switching tiers forfeits it — closing off a cheap-long-plan-funds-a-premium-one loophole rather than leaving it as an edge case to patch later.
Native-like web and Android delivery
The web client is a Next.js PWA designed to feel native on mobile: a custom Service Worker handles installability and cache management, and the UI is built for thumb-first navigation rather than a desktop site squeezed into a phone. The frontend stack matches the rest of what I ship — TanStack Query for server state, Zustand for client state, Zod-validated forms through React Hook Form, and streamed markdown rendering for chat and study content. Alongside it is a Trusted Web Activity Android release with FCM push notifications, a boot-triggered notification scheduler, and three separate in-app billing gateways (Cafe Bazaar, Myket, and a direct release) behind one billing interface, since shipping to Iranian Android app stores means there is no single Play Billing API to rely on.