webserv/docs
2025-10-29 16:55:07 +01:00
..
ALLOWED_CLEAN.md Implement server initialization: add Server class with constructor to initialize host and port from ConfigManager 2025-09-16 15:05:35 +02:00
ALLOWED.md Implement server initialization: add Server class with constructor to initialize host and port from ConfigManager 2025-09-16 15:05:35 +02:00
ClassDiagram.mmd Add HttpRequest, HttpResponse, Router, CgiHandler, ConfigValidator, Logger, and MimeTypeHandler classes to class diagram 2025-09-20 15:19:47 +02:00
directives.md feat(directives): implement directive parsing and factory pattern for configuration 2025-09-25 17:33:14 +02:00
Makefile.old moving docs, log files and iwyu map 2025-10-10 07:56:49 +02:00
README.md data flow 2025-09-10 17:21:04 +02:00
TESTING_SETUP.md moving docs, log files and iwyu map 2025-10-10 07:56:49 +02:00
TODO fix: new todo 2025-10-29 16:55:07 +01:00

webserv

Date Flow Overview

src/
 ├─ main.cpp              # starts server
 ├─ Server.cpp/.hpp       # listens & manages event loop
 ├─ Connection.cpp/.hpp   # represents a single client
 ├─ RequestParser.cpp/.hpp
 ├─ Router.cpp/.hpp
 ├─ Response.cpp/.hpp
 ├─ CGIHandler.cpp/.hpp
 ├─ Config.cpp/.hpp       # parses config file
 └─ Utils.cpp/.hpp
[Client TCP packet]
       │
       ▼
┌───────────────┐
│ Event Loop    │  (poll/select/epoll)
└──────┬────────┘
       │
       ▼
┌───────────────┐
│ RequestParser │  (builds Request struct)
└──────┬────────┘
       │
       ▼
┌───────────────┐
│ Router        │  (selects location, checks methods)
└──────┬────────┘
       │
       ▼
┌───────────────┐
│ Handler       │  (static file, CGI, error)
└──────┬────────┘
       │
       ▼
┌───────────────┐
│ ResponseBuilder│ (status line + headers + body)
└──────┬────────┘
       │
       ▼
[Send response back to client]