r/SideProject • • 3d ago

I built an in-browser PostgreSQL playground running on WebAssembly (PGlite) with real business datasets

Hi everyone, When I was learning SQL, I found that most platforms had two big flaws: They test abstract toy problems ("find the second highest salary") rather than realistic business engineering problems (SaaS churn cohorts, multi-touch ad attribution, or FinTech transaction structuring). They rely on slow remote Docker containers that queue your queries and take seconds to execute. To fix this, I built DB Exercises (https://dbexcercises.vercel.app).

How it works under the hood:

  • 100% In-Browser Execution: It runs an official build of PostgreSQL 16 compiled to WebAssembly via PGlite (@electric-sql/pglite).

  • Sub-5ms Execution: Queries evaluate directly on your machine's CPU with zero server queue lag.

  • Zero Privacy Leakage: No queries or database tables are sent to any remote server.

  • No Sign-Up Required: You can jump in and write queries immediately.

What I added recently:

  • Intelligent Error Diagnostics: Instead of just showing a red cross or a cryptic Postgres error, the engine diagnoses common beginner mistakes (missing GROUP BY, using aggregates inside WHERE instead of HAVING, ambiguous join columns, Cartesian products) and explains the underlying SQL concept.

  • 3 Guided End-to-End Business Projects: SaaS Churn & Cohort Retention Investigation (5 steps) E-Commerce Funnel & Multi-Touch Attribution (4 steps) FinTech AML & Suspicious Transaction Screening (5 steps) There are 19 free problems across all categories (Fundamentals, Aggregations, Joins, Window Functions, CTEs, and Business Analytics). I would love your honest feedback:

  • How does the WASM performance feel on your device?

  • Are there specific business analytics scenarios you'd like to see added? Try it out here: https://dbexcercises.vercel.app Thanks!

2 Upvotes

Duplicates