Day 29 – Web Architecture | Complete Beginner Guide
🌐 Day 29: Web Architecture
Bug hunting me agar aapko vulnerabilities find karni hain, to aapko Web Architecture samajhna bahut zaruri hai.
Web Architecture batata hai ki website ka structure kaise bana hota hai aur kaun-kaun se components milkar kaam karte hain.
🖥 1️⃣ Client-Server Model
Web ka basic model hota hai:
Client → Server → Response
🧑 Client
Browser (Chrome, Edge, Firefox)
Mobile App
User yaha se request bhejta hai.
🏢 Server
Website ka backend
Database access karta hai
Logic run karta hai
Example:
Jab aap Facebook open karte ho:
Browser request bhejta hai
Server data process karta hai
Response HTML me convert hota hai
Page browser me show hota hai
🧱 2️⃣ Frontend (Client Side)
Frontend wo part hota hai jo user ko dikhta hai.
Technologies:
HTML
CSS
JavaScript
Frontend browser me run hota hai.
Bug hunting me:
XSS
Client-side validation bypass
Yahi par milte hain.
⚙ 3️⃣ Backend (Server Side)
Backend server par run hota hai.
Languages:
PHP
Python
Node.js
Java
Backend handle karta hai:
✔ Authentication
✔ Authorization
✔ Database queries
✔ Business logic
Yaha milte hain:
SQL Injection
Logic flaws
Access control bugs
🗄 4️⃣ Database Layer
Database me store hota hai:
User data
Passwords
Orders
Messages
Popular database:
MySQL
PostgreSQL
MongoDB
Agar backend input validate nahi kare → SQL Injection possible.
🏗 5️⃣ 3-Tier Architecture
Modern websites mostly 3-tier model follow karti hain:
1️⃣ Presentation Layer
Frontend (UI)
2️⃣ Application Layer
Backend logic
3️⃣ Data Layer
Database
Diagram Flow:
User → Frontend → Backend → Database → Backend → Frontend → User
☁ 6️⃣ Modern Web Architecture (Cloud Based)
Aajkal websites cloud par host hoti hain jaise:
Amazon Web Services
Google Cloud
Microsoft Azure
Isme use hote hain:
✔ Load Balancer
✔ Multiple Servers
✔ CDN
✔ APIs
🔗 7️⃣ API Architecture
Frontend directly backend se baat karta hai APIs ke through.
Example:
/api/user/1001
Bug hunting me:
Broken API
IDOR
Missing authentication
Common issues hote hain.
🔥 Bug Hunter Ke Liye Important Points
✔ Data ka flow samjho
✔ Client-side vs server-side validation check karo
✔ API endpoints test karo
✔ Role-based access check karo
✔ Database interaction observe karo
🧠 Real-World Flow Example
Login karte waqt:
Browser → Server → Authentication → Database → Session Create → Response
Agar kisi layer me validation missing hai → Vulnerability mil sakti hai.
🔁 Revision Points
Web architecture = Website ka structure
Client-Server model basic foundation hai
3-tier architecture common hai
Frontend + Backend + Database milkar website chalti hai
APIs modern web ka core part hain