Why Start with System Design?
The most expensive mistakes in software don't happen in functions — they happen in architecture. Choosing the wrong database, the wrong component structure, or the wrong API pattern creates problems that compound over months, eventually requiring painful rewrites.
Common Beginner Pattern
- Start coding immediately
- No overall plan
- Architecture emerges accidentally
- Discover problems late
Result: technical debt, painful refactors, or full rewrites.
Senior Developer Pattern
- Design architecture first
- Identify risks upfront
- Compare alternatives
- Then implement modularly
Result: solid foundation that evolves cleanly over time.
AI makes the "design first" approach dramatically more accessible. What used to require years of experience — evaluating architectures, comparing trade-offs, identifying risks — can now be explored conversationally in minutes.
AI as Architect
The first and most powerful use of AI in system design is asking it to propose a complete architecture for your project. Give it your requirements and let it design the system before you write any code.
Design a system architecture for a family schedule planner.
Requirements:
- React frontend (TypeScript)
- Node.js / Express backend
- MySQL database
- REST API
- Should support multiple family members
- Needs to scale to ~1000 concurrent users eventually
Show:
1. High-level system diagram (frontend → API → database)
2. React component hierarchy
3. API endpoint structure
4. Database tables and relationships
5. Where state lives (client vs. server)
Don't write implementation code — just the blueprint.
This prompt produces a comprehensive architectural overview in seconds. You get a map of the entire system — its layers, connections, and data flow — that you can evaluate, critique, and refine before investing time in code.
Visualizing Architecture
AI-generated architecture descriptions become much easier to evaluate when visualized. Here's the kind of layered view you should ask for — and what a typical three-tier architecture looks like:
You can ask AI to generate diagrams in various formats — ASCII art (works in any text context), Mermaid syntax (renders as actual diagrams in many tools), or structured lists. The format matters less than having a visual map to reason about.
Always Ask for Alternatives
Never accept the first architecture AI proposes. The most valuable design conversations happen when you compare multiple approaches. This is where AI truly outperforms solo thinking — it can generate and compare alternatives in seconds.
Give me three different architecture approaches for this project.
For each approach:
- Describe the architecture
- List pros and cons
- Identify the main risk
- Rate complexity (simple / moderate / complex)
- Say when you'd choose this approach
Then recommend which one I should use for an MVP,
and which one I should migrate to later if the
project grows.
This prompt forces AI to think comparatively — not just generate one plausible answer, but evaluate trade-offs across multiple options. The "recommend for MVP vs. later" question is especially valuable because it separates what you need now from what you might need eventually, preventing over-engineering.
Pro Tip: The "When Would This Fail?" Question
After AI proposes an architecture, ask: "Under what conditions would this architecture fail or become a bottleneck?" This stress-tests the design and reveals hidden assumptions. AI might reveal that the approach works for 100 users but breaks at 10,000, or that it's fine for reads but terrible for write-heavy workloads.
Monolith vs. Microservices
One of the most common architectural decisions — and one where beginners consistently over-engineer — is choosing between a monolith and microservices. AI can help you think through this clearly.
For this project, should I use a monolith or microservices?
Context:
- Solo developer (for now)
- Expected users: ~500 initially
- Team might grow to 2-3 developers in 6 months
- Budget: low (personal project)
Be honest about the trade-offs.
When is microservices overkill for a project like this?
| Factor | Monolith | Microservices |
|---|---|---|
| Complexity | Simple | High |
| Solo developer | Ideal | Overhead |
| Deployment | One unit | Many services |
| Scaling team | Gets harder at ~10+ devs | Independent teams |
| Performance scaling | Scale entire app | Scale per service |
| MVP speed | Fastest | Slower setup |
For most projects by solo developers or small teams — especially at the MVP stage — a well-structured monolith is the right choice. You can always extract services later. AI can help you identify the exact point where that migration becomes worthwhile.
Database Design
AI is remarkably effective at database schema design. Give it your entities and relationships, and it will produce normalized tables, indexes, and constraints that would take significantly longer to design manually.
Design a MySQL database schema for this family planner.
Entities:
- Family (name, created date)
- FamilyMember (name, color, avatar, belongs to family)
- Activity (name, day, start time, end time, belongs to member)
Requirements:
- Proper foreign keys and relationships
- Indexed for common queries (activities by day, by member)
- Soft delete support (deleted_at)
- Created/updated timestamps on all tables
Show CREATE TABLE statements with comments explaining
design decisions.
AI will produce production-ready SQL with proper constraints, indexes on commonly queried columns, and timestamp patterns. Review the output for your specific needs — AI sometimes over-indexes or under-normalizes depending on the workload assumptions.
Pro Tip: Ask About Query Patterns
After generating a schema, ask: "What are the 5 most common queries this app will need, and how does this schema perform for each?" This validates that the schema serves actual usage patterns, not just a theoretically clean data model. If a common query requires complex joins across 4 tables, the schema might need restructuring.
API Design
A well-designed API is the contract between your frontend and backend. AI can generate consistent, RESTful endpoints that follow naming conventions and cover all CRUD operations.
Design REST API endpoints for this family planner.
Requirements:
- Follow REST conventions
- Consistent naming
- Proper HTTP methods
- Include authentication endpoints
- Pagination for list endpoints
- Error response format
Show each endpoint with: method, path, request body,
and response format.
A typical result might include:
Scalability and Security Review
Two dimensions that beginners consistently neglect — and that AI can surface proactively — are scalability bottlenecks and security vulnerabilities.
Analyze this architecture for scalability bottlenecks.
What will break first as users grow from 100 → 1,000 → 10,000?
What's the cheapest fix at each stage?
Review this system design for security vulnerabilities.
Consider:
- Authentication / authorization gaps
- Data exposure risks
- Input validation
- SQL injection vectors
- CORS configuration
- API rate limiting
These reviews are incredibly valuable when done before implementation. Fixing an architectural security flaw in a design document takes minutes. Fixing it in a running application takes days.
The Architecture Review Loop
System design with AI follows a specific iteration pattern that's different from the code-level iteration in earlier chapters. Here, you're iterating on decisions, not on implementation.
Most projects need two or three passes through this loop. The first pass creates the skeleton, the second pass identifies and fixes weaknesses, and the third pass simplifies anything that was over-designed. Only then do you start coding.
Common Mistakes
- Over-designing for small projects — A todo app doesn't need microservices, message queues, and a caching layer. Match architecture complexity to project scope.
- Too much abstraction too early — Don't build "flexible" systems before you know what flexibility you actually need. Premature abstraction creates complexity without benefit.
- No MVP mindset — Design for today's needs with tomorrow's needs in mind, not the other way around. Start simple and evolve.
- Accepting AI's first proposal — AI's initial architecture is a conversation starter, not a final answer. Always ask for alternatives and critique.
- Skipping security review — Architectural security gaps are the most expensive kind. Always ask for a security analysis before implementation.
Choose a project — your own or one of these: a team task manager, a recipe sharing platform, or a personal finance tracker. Run through the full architecture review loop:
- Step 1: Describe the project and ask AI to design the architecture.
- Step 2: Ask for three alternative approaches and compare.
- Step 3: Ask AI to design the database schema.
- Step 4: Ask AI to design the API endpoints.
- Step 5: Ask: "What will break first at 10— scale?" and "What are the security risks?"
- Step 6: Iterate — fix the issues found and simplify anything over-designed.
The goal isn't to build the project — it's to practice the design conversation. By the end, you should have a solid blueprint you'd feel confident implementing.
Key Takeaways
- Design architecture before code — architectural mistakes are 10— more expensive to fix than implementation bugs
- Always ask for multiple architecture alternatives and compare their trade-offs
- Use AI for database schema design, API endpoint planning, and component hierarchies
- Stress-test designs with "when would this fail?" and security review questions
- Start with the simplest viable architecture — you can always evolve later
- Iterate through the design review loop 2—3 times before writing any code
- Match architecture complexity to project scope — over-engineering is as dangerous as under-engineering