CLAUDE.md
CLAUDE.mdCLAUDE.mdroot
Quality
93/100
Scores the file, not the repository.Length
324 words
14 headings · 4 code blocksRepository
999
— · pushed 1 days agoLast changed
2 days ago
First indexed 2 days ago.1# TurboAPI — Project Guide23## What is this?45A high-performance Python web framework with a Zig HTTP backend. Drop-in FastAPI-compatible API.67## Requirements89- **Python 3.14+** (free-threaded `3.14t` recommended)10- **Zig 0.16+** (for building the native backend)11- **uv** (Python package manager)1213## Building1415```bash16# Build the Zig native backend (auto-detects Python, dhi fetched via build.zig.zon)17python zig/build_turbonet.py --install1819# Install the Python package in dev mode20uv pip install -e ".[dev]"2122# Or just use Docker23docker compose up --build24```2526## Running Tests2728```bash29# Python tests (requires Python 3.14t)30uv run --python 3.14t python -m pytest tests/ -p no:anchorpy3132# Zig unit tests (includes fuzz seed corpus + WebSocket codec)33cd zig && zig build test3435# Zig continuous fuzzing (runs indefinitely)36cd zig && zig build test --fuzz37```3839**Known test exclusions:**40- `anchorpy` plugin — causes import error, disable with `-p no:anchorpy`4142## Benchmarks4344```bash45uv run --python 3.14t python benchmarks/run_benchmarks.py46```4748Current numbers: ~140k req/s, 0.16ms avg latency, 8-9x faster than FastAPI.4950## Project Structure5152```53zig/src/54 server.zig — HTTP server core (TCP, parsing, dispatch)55 router.zig — Radix trie router56 dhi_validator.zig — JSON schema validator (pre-GIL)57 py.zig — Python C API helpers58zig/build.zig — Zig build system5960python/turboapi/61 main_app.py — TurboAPI class (public API)62 middleware.py — CORS, rate limiting, gzip, etc.63 security.py — Auth helpers (OAuth2, JWT, API keys)64 models.py — Request/Response models65 routing.py — Router and APIRouter66 request_handler.py — Python-side request handling6768tests/ — pytest test suite (275+ tests)69benchmarks/ — Performance benchmarks70```7172## Key Conventions7374- Zig backend builds via `python zig/build_turbonet.py` (NOT `zig build` directly — it needs `-Dpy-include`)75- dhi dependency is fetched automatically via `build.zig.zon` — no manual cloning needed76- Pre-commit hooks run ruff lint + Zig build + smoke test77- The `feature/community-feedback` branch has the latest security fixes and fuzz tests78- FFI native handlers use borrowed pointers (no heap alloc) — see ABI contract in `server.zig`79
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| luongnv89/claude-howtovi/CLAUDE.md · 41k | CLAUDE.md | setupbuildtestlint-format+8 | 97/100 | 3 days ago | |
| dotCMS/corecore-web/libs/sdk/client/CLAUDE.md · 949 | CLAUDE.md | setupbuildtestlint-format+9 | 97/100 | 3 days ago | |
| modelcontextprotocol/serversCLAUDE.md · 89k | CLAUDE.md | setupbuildtestlint-format+6 | 97/100 | 3 days ago | |
| dotCMS/corecore-web/libs/sdk/react/CLAUDE.md · 949 | CLAUDE.md | setupbuildtestlint-format+9 | 97/100 | 3 days ago |
