Skip to main content
Harmanpreet Singh
All work

Independent project: Simulation and learning tool

SystemForge: a system-design laboratory

An interactive way to learn system design: instead of reading about caching, you flush the cache and watch the database fall over. A simulation engine drives 40 system labs, an architecture canvas, a code playground and scored challenges. It has helped over 10,000 users learn system design.

The SystemForge distributed cache lab: scenarios such as kill a node, controls for cache nodes, virtual nodes and replication, metric tiles for hit ratio and database load, and charts over time.
The distributed-cache lab: change a control or pick a failure and the metrics and charts update. Captured from the running app on my own machine, October 2026.

What it is

System-design material is usually diagrams and advice. SystemForge makes it testable: each topic follows one loop of theory, manipulate, observe metrics, break it, and compare trade-offs.

Everything runs on one deterministic simulator, so the same inputs always give the same numbers. Forty systems, from a URL shortener to a stock exchange, are described as data on top of that engine rather than as forty separate pages.

My part

I designed and built the simulation engine, the 40 system labs, the canvas, the playground and the web app.

Independent project.

Stack

  • Next.js 16
  • React 19
  • TypeScript
  • Vitest
  • Discrete-event simulation
  • Docker Compose

What is inside

A TypeScript workspace: a pure engine with no framework, and a Next.js app on top.

  1. 01

    Simulation engine

    A discrete-event simulator with traffic models, caches, load balancers, consistent hashing, rate limiters, queues and sharding. Heavier pieces are real algorithms: a Raft implementation, collaborative-editing OT and CRDT, an order book, A*, and a max-flow matcher.

  2. 02

    Systems as data

    Each of the 40 systems is a spec (requirements, estimation, reference architecture, failure scenarios) plus a demo with controls, presets and a pure function that returns metrics and charts.

  3. 03

    Challenges

    Each demo has scored challenges that begin failing a goal, with a hint and a documented solution that passes every goal.

  4. 04

    Tools

    An architecture canvas that reads and writes the architecture JSON and runs it under load, a code playground that runs your JavaScript in a sandboxed Web Worker, a capacity calculator and a timed interview mode.

  5. 05

    Mini-systems

    Three Docker Compose systems with real services, Redis, Postgres and nginx: a URL shortener, ticketing under concurrent buyers and a distributed rate limiter.

The SystemForge architecture canvas with a palette of components, a client, API and Postgres wired together, and a checks panel warning that the database is a single point of failure.
The architecture canvas, with live validation. A design can be run under load and scored. Captured from the running app on my own machine, October 2026.
The SystemForge code playground with a list of exercises such as an LRU cache and a token-bucket rate limiter, the task description, and buttons to run tests, show a hint or show the reference solution.
The code playground: eight system-design building blocks with tests. Captured from the running app on my own machine, October 2026.