{"id":50724882,"url":"https://github.com/ayushpramanik/cpp-web-server","last_synced_at":"2026-06-10T03:03:10.762Z","repository":{"id":360079591,"uuid":"1248600842","full_name":"AyushPramanik/CPP-Web-Server","owner":"AyushPramanik","description":"Modern C++20 high-performance HTTP server inspired by NGINX with epoll, async I/O, threading, and production systems architecture.","archived":false,"fork":false,"pushed_at":"2026-05-24T21:59:51.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T23:26:47.074Z","etag":null,"topics":["concurrency","cpp","distributed-systems","http-server","infrastructure","multithreading","socket-programming"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AyushPramanik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-24T21:16:22.000Z","updated_at":"2026-05-24T21:59:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/AyushPramanik/CPP-Web-Server","commit_stats":null,"previous_names":["ayushpramanik/cpp-web-server"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/AyushPramanik/CPP-Web-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AyushPramanik%2FCPP-Web-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AyushPramanik%2FCPP-Web-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AyushPramanik%2FCPP-Web-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AyushPramanik%2FCPP-Web-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AyushPramanik","download_url":"https://codeload.github.com/AyushPramanik/CPP-Web-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AyushPramanik%2FCPP-Web-Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34134636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concurrency","cpp","distributed-systems","http-server","infrastructure","multithreading","socket-programming"],"created_at":"2026-06-10T03:03:05.101Z","updated_at":"2026-06-10T03:03:10.746Z","avatar_url":"https://github.com/AyushPramanik.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cppws — C++ Web Server\n\nA production-grade, high-performance HTTP/1.1 web server written in modern C++20,\ninspired by NGINX's architecture. Built as a deep dive into systems programming,\nevent-driven I/O, and low-latency networking.\n\n\u003e **Purpose:** This is a learning-oriented implementation. Every design decision\n\u003e is documented, every systems concept is explained. The goal is code you can\n\u003e learn from, not just run.\n\n---\n\n## Architecture Overview\n\n- **Event-driven non-blocking I/O** using Linux `epoll` (edge-triggered)\n- **Reactor pattern** — one event loop dispatches to a worker thread pool\n- **HTTP/1.1** parser with keep-alive support\n- **Static file serving** with `sendfile(2)` (zero-copy)\n- **Configurable routing** and middleware pipeline\n- **Async structured logging** via spdlog\n- **Graceful shutdown** with connection draining\n\nSee [docs/DESIGN.md](docs/DESIGN.md) for full architecture documentation.\n\n---\n\n## Build Requirements\n\n| Tool | Version |\n|------|---------|\n| CMake | ≥ 3.22 |\n| C++ compiler | clang-18+ or gcc-14+ |\n| Linux kernel | ≥ 5.4 (for epoll, io_uring later) |\n| OpenSSL | ≥ 3.0 (for Phase 6 TLS) |\n\nDependencies (fetched automatically by CMake):\n- [spdlog](https://github.com/gabime/spdlog) v1.14.1\n- [GoogleTest](https://github.com/google/googletest) v1.14.0\n\n---\n\n## Quick Start\n\n```bash\n# Clone\ngit clone https://github.com/your-org/cppws.git \u0026\u0026 cd cppws\n\n# Build (Debug + ASan)\ncmake -B build -DCMAKE_BUILD_TYPE=Debug\ncmake --build build --parallel\n\n# Run tests\ncd build \u0026\u0026 ctest --output-on-failure\n\n# Run server\n./build/cppws\n```\n\n### Docker\n\n```bash\ndocker build -t cppws:latest .\ndocker run --rm -p 8080:8080 cppws:latest\n```\n\n---\n\n## Project Structure\n\n```\ncppws/\n├── include/              # Public headers\n│   ├── core/             # EventLoop, Reactor, Server\n│   ├── http/             # Parser, Request, Response, Router\n│   ├── net/              # Socket, Connection, Buffer\n│   ├── util/             # Logger, Error, StringUtils\n│   └── config/           # Config parser\n├── src/                  # Implementation files (mirrors include/)\n├── tests/\n│   ├── unit/             # Parser, utility tests (fast, no network)\n│   ├── integration/      # Full server tests (real TCP connections)\n│   └── load/             # wrk/hey-based load tests\n├── bench/                # Micro-benchmarks\n├── docs/                 # DESIGN.md, architecture diagrams\n├── scripts/              # format.sh, lint.sh, benchmark.sh\n└── .github/workflows/    # CI pipeline\n```\n\n---\n\n## Development Phases\n\n| Phase | Status | Description |\n|-------|--------|-------------|\n| 1 | ✅ Complete | Project foundation, logging, CMake, CI, Docker |\n| 2 | 🔄 In Progress | Non-blocking sockets, epoll, event loop, connection lifecycle |\n| 3 | ⏳ Planned | HTTP parser, routing, static file serving |\n| 4 | ⏳ Planned | Thread pool, task queue, synchronization |\n| 5 | ⏳ Planned | sendfile, buffer pooling, benchmarks |\n| 6 | ⏳ Planned | Reverse proxy, load balancing, TLS |\n| 7 | ⏳ Planned | Stress tests, metrics, graceful reload |\n\n---\n\n## Code Quality\n\n```bash\n# Format all source files\nfind src include tests -name '*.cpp' -o -name '*.hpp' \\\n  | xargs clang-format -i\n\n# Run clang-tidy\nclang-tidy -p build src/**/*.cpp\n\n# Run with sanitizers (Debug build)\ncmake -B build -DCMAKE_BUILD_TYPE=Debug\ncmake --build build \u0026\u0026 ./build/cppws\n```\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayushpramanik%2Fcpp-web-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayushpramanik%2Fcpp-web-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayushpramanik%2Fcpp-web-server/lists"}