This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
make # build ./pizza-party binary
make clean # remove objects and binaryRequires libcurl (libcurl4-openssl-dev on Debian/Ubuntu) and a C11 compiler + clangd (apt install clang clangd). In the devcontainer, both are installed by the postCreateCommand in .devcontainer/devcontainer.json.
./pizza-party stores <zip>
./pizza-party menu <store_id>
./pizza-party track <order_id>
./pizza-party watch <order_id> [poll_seconds]
./pizza-party -c <config_file> -v <command> # custom config, verbose curlConfig file format is key=value — valid keys: base_url, api_key, timeout, verbose.
The application is built around a provider vtable (include/provider.h, src/provider.c). Each restaurant backend implements pp_provider_t — a struct of function pointers covering store search, menu fetch, order validation/placement, and order tracking. Providers are registered at startup via pp_provider_register() and resolved by name or default.
The remaining modules are provider-agnostic and operate through pp_config_t:
http_client— thin libcurl wrapper; all network I/O goes throughpp_http_get/pp_http_post, which return a heap-allocatedpp_response_t(caller frees withpp_response_free)store/menu/order/tracker— each owns its data structs, a fetch/create function that callshttp_client, and a_free+_printpairconfig— loaded once inmain.c, passed by pointer to every function that needs it; never mutated after load
- All public symbols are prefixed
pp_. - Functions that allocate return a pointer (NULL on failure); the caller always owns and frees the result.
- JSON parsing is not yet implemented — every module that receives HTTP responses has a
/* TODO: parse resp->data */stub. Add a JSON library (e.g. cJSON) and fill these in per-provider. - Do not reference specific restaurant brand names anywhere in the codebase — keep all naming generic to allow multiple providers.
- Create
src/providers/<name>.cimplementing all five function pointers inpp_provider_t. - Call
pp_provider_register(&your_provider)early inmain. - Add the new
.cfile toSRCSin the Makefile.