Inspiration

Singapore parents spend an average of $800/month on private tuition, yet still lie awake asking the same question: "Are we on track, and is my child okay?" The MOE PSLE syllabus spans years of content across five subjects — English, Math, Science, Mother Tongue, and Chinese — and translating that into a week-by-week study plan requires expertise most families don't have time to develop.

What made this personal was talking to parents of children with Special Educational Needs. For a parent of a child with ADHD or Autism Spectrum Disorder, the mainstream tutoring and edtech landscape is a dead end. Platforms ignore behavioural profiles entirely. There are no ABA-informed pacing rules, no 48-hour change-notification buffers for ASD children who need schedule predictability, no burnout detection. These children are simply expected to keep up — or fall behind quietly.

The insight that drove SchoolHub: AI can close the gap between a family's anxiety and a confident answer, but only if it speaks to the full child — including their SEN profile, their emotional state, and their developmental stage.


What it does

SchoolHub is an AI-driven adaptive study scheduling PWA for Singapore parents and students aged 6–12 (K2 → Primary 6). It answers "are we on track?" in under 10 seconds.

For parents:

  • Onboards in under 3 minutes — uploads a school calendar (.pdf or .ics), sets weekly study hours, and optionally selects an SEN profile (ADHD / Autism Spectrum / Other SEN)
  • Receives a Claude-generated, MOE-aligned week-by-week study schedule with spaced repetition and exam buffer weeks baked in
  • Sees a Sibling Timeline Dashboard — colour-coded per child, with conflict detection when two children have overlapping high-intensity days
  • Gets a persistent Exam Countdown Widget (green → yellow → red) on every screen, driven by actual assessment dates
  • Receives automated Mental Health Guardrails — rule-based signals (never AI-classified) that surface overload risk, burnout risk, and exam anxiety, each with a parent-overridable suggested action
  • Gets a shareable Weekly Progress Card (1080×1350 px, WhatsApp-native) generated every Sunday at 22:00 SGT

For students:

  • A Today's Goal screen with 3 bites maximum — never an overwhelming to-do list
  • Bite Viewer with 5–10 minute lessons (hard-capped at 5 min for ADHD profiles), adaptive quiz, and mood emoji at the end
  • Streak, XP, and subject badges (Bronze / Silver / Gold) via WebSocket — XP fires within 2 seconds of bite completion
  • Focus Mode for ADHD: one task visible at a time, zero visual clutter

Key constraint respected throughout: Mental health guardrails are entirely rule-based. Claude is never used to classify a child's wellbeing.


How we built it

Monorepo structure (pnpm workspaces): schoolhub/

├── apps/web/ ← React 18 + TypeScript + Tailwind + shadcn/ui (PWA)

├── apps/api/ ← Node.js + Express + TypeScript

├── packages/ai/ ← Claude Sonnet wrappers (5 use cases)

├── packages/types/ ← Shared TypeScript interfaces

├── packages/parsers/ ← .csv / .txt / .xlsx / .ics / .pdf ingestion

└── supabase/migrations/

AI pipeline — five distinct claude-sonnet-4-6 use cases:

  1. Curriculum parsing — Vision API reads MOE syllabus PDFs and outputs structured parsed_topics: JSONB. Target accuracy ≥ 90%. Runs via a parse_queue worker; not user-facing latency.
  2. File upload parsing — Handles non-iCal PDFs (school calendar PDFs, assessment date sheets) and normalises them into structured payloads.
  3. Schedule generation — Takes exam dates + school calendar + weekly study hours + parsed curriculum topics + SEN profile and produces a full schedule_json: JSONB. Runs at onboarding and on every regeneration trigger.
  4. Bite generation — Generates 5–10 minute micro-lessons calibrated to grade band and SEN profile. The ADHD hard cap is enforced at prompt level:

$$\text{duration_cap} = \begin{cases} 5 \text{ min} & \text{if } \texttt{sen_profile} = \text{ADHD} \ \min(5 + 5 \cdot \mathbb{1}[g \geq \text{P1}],\ 10) \text{ min} & \text{otherwise} \end{cases}$$

  1. Adaptive feedback — Calibrates vocabulary, sentence complexity, emoji density, and diagnostic depth to grade band and SEN profile. Powers weak-topic WHY text and session summaries.

All Claude outputs are Zod-validated before writing to the database. Raw model output never reaches the client.

Database (Supabase — Singapore region, PDPA-compliant): 14 tables in the initial migration, including children with sen_profile nullable enum, wellbeing_signals, and uploads — all shipped on day one rather than deferred.

Wellbeing engine is fully rule-based in apps/api/src/services/wellbeingEngine.ts. Five signals with explicit numeric thresholds:

Signal Trigger
Overload risk Study hours > 2× weekly default
Burnout risk Streak drop 3+ consecutive days
Comprehension plateau Same topic failed 3+ bites
Activity imbalance 7+ consecutive study days, no break logged
Exam anxiety Countdown < 14 days + completion rate drops

Notifications: Telegram Bot API (primary) + Twilio SMS (fallback). One consolidated parent message covering all children.

Progress cards: Puppeteer/canvas pipeline generates 1080×1350 px PNG + PDF every Sunday at 22:00 SGT — subjects studied, bites completed, streak, badges, exam countdown, wellbeing status, and a SchoolHub watermark as an organic growth mechanic.


Challenges we ran into

1. Making SEN constraints non-negotiable in the AI layer. The ADHD 5-minute bite cap and the ASD 48-hour schedule-change delay cannot be suggestions — they must be enforced invariants. We had to wire these into the Claude system prompt, into the Zod validation schema, and into the activates_at database column logic independently. Any one layer alone was insufficient.

2. Separating AI judgment from wellbeing decisions. Early drafts used Claude to interpret wellbeing signals. We removed this entirely. Using a language model to classify a child's mental state — even as a "suggestion" — creates liability and trust problems we couldn't accept. The rule-based engine is less "intelligent" but fully auditable, and parents can see exactly why a signal was triggered.

3. Designing for three grade bands with one component library. K2 (age 6) and P6 (age 12) are nearly incompatible from a UX standpoint. K2 requires 56×56 px minimum tap targets, image-first questions, no keyboard input, and TTS auto-play. P6 is text-heavy and PSLE-focused. Building TierCard, TierFeedback, and TierProgress as grade-band variants — with SEN overlays stacked on top — while keeping the design system consistent was the hardest frontend design challenge.

4. File parsing reliability. School calendars in Singapore come as PDFs ranging from clean, structured tables to scanned images with inconsistent formatting. Getting ≥ 90% accurate parse of MOE syllabus PDFs required iterating the Claude vision prompt with explicit field contracts and sum-to-100 weight constraints, plus an inline error correction UX so parents can fix any misparse before it cascades into the schedule.

5. PDPA compliance. Singapore's Personal Data Protection Act required us to pin Supabase to the Singapore region from day one, structure RLS policies on every child-linked table, and never write sensitive student data outside Supabase — including to logs. This informed infrastructure choices early that would have been painful to retrofit.


Accomplishments that we're proud of

  • The SEN framework is real, not a checkbox. ADHD Focus Mode, ASD schedule-delay, Vygotsky ZPD scaffolding for General SEN — each is a distinct, implemented behavioural intervention, not a colour palette swap.
  • The mental health layer is trustworthy by design. Five deterministic, auditable rules replace a black-box model. Every signal shows the parent exactly what triggered it, and every recommendation is overridable in one tap.
  • Sub-3-minute onboarding. A parent can go from landing page to first generated schedule — with a school calendar uploaded, SEN profile selected, and exam dates confirmed — in under 3 minutes.
  • XP fires in < 2 seconds. WebSocket delivery of xp.awarded and badge.unlocked events means students see rewards before they've put the device down — the critical window for habit formation in ages 6–12.
  • A single codebase serves ages 6–12. The grade-band + SEN-overlay architecture means no separate K2 app, no separate PSLE app. Profile switch re-renders the full UI in under 300 ms.

What we learned

AI is most useful at the edges of human capacity, not at the center of human judgment. Parsing a 200-page MOE syllabus PDF into structured topics is a perfect AI task — tedious, structured, and high-volume. Deciding whether a child is struggling emotionally is not. Knowing which problems AI should not touch was as important as knowing where to apply it.

SEN is not a feature, it's a constraint. We initially designed the core product and planned to "add SEN support later." That was wrong. ADHD pacing, ASD predictability, and ZPD scaffolding need to be in the data model from day one — in the children.sen_profile column, in the bite generation prompt, in the activates_at schedule logic. Retrofitting them later would have required a rewrite.

Parents need one question answered, not a dashboard. Our north star — "Are we on track, and is my child okay?" — kept us from scope creep. Every feature was evaluated against that question. Anything that didn't shorten the distance between that anxiety and a confident answer was deferred.

Zod is a contract, not just validation. Using Zod schemas as the boundary between Claude output and the database forced us to be explicit about what the AI is allowed to produce. This caught ambiguity in prompt design early, before it became a data quality problem.

Built With

Share this project:

Updates

Submission history