Skip to content

NAVIGATION

LAB

EST. MMXXIV — RAJSHAHI / REMOTE

← ALL WORK
CASE STUDY — 06IN DEVELOPMENT · NOT YET LAUNCHED

Bhabishyat

Exam prep for the Bangladesh Civil Service, on data that never pretends to know an answer.

A personal product for BCS candidates: practice, timed mock exams, a question bank, syllabi, progress, job circulars, and an AI tutor. I design and build every layer — interface, API, database, and the content pipeline — and I treat the data as the product.

ROLE
Solo — product design, frontend, API, database, content pipeline
FRONTEND
React 18 · Vite · TanStack Query · React Router · Tailwind CSS
BACKEND
Express · Zod · Helmet · Supabase Postgres + Auth
AI
Groq (gpt-oss-20b) question explanations with atomic quotas
QUALITY
pgTAP · Vitest · Playwright

AT A GLANCE

38

Tables

Schema written as 11 versioned migrations

51

RLS policies

Access enforced by Postgres itself

13

pgTAP suites

Schema, RLS, integrity, quotas, seed invariants

11

E2E specs

Playwright: auth, practice, mock exams, admin, jobs

LOCAL SUPABASE STACK — NOT YET DEPLOYED

01PRODUCT SYSTEMS

Behind the interface

Every layer is mine. The rule that ties them together: the interface asks, the API checks, and the database has the final word.

  1. 01  EXPERIENCE

    • Bhabishyat design system

    One visual language across 18 screens, with a collapsible sidebar on desktop.

  2. 02  FRONTEND

    • React 18 + Vite
    • TanStack Query

    Practice, quiz player, mock exams, question bank, syllabus, progress, jobs, admin.

  3. 03  API

    • Express
    • 11 route modules

    Zod validation, Helmet, typed HTTP errors; roles read from the database on every request.

  4. 04  DATA

    • Supabase Postgres
    • 51 RLS policies

    Schema as migrations; quotas and scoring rules enforced in SQL.

  5. 05  INTEGRATIONS

    • Supabase Auth
    • Groq AI

    Verified access tokens; AI explanations behind a cache, rate limit, and quota.

  6. 06  QUALITY

    • pgTAP
    • Vitest
    • Playwright

    Database, contract, unit, and end-to-end tests; Supabase advisors fail verification on any warning.

ONE REQUEST, END TO END

  1. Student taps “Explain with AI”
  2. React quiz screen
  3. Express verifies the token, reads the role
  4. Postgres consumes one quota atomically
  5. Groq explains the verified answer
  6. Explanation shown — answer unchanged
02WHAT IT DOES

Everything a BCS candidate reaches for

PRACTICE

Topic practice + quiz player

Build a set by subject, topic, subtopic and difficulty; practice has no negative marking because it is not an exam.

MOCK EXAMS

Timed, officially marked

Scored with negative marking, never below zero for an attempt.

CONTENT

Question bank · syllabi · papers

Official BCS structure, sittings, and syllabi; papers linked to the sittings they came from.

PROGRESS

History and results

Attempts and scores over time, per student.

JOBS

Jobs & circulars

Organizations, posts, notices, and documents in one place.

PLANS

Plans & entitlements

Subscription plans and per-user entitlements, ready for payments later.

ADMIN

Content lifecycle

Questions move draft → in review → published or rejected, with archive history.

03TRUST IN THE DATA

An exam app is only as good as its answer key

No official BCS answer keys exist — the commission keeps the MCQ answer sheet confidential. So the system is built to never invent one.

PUBLISHING

Rules the database enforces

  • A previous-exam question publishes only with an answer and a verified appearance
  • AI-generated questions must pass through review first
  • Only published questions can be sent to the AI
PROVENANCE

Every source on record

  • Source registry with URL, checksum, and what each source was used for
  • Import runs staging → validation → commit, rejected rows keep their reason
  • 47th BCS prelim: 177 questions imported for review, 16 rejected with reasons
ACCESS

Authorization never trusts the token

  • Supabase tokens verified server-side; role claims from the client are ignored
  • Role read from profiles on every request, so a demoted admin loses access at once
  • Row-level security as the last line, tested with pgTAP
04HOW IT WAS BUILT

From SQLite to Supabase, one tested phase at a time

It started as an Express + SQLite app. I pinned its behaviour with tests before moving anything, then migrated in phases.

  1. 01

    Baseline tests

    Captured how the existing Express + SQLite app behaved, so the migration could be checked against it.

  2. 02

    Schema as code

    Rebuilt the schema in Postgres as versioned migrations with row-level security and grants.

  3. 03

    Move the data, then the server

    Migrated content from SQLite to Postgres, then cut the API and the client over to Supabase Postgres and Auth.

  4. 04

    Stabilize the admin

    Finished the question lifecycle — review, publish, reject, archive — end to end.

  5. 05

    Grow the content model

    Subtopics, formats, tags, syllabi and sitting metadata; then jobs and circulars; then papers and plans.

  6. 06

    Real content, honestly labelled

    Imported the official BCS structure and syllabi, and the 47th prelim questions as reviewable, unanswered items.

NEXT CASE STUDY

iGarage →

Automotive commerce and service platform

← All work