Simulated restaurant platform API — schema + seed data + read-only REST per
restaurant-simulator-brief.md §3 / §5.1. Tick engine, webhooks, extension
registration/actions, the agent, and the dashboard are not built yet —
this step is schema + reads only, per the brief's kickoff instructions (§13).
python3.11 -m venv .venv
.venv/bin/pip install -r requirements.txt
# seed the 'struggling' scenario (fixed seed, ~10 days of history)
.venv/bin/python -m seed.seed --reset
# start the API
.venv/bin/uvicorn app.main:app --reload --port 8000- Interactive docs: http://127.0.0.1:8000/docs
- All
/v1/*routes require headerX-Api-Key: simresto_dev_key_change_me(override with env varSIMRESTO_API_KEY).
app/models.py— SQLAlchemy tables for every entity in brief §3.app/routers/*.py— the §5.1 GET endpoints (restaurant, menu, orders, payments, staff, shifts, inventory, reviews, inspections, benefits).seed/seed.py— deterministic (seed20240717) generator for thestrugglingscenario: two understaffed dinner rushes, negative reviews clustered right after them, three inventory items below reorder threshold, a Grade-B inspection, and above-benchmark benefits pricing. Onlystrugglingis implemented —healthy/new_openingare deferred.
Note: physical tables are orders/order_lines (not order/order_line,
which are reserved words in SQL); the REST resource is still /v1/orders.
Tick engine, webhooks (/v1/extensions/register, signed push events),
POST /v1/actions, the reference agent, and the dashboard.