A learning platform for a private K-12 school: one portal for students, teachers and parents, a public school website the school edits itself, and an AI study tutor that gives hints from the course's own material.
I designed, built and deployed all of it alone, with 440 automated tests.
Four roles see very different data. One typed schema with guards on every operation keeps access rules in one place instead of spread over many REST routes.
PostgreSQL + pgvector
Grades and attendance need real relations and transactions. pgvector keeps the tutor's embeddings in the same database, so search can filter by course access in one query.
AWS + GitHub Actions
Every push to develop runs lint, 75 unit and 365 e2e tests, then deploys through OIDC and SSM. No AWS keys are stored in GitHub.
Deep dive
An AI tutor that teaches, not answers
Students ask about homework. The tutor must help with hints from their own course, never give the final answer, never show material they can't access, and stay within budget.
Indexing, when a teacher uploads material
01Lesson / PDF
02Chunkssmall pieces
03EmbeddingsBedrock Titan V2
04pgvectorstored with course id
Answering, when a student asks
01Question+ help level 1–4
02Searchonly courses the student can see
03Claudeshort hint, never the answer
04Streamword by word
Guard rails
Access-filtered retrieval: the vector search joins on the student's enrolments, so another class's material can never reach the prompt.
Four help levels: from a nudge to a worked step, never the final answer.
Budgets: a daily limit per student and a school-wide budget in Redis keep cost predictable.
Privacy: no student names are sent to the model, and parents never see tutor conversations.
Screens
01 / 04
School website
Student home
AI Study Tutor
Parent overview
Grades & progress
Teacher dashboard
Teacher course builder
Troubleshooting
01
A student could reach another student's data
Problem
With 4 roles and dozens of GraphQL operations, one forgotten check in one resolver would leak grades or questions to the wrong person.
Cause
Access checks written by hand in each resolver are easy to forget, and normal tests only call the API as the "right" user.
Fix
Every operation is denied unless marked public; record ownership is checked in one shared place; e2e tests call every operation as the wrong user.
Result
365 e2e tests, including access-isolation tests for every API operation. A new resolver without a rule fails CI.
02
Uploads that never finished
Problem
Homework and lesson files sent straight to the API were slow, and uploads that stopped half-way left orphan files in storage.
Cause
The server handled file bytes itself and had no record of which uploads were completed.
Fix
Presigned S3 upload with type and size signed in, a confirm step that checks the real file (wrong file = deleted), and an hourly job that removes uploads stuck for 24 h.
Result
Files go straight to S3, wrong types are rejected, and no orphan files stay in storage.
What worked and what I learned
Choices that paid off
Nothing is hard-deleted: records are archived and every change is written to an activity log in the same transaction.
Grades stay hidden from students and parents until the teacher publishes them.
Careful sign-in: short-lived access token in memory, refresh token in an httpOnly cookie that rotates on every use and detects reuse.
A demo that stays true: the demo school is rebuilt every night on the real school calendar.
What I learned
Run exactly what CI runs before every commit; CI failed once on formatting, never again.
Measure before optimising: timing the real page queries showed the database was not the bottleneck.
Security rules belong in one place and need tests that act as the attacker.