How ad2486/raw-clang-crud works
raw-crud is a C CRUD HTTP server for user records. A client request is accepted by the TCP server, queued to a worker, parsed as HTTP, routed to a user operation, and answered with JSON; SQLite persists the records. The graph separates connection handling, request/response protocol, CRUD routing, JSON conversion, concurrency, and persistence. README documents all five user endpoints; the sampled server code shows routing and module calls. External SQLite and cJSON are shown as dependencies; no other integrations are documented.
Main entry points: server.c TCP server and router · http.c HTTP parser and responder · db.c User persistence · json.c User JSON conversion
Components 8
TCP connections
- TCP server and router
server.c
HTTP protocol
- HTTP parser and responder
http.c
JSON conversion
- User JSON conversion
json.c - cJSON parser
Worker pool
- Thread pool
pool.c
SQLite persistence
- User persistence
db.c - SQLite database
Other components
- HTTP client
Connections 11
- HTTP client → TCP server and router: opens connection
README.md - TCP server and router → Thread pool: enqueues client
server.c - Thread pool → TCP server and router: dispatches handler
pool.c - TCP server and router → HTTP parser and responder: reads request
server.c - TCP server and router → User persistence: opens database
server.c - TCP server and router → User persistence: runs CRUD
server.c - TCP server and router → User JSON conversion: parses and serializes
server.c - User JSON conversion → cJSON parser: parses input
json.c - TCP server and router → HTTP parser and responder: sends responses
server.c - User persistence → SQLite database: reads and writes
db.c - HTTP parser and responder → HTTP client: returns response
http.c