I built a visual system design lab where every node is a real Docker container

I’ve been working on an open-source project called Torollo and I’d like some technical feedback on the way I approached it.

The basic idea is that the architecture you draw on the canvas isn’t just a diagram. The backend turns it into actual local Docker resources, and the exercises validate the state that is really running.

For example, in one of the labs you build a three-tier app with a load balancer, two web servers and PostgreSQL. Later, the database is supposed to become inaccessible from the load balancer. If it can still reach port 5432, the validator fails. You change the network/security rule and run the same check again.

The stack

React + TypeScript + React Flow for the canvas

Node.js / Express / TypeScript for the backend

Dockerode to control the local Docker daemon

Socket.IO for the live parts of the UI

xterm.js for terminals inside the browser

Transféré

The harder part wasn’t drawing the topology. It was deciding how much of the diagram should map to something real.

Containers are straightforward, but networking gets more interesting. Subnets are backed by Docker bridge networks, security rules are enforced with iptables, and private-subnet outbound access can go through NAT. The validator then has to inspect the resulting runtime rather than trusting the graph stored by the frontend.

That also created a few constraints I hadn’t really appreciated at the beginning. Rootless Docker, for example, can run the containers but can’t support all of the host networking behavior needed by the more advanced labs, so the CLI now detects that explicitly. First-run image pulls and differences between Docker environments also pushed me to add a torollo doctor command instead of trying to hide those requirements.

I currently have three free labs: a resilient three-tier app, Redis cache-aside, and Redis queue workers. The roadmap format is JSON and the core is MIT licensed.

What I’d particularly like feedback on: does the idea of grading the running state actually make sense as a way to practice system design, or are there parts of that model that you think become misleading compared with real infrastructure?

I’m also interested in feedback on the implementation itself, especially the Docker/networking side.

GitHub: https://github.com/Derssa/Torollo

Demo / three-tier lab: https://torollo.app/r/webdev

https://preview.redd.it/mzl3gh3ni7ph1.png?width=1280&format=png&auto=webp&s=2002b4129cac6e9f112541e235e24985815401e9

submitted by /u/SaltySecretary7146
[link] [留言]