Skip to content
SATANG.B
All workCase study
CMU Research Administration · freelance

Junior Bootcamp CMU

Chiang Mai University’s training portal for junior researchers: cohorts, modules, QR check-in, timed exams, certificates and live monitors for admins and teachers.

Role
Solo
Stack
Next.js 16 · Prisma 7 · PostgreSQL · SSE
Participant dashboard
Problem
Hundreds of people sit the exam at once; the system can’t fall over mid-exam, and check-in has to be quick.
What I did
Built the whole system, then load-tested production with k6 until it broke, and tuned it before the real day.
Result
600 concurrent exam-takers with 0% errors — and a known breaking point at 800, before the real day.

Results

May → Jul 2026 · built solo
  • Load test, 200 users browsing: 31,635 checks passed (100%), p95 66 ms
  • Full exam simulation: 600 concurrent users with 0% errors (but slow); it broke at 800 — the limit was known before exam day
  • 28 of 28 targeted E2E tests passed

How it works

  1. 01

    QR check-in

    A large projector-ready QR that expires and matches on every device.

  2. 02

    Timed exams

    Scheduled open and close, auto-submit, and pre-test before post-test.

  3. 03

    Live monitoring

    SSE streams progress live to admins and teachers.

What went wrong — and how I fixed it

Real problems from the commit history, not a highlight reel.

  1. 01
    Problem

    A capacity ceiling: 10 DB connections over Tailscale, which also dropped idle ones.

    How I fixed it

    Pool raised to 25 with keepAlive and timeouts, then load-tested again.

  2. 02
    Problem

    A refresh or a second device showed a different check-in QR.

    How I fixed it

    One token per module and action, upserted in the database.

  3. 03
    Problem

    Timed exams had to close on time and block re-entry.

    How I fixed it

    Auto-close force-submits open attempts; questions are shuffled once and the order saved, so a refresh resumes.

  4. 04
    Problem

    The live monitor went stale after a dropped connection.

    How I fixed it

    SSE plus a refetch on reconnect or when the tab becomes visible.

Screens

8 screens · click to enlarge
What I owned
  • The whole system: Next.js, API, database
  • Email OTP and sign-in security
  • Load tests and E2E tests
Stack
  • Next.js 16
  • Prisma 7
  • PostgreSQL
  • SSE
  • Resend
  • react-pdf
  • k6
  • Playwright