db-lab·design doc

DB Lablive

MongoDB, PostgreSQL and system design — from first principles to interview depth, in English and Hindi.

spec.yaml
type:
Learning platform · bilingual
context:
Built independently
area:
Frontend · Education
stack:
6 technologies
code:
source
ReactTypeScriptViteTailwind CSSshadcn/uiMarkdown

01Problem

Database knowledge for interviews is scattered and shallow: definitions without the why, and examples that never run on a real database.

02Approach

A static learning app with 36 lessons and 314 interview questions. Every lesson follows one arc — story, why it exists, a real example, pitfalls, interview answers and a 10-second recap — and every example was verified on real MongoDB and PostgreSQL.

03Architecture← the interesting bit

  1. Content as Markdown + JSON, validated at build time by a Vite plugin that fails with the file name
  2. One lazy chunk per lesson per language, so readers download only the lesson they open
  3. Bilingual UI and content: a type-checked Hindi dictionary and a translation checker that guards code and diagrams
  4. No backend: progress lives in localStorage, with export and import as a backup

04From the notebook

lesson → screen — DB Lab36 lessons · 314 Qslesson filesMarkdown + JSONEN + हिंदीbuildVite pluginvalidates every filefails with its namebroken lesson? build stops ✓lazy chunksone per lessonper languageopen 1 lesson,download 1 lessonstatic React appstory → why → example→ pitfalls → recaplocalStorageprogress, export / importa backend DBjust for progress✗ not needed → no server at allevery example run on a realMongoDB / PostgreSQL first ✓EN ⇄ हि

05Trade-offs & hard parts

risk.01Keeping 72 translated files faithful: code, diagrams and structure must stay identical to English.
risk.02A fast first load with hundreds of pages of content — solved with build-time validation and per-lesson chunks.

06Ownership

owner: Everything — the app, all 36 lessons and 314 questions, and both languages.

— Hankish

07Outcome

36 lessons, 314 interview questions, two languages, deployable as a static site.

08Screens

DB Lab lesson page: PostgreSQL isolation levels, with a story, a comparison table and a two-session timeline
DB Lab dashboard with progress and the four tracks
next: /services/voiceforgeVoiceForge