Thuta Learning
ProjectsWeb Developmentbeginner

Project: Design a Full Web Architecture

What you'll walk away with

  • Explain the core ideas behind Project: Design a Full Web Architecture
  • Read the diagram and trace how a request, piece of data, or event flows through the system
  • Explain how this piece connects into the larger web architecture picture

Build the mental model

The capstone doesn't hand you a new diagram to memorize — it asks you to reuse the same building blocks from the Advanced chapter's SaaS, real-time, AI, and e-commerce architecture lessons and assemble them yourself from a requirements list.

The skill being tested is composition: each component should appear because a real requirement demands it, not because you're pattern-matching to a diagram you've seen before.

  • Needs authentication -> auth service
  • Needs to persist data -> database
  • Needs file upload -> object storage (not the database)
  • Needs to send notifications -> notification service
  • Needs a realtime feature -> a persistent connection (WebSocket/push channel)

The most common mistake

Adding a service that no requirement calls for just because it appeared in an earlier diagram, or stopping at 'frontend talks to backend' without naming which backend-adjacent services are actually needed

The client/server mental model sits underneath: 'the backend' is rarely one box — it is a backend plus whichever specialized services the requirements actually call for.

text
ASSEMBLED WEB ARCHITECTURE FROM REQUIREMENTS
--------------------------------------------
FULL ARCHITECTURE: AUTH + DASHBOARD + DATABASE + UPLOAD + NOTIFY
--------------------------------------------------------------------
[User]
   |
   v
[Browser] <---- static assets ----> [CDN]
   |
   | HTTPS request (API calls)
   v
[Frontend]  (dashboard UI, served via CDN)
   |
   v
[Backend / API]
   |
   +----------------+----------------+------------------+
   |                |                |                  |
   v                v                v                  v
[Database]   [Auth service]   [Object storage]   [Notification
                                                    service]

Connect it to a real scenario

Work top-down from the requirement list rather than trying to draw the whole picture at once.

Write each requirement as a plain sentence

List: users log in, there is a dashboard, data persists, users upload files, frontend calls a backend API, users get notifications.

Map each requirement to exactly one component

Authentication -> auth service, data storage -> database, file upload -> object storage, notifications -> notification service.

Confirm the frontend/backend base

Dashboard and API don't add new components — they just confirm the frontend/backend base every project in this course already has.

Assemble the diagram

Draw User -> Browser -> CDN -> Frontend -> Backend, then branch the backend out to each mapped service.

Run the code and compare

Run designArchitecture() against two different requirement objects and check the result against the diagram you drew by hand.

Change one flag (drop file upload, add realtime) and re-run it — seeing exactly one component appear or disappear confirms the mapping is genuinely one-to-one.

Try the working example

javascript
function designArchitecture(requirements) {
  const {
    needsAuth = false,
    needsDatabase = false,
    needsFileUpload = false,
    needsNotifications = false,
    needsRealtime = false,
  } = requirements;

  // Every project in this course starts from the same base: a client,
  // a CDN for static assets, a frontend, and a backend that talks to them.
  const components = ['Browser (client)', 'CDN (static assets)', 'Frontend', 'Backend / API'];

  if (needsAuth) components.push('Auth service / identity provider');
  if (needsDatabase) components.push('Database');
  if (needsFileUpload) components.push('Object storage (file uploads)');
  if (needsNotifications) components.push('Notification service');
  if (needsRealtime) components.push('Realtime channel (WebSocket / push)');

  return components;
}

const dashboardApp = designArchitecture({
  needsAuth: true,
  needsDatabase: true,
  needsFileUpload: true,
  needsNotifications: true,
  needsRealtime: false,
});

console.log('Dashboard app architecture:');
dashboardApp.forEach((c, i) => console.log(`${i + 1}. ${c}`));

const chatApp = designArchitecture({
  needsAuth: true,
  needsDatabase: true,
  needsFileUpload: false,
  needsNotifications: true,
  needsRealtime: true,
});

console.log('');
console.log('Realtime chat app architecture:');
chatApp.forEach((c, i) => console.log(`${i + 1}. ${c}`));
You should see
Running designArchitecture() for this lesson's requirement set and a second, realtime-chat requirement set prints:

Dashboard app architecture:
1. Browser (client)
2. CDN (static assets)
3. Frontend
4. Backend / API
5. Auth service / identity provider
6. Database
7. Object storage (file uploads)
8. Notification service

Realtime chat app architecture:
1. Browser (client)
2. CDN (static assets)
3. Frontend
4. Backend / API
5. Auth service / identity provider
6. Database
7. Notification service
8. Realtime channel (WebSocket / push)

5-minute try-it

Design the architecture for a requirements set with needsAuth:false, needsDatabase:true, needsFileUpload:false, needsNotifications:false, needsRealtime:true (e.g. an anonymous live-poll app) and justify why each included and excluded component is correct.

One important caution

Designing in an architecture component that no requirement actually calls for, just because it appeared in an earlier lesson's diagram

Conflating storage with the database and designing file uploads to go into the database — real systems route files to object storage

System Design Primer (GitHub)How the Web Works

Easy traps

  • Designing in an architecture component that no requirement actually calls for, just because it appeared in an earlier lesson's diagram
  • Conflating storage with the database and designing file uploads to go into the database — real systems route files to object storage
  • This course is a system map, not a deep-dive on every piece -- for depth on REST, DNS/hosting, databases, or security, continue to the API Tutorial, Cloud & Deployment, SQL, or Cybersecurity tutorials.

Exercise

Design the architecture for a requirements set with needsAuth:false, needsDatabase:true, needsFileUpload:false, needsNotifications:false, needsRealtime:true (e.g. an anonymous live-poll app) and justify why each included and excluded component is correct.

You'll know it worked when: Running designArchitecture() for this lesson's requirement set and a second, realtime-chat requirement set prints: Dashboard app architecture: 1. Browser (client) 2. CDN (static assets) 3. Frontend 4. Backend / API 5. Auth service / identity provider 6. Database 7. Object storage (file uploads) 8. Notification service Realtime chat app architecture: 1. Browser (client) 2. CDN (static assets) 3. Frontend 4. Backend / API 5. Auth service / identity provider 6. Database 7. Notification service 8. Realtime channel (WebSocket / push)

Project: Design a Full Web Architecture | Thuta Learning