Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

simresto (MVP step 1)

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).

Run it

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 header X-Api-Key: simresto_dev_key_change_me (override with env var SIMRESTO_API_KEY).

What's here

  • 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 (seed 20240717) generator for the struggling scenario: 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. Only struggling is implemented — healthy/new_opening are 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.

Not yet built (later phases, per brief §13)

Tick engine, webhooks (/v1/extensions/register, signed push events), POST /v1/actions, the reference agent, and the dashboard.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages