Project Interview Bible ⚑ Recently updatedUpdated on Jun 30, 2026 β€” this content may still be evolving.

Explaining Your Project Architecture

How to describe, draw, and defend your system’s structure in interviews.


What Interviewers Want

  • A clear mental model of how pieces connect
  • Justification for technology choices
  • Awareness of what would break at scale
  • Honesty about shortcuts you took (and why)

The Standard Student Architecture

Most student fullstack projects follow this pattern:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   CLIENT                         β”‚
β”‚  React / Next.js (browser)                       β”‚
β”‚  - UI components, routing, state management      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚ HTTPS (REST API / WebSocket)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   SERVER                         β”‚
β”‚  Node.js + Express                               β”‚
β”‚  - Routes, middleware, business logic            β”‚
β”‚  - Auth middleware, validation                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚                       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚     DATABASE        β”‚  β”‚  EXTERNAL SERVICES   β”‚
β”‚  PostgreSQL/MongoDB β”‚  β”‚  - Cloudinary (images) β”‚
β”‚  - Users, data      β”‚  β”‚  - SendGrid (email)    β”‚
β”‚  - Migrations       β”‚  β”‚  - Stripe (payments)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Say this: β€œIt’s a classic three-tier architecture: React SPA, Express REST API, PostgreSQL database, deployed separately so each layer can scale independently.”


How to Draw It (2 Minutes on Whiteboard)

Draw these boxes left to right, then add arrows:

[Browser/React] ──HTTPS──► [Express API] ──► [PostgreSQL]
                                β”‚
                                β”œβ”€β”€β–Ί [Redis] (if you use caching)
                                β”œβ”€β”€β–Ί [S3/Cloudinary] (if file uploads)
                                └──► [Socket.io] (if real-time)

Label arrows with protocol: REST JSON, WebSocket, SQL queries

Pro tip: Practice drawing this in under 60 seconds. Muscle memory matters in interviews.


Explaining Your Tech Stack Choices

Use the format: β€œI chose X because Y. Alternative was Z, but…”

Frontend

ChoiceGood reason to give
ReactComponent reusability, large ecosystem, I know it best
Next.jsSSR for SEO, file-based routing, API routes in one repo
React QueryServer state caching, less boilerplate than Redux for API data
Tailwind CSSFast prototyping, consistent design system
ZustandLightweight global state without Redux complexity

Backend

ChoiceGood reason to give
Node.js + ExpressSame language as frontend, fast to build, huge npm ecosystem
PostgreSQLRelational data with joins, ACID for transactions, free tier on Railway
MongoDBFlexible schema for rapid prototyping, nested documents fit my data
PrismaType-safe queries, migrations built-in, great DX

Deployment

ChoiceGood reason to give
Vercel (frontend)Zero-config deploys, CDN, preview URLs per PR
Railway/Render (API)Simple Node deploy, managed Postgres addon
DockerConsistent environments, easy to hand off to teammates

Architecture Patterns to Name-Drop (If Applicable)

PatternWhen it appliesExample sentence
MVCRoutes β†’ controllers β†’ models”Express routes map to controller functions that call Prisma models.”
Middleware chainAuth, logging, validation”Every protected route passes through auth middleware before the controller.”
Repository patternAbstracting DB access”I wrapped all user queries in a UserRepository so controllers don’t touch SQL directly.”
Client-serverAny web app”Thin client β€” business logic lives on the server, frontend just renders and sends requests.”
MonolithSingle deployable app”It’s a monolith β€” one Express app. Fine for this scale; I’d extract a notification service if we grew.”

Folder Structure (Show You Thought About Organization)

Frontend (Feature-Based)

src/
β”œβ”€β”€ components/ui/       # Reusable: Button, Modal, Input
β”œβ”€β”€ features/
β”‚   β”œβ”€β”€ auth/            # Login, Register, useAuth
β”‚   β”œβ”€β”€ dashboard/       # Dashboard-specific components
β”‚   └── [feature]/
β”œβ”€β”€ hooks/               # Shared custom hooks
β”œβ”€β”€ lib/api.js           # Axios instance, interceptors
β”œβ”€β”€ pages/ or app/       # Route entry points
└── utils/               # Helpers

Backend (Layered)

src/
β”œβ”€β”€ routes/              # Route definitions
β”œβ”€β”€ controllers/         # Request handlers
β”œβ”€β”€ middleware/           # auth.js, validate.js, errorHandler.js
β”œβ”€β”€ models/ or prisma/   # Database schema and queries
β”œβ”€β”€ services/            # Business logic (optional layer)
β”œβ”€β”€ utils/               # Helpers, email templates
└── config/              # DB connection, env vars

Interview line: β€œBackend is layered β€” routes define endpoints, controllers handle request/response, and Prisma handles all database access. Keeps concerns separated.”


Data Flow Example (Trace One User Action)

Practice narrating a complete flow. Example: User creates a post

1. User fills form in React β†’ clicks Submit
2. React calls POST /api/v1/posts with JSON body + JWT in Authorization header
3. Express receives request
4. authMiddleware verifies JWT β†’ attaches req.user
5. validateMiddleware checks title/body present
6. postController.create() called
7. Prisma: db.post.create({ data: { title, body, userId: req.user.id } })
8. Returns 201 { data: { id, title, body, createdAt } }
9. React Query invalidates 'posts' cache β†’ feed refetches
10. UI shows new post at top of feed

This 10-step walkthrough impresses interviewers more than any diagram.


Scale Questions (Always Prep This)

β€œWhat breaks first at 10,000 users?”

Honest student answers:

  1. Database β€” unindexed queries slow down β†’ add indexes, connection pooling
  2. Single server β€” CPU/memory maxed β†’ horizontal scaling behind load balancer
  3. File uploads β€” disk fills up β†’ move to S3/Cloudinary (if not already)
  4. In-memory sessions β€” lost on restart/multi-server β†’ move to Redis
  5. No caching β€” repeated DB hits β†’ Redis cache for hot data

β€œHow would you scale this?”

Current:  [React on Vercel] β†’ [1 Express server] β†’ [1 Postgres]

10x:      [React on Vercel] β†’ [Load Balancer] β†’ [3 Express servers] β†’ [Postgres + Redis cache]
                                              β†’ [Read replica]

100x:     Add CDN for assets, queue for async jobs (email), separate file service

Common Architecture Mistakes Students Make

MistakeWhat to say if trueFix narrative
Everything in one server.js”Started monolithic for speed""I’d split into routes/controllers/services”
No environment variables”Learned this the hard way""Now all secrets in .env, .env in .gitignore”
Frontend calls DB directlyNever do thisN/A
No error handling middleware”Added after debugging production errors""Centralized error handler returns consistent JSON”
CORS not configured”Fixed when frontend couldn’t reach API""Configured CORS for my Vercel domain only”

Turn mistakes into learning stories β€” interviewers respect growth.


Checklist: Can You Answer These?

  • Draw your architecture in 60 seconds
  • Explain why you chose each technology
  • Trace one user action end-to-end (10 steps)
  • Name what breaks first at 10x scale
  • Describe your folder structure and why
  • Identify one architectural decision you’d change

Next: authentication.md | database-design.md