Skip to content
Shashi Gyawali
← All work

Case study 01 / Data Science Institute

Python exams that run in the browser

A self-paced certification platform for accredited data science programs. I was the sole engineer, working directly with the founders and owning the architecture end to end.

STUDENTNEXT.JSJWT SSOJUPYTERHUBPYPYEXAMONE CONTAINER PER STUDENT

Result

1 per studentIsolated Python container
0 installsPython runs in the browser
2 railsStripe and Razorpay
Role

Full-stack lead engineer

Years

2025 – 2026

Stack

Next.js 15, React 19, JupyterHub, Docker, PostgreSQL

Scope

Architecture, platform, exams, payments

The problem

A multiple-choice quiz alone can't certify a data scientist: students also have to write real Python, under proctoring, without installing anything. Doing that for every learner means giving each one a live sandbox, and doing it self-hosted means the bill has to stay predictable while the course content stays easy for non-engineers to edit.

Architecture

  • I built
  • Managed service
  • Self-hosted
  • 01Matches a build point
STUDENTBrowserLEARNER PLATFORMNext.js 15,React 19SIGN-INClerk + custom JWT,RS256 / JWKSJUPYTERHUBSpawns a containerper studentPRACTICEAuto-culledcontainersEXAMDedicated, bookedin throttled slotsEXAM PIPELINENotebook capture,workspace lockWEBHOOKSContent sync,access provisioningPOSTGRESQLSynced coursecontentOCTOPROCTORProctoring scoreCLOUDINARYSubmission archiveSANITYHeadless CMSPAYMENTSStripe and RazorpayACCREDITORCourse records,reviewer edits

The product

Data Science Institute · Certification home
CPDA Certification home in the learner platform: counts of units, practice exams and case studies, resources viewed and completed, a Continue Learning button, and the four parts with their progress

What I built

  1. An in-browser Python environment: JupyterHub integrated into the Next.js platform, with a custom Clerk JWT authenticator (RS256/JWKS) for single sign-on and a per-user isolated Docker container spawned on demand.

  2. A dual-mode container architecture: lightweight auto-culled containers for practice, dedicated higher-resource ones for proctored exams, with bookings throttled to keep self-hosted costs predictable.

  3. The coding-exam pipeline end to end: scheduled slots, OctoProctor proctoring with an admin reviewing every pass, automated notebook capture through the JupyterHub Contents API, submission archival to Cloudinary, and workspace locking after submit.

  4. The learner platform in Next.js 15, React 19 and TypeScript: parts, units and lessons served with TanStack Query, Zustand and Tailwind.

  5. A Sanity headless CMS syncing course content to PostgreSQL over signature-verified webhooks with tag-based cache invalidation, plus dual payment gateways (Stripe globally, Razorpay in India) with webhook-driven access provisioning.

  6. A sync from the CMS to the accreditor's course system: rate-limited and idempotent, it sends only real changes, retries only once a read shows a write didn't land, and merges reviewers' edits three ways.

Next caseSkill Up02 →