Templates
System design templates, drawn by the engine.
Each template is a real diagram produced by the same layout engine the app runs, not a picture of one.
$curl -fsSL https://lucidtrain.com/install.sh | sh
Every diagram below was produced by the layout engine that ships in the app, from a semantic graph rather than hand-placed boxes. Each page lists the components, the design decisions behind them and what those decisions cost.
- URL Shortener System DesignThe canonical read-heavy system: roughly a hundred reads for every write, and a redirect that has to be fast enough that nobody notices it happened.
- Chat Application System DesignLong-lived connections change everything: the hard part is not storing messages, it is knowing which of your servers is holding the socket you need to write to.
- Payment System DesignThe only system on this list where being approximately right is indistinguishable from being wrong, and where the provider, not you, holds the truth.
- RAG Pipeline ArchitectureAlmost every RAG system that disappoints is failing at retrieval, not generation, and the architecture is what decides whether you can tell.
- E-commerce Platform ArchitectureFour services with four completely different consistency requirements, which is the whole reason this is not one application.
- Notification Service DesignThe architecture is straightforward. The reason this needs to be one service is that the rules about when not to send are the hard part, and they have to live somewhere every sender passes through.
- Distributed Rate Limiter DesignEvery design here is a trade between how accurate the limit is and how much latency you are willing to add to every single request to achieve it.
- Observability Stack ArchitectureThe architecture is mostly about cost control. Collecting everything is technically easy and financially ruinous, so the interesting decisions are all about what to throw away.
- Authentication Service DesignStateless tokens make verification free and revocation hard, and that single tradeoff explains most of the components in this diagram.
- Event-Driven Microservices DesignDistributed transactions do not exist here, so every consistency guarantee you want has to be rebuilt out of events, retries and compensation.
- LLM Inference Service DesignGPUs are the budget, so almost every decision here is about keeping them busy without letting the queue destroy tail latency.
- CI/CD Pipeline ArchitectureTwo things decide whether people trust a pipeline: how fast it is, and whether a red build actually means something is broken.
- Ride Sharing System DesignEvery driver streams their position every few seconds whether or not anyone is riding, which makes this one of the few consumer systems where writes dominate reads.
- Video Streaming System DesignAround ninety-nine percent of the bytes never touch your servers, which means most of this design is about preparing files so the CDN can do the work.
- Social Media Feed System DesignFan-out on write is the right answer until someone with ten million followers posts, and the entire design exists to handle that exception.
- Web Crawler System DesignThe engineering problem is not fetching pages quickly. It is fetching them politely, at scale, without visiting the same content a thousand times.
- Search Autocomplete System DesignThis is a latency problem wearing a search problem's clothes: past about a hundred milliseconds users have already typed the next character and your response is worthless.
- File Storage Service DesignThe design goal is to keep file bytes away from your servers entirely, so that what you run is a metadata service that happens to be about files.
- Ticket Booking System DesignA named seat can be sold exactly once, and ten thousand people want it at the same instant. Everything here follows from that.
- Food Delivery System DesignThree sides to coordinate and one deadline that nobody controls: the kitchen. Dispatch quality matters more here than any amount of throughput.
- Multiplayer Game Backend DesignLatency is the product. Every architectural decision here is subordinate to keeping the round trip between a player and the simulation short.
- Multi-Tenant SaaS ArchitectureOne database serving every customer, and exactly one bug standing between that and showing one customer another customer's data.
- Data Warehouse ETL Pipeline DesignLand the raw data first and transform it later, because the transformation you want in six months is not the one you would write today.
- IoT Telemetry Platform DesignAssume every device is offline, on a bad network, running firmware from two years ago, and cannot be recalled. The architecture follows from that.
- API Gateway System DesignOne entry point, so authentication, rate limiting and observability are implemented once instead of in every service.
- Feature Flag Service DesignEvaluation has to be local and instant, because a flag check sits in the hot path of code that would otherwise not make a network call at all.
- Webhook Delivery System DesignYou are making requests to servers you do not control, which are frequently slow, sometimes wrong, and occasionally gone.
- Audit Logging System DesignAn audit log that can be edited is not an audit log, which makes this one of the few systems where the absence of features is the design.
- Vector Search Service DesignThe failure mode here is not an error. It is recall dropping slowly as the index grows, with nothing in your metrics saying so.
- AI Agent Orchestration DesignThe orchestrator owns the loop, and almost every hard problem here is about knowing when to stop.
Elsewhere
- AI System DesignThe diagram can cause the code, not just describe it.
- Harness EngineeringAgent equals model plus harness. The harness is the half you can actually change.
- Coding Engines Lucid Train Can DriveThe binary is already on your machine and already signed in. Nothing is proxied and no credential passes through us.
- Dependency and Agent Supply Chain AuditYour packages are audited by everyone. The programs your agent launches are audited by almost no one.
- Grafana and Observability in a Coding AgentNothing is exported to us. It reads the Grafana you already run, with your credential, on your machine.
- AI Design Mode for Web PagesRunning on the Claude Code or Codex CLI you already have, with your repository open beside it.
- Software Architecture GlossaryWhat each term means, where it came from, and where it stops being useful.
- Guides to Choosing Architecture ToolsNo winner is declared, because the right answer depends on constraints a web page cannot see.
- Alternatives to Popular Diagramming and Agent ToolsEach page sorts the field by the reason you are leaving, because that is what decides the answer.
- MCP and Architecture DiagramsYour agent supplies the structure. A constraint solver decides where everything goes.
- Generate a Diagram from Your CodeEvery source below lists the exact files it reads and the constructs it maps to diagram nodes.
- AI Diagram GeneratorsThe agent emits a semantic graph and ELK computes the layout, so overlapping boxes are structurally impossible.
- Compare Lucid TrainEvery page says what the other tool is better at. If that section were empty the comparison would not be worth reading.
- Convert Code and DiagramsEvery conversion page states what survives the round trip and what does not.
- Use CasesEach page includes who it is not for, which is usually the more useful half.
- Beyond DiagramsDiagrams are the front door. These are the rooms behind it.