← All work

Web platform · Uzbekistan

Campusly

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.

Role
Sole developer
Team
Solo, for a private school
Platform
Web · 4 languages
Links
Website DesignWeb DevelopmentAI Agents & RAG
  • Next.js
  • React
  • NestJS
  • GraphQL
  • Prisma
  • PostgreSQL
  • pgvector
  • Redis
  • AWS
  • Claude
Public school website
440tests: 75 unit + 365 e2e, plus a Playwright smoke test of the live demo
42 msslowest page query on 330 seeded students
22k → 14kpx of public site height on phones after simplifying the layout
The story behind itLSL School teaches programming and engineering from the early grades. Its CEO reached me through people we both knew and asked me to build the platform the school runs on.Read the story

Features

Who uses it

  • Students: weekly lessons, homework upload, timed quizzes, grades, AI tutor
  • Teachers: lesson builder, grading with feedback, gradebook, attendance
  • Parents: each child's grades, attendance and calendar, phone-first
  • School: users, classes, calendar, activity log, website editor

Architecture

  1. 01Browserstudent, teacher, parent, admin
  2. 02Web appNext.js 16 · React 19 · MUI · Apollo · on Vercel
  3. 03APINestJS 11 · GraphQL · Prisma · Docker on AWS EC2
  4. 04DataPostgreSQL 17 + pgvector on RDS · Redis · S3 + CloudFront
  5. 05AIClaude hints, streamed · Bedrock Titan embeddings

Why this stack

GraphQL + NestJS

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

  1. 01Lesson / PDF
  2. 02Chunkssmall pieces
  3. 03EmbeddingsBedrock Titan V2
  4. 04pgvectorstored with course id

Answering, when a student asks

  1. 01Question+ help level 1–4
  2. 02Searchonly courses the student can see
  3. 03Claudeshort hint, never the answer
  4. 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
School website

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.
Next projectSumteoWarns security staff before a crowd becomes a crush. 105 tests.