API
The API (resa_api) is the Django backend shared by Staff, Customer, and future clients. It owns business logic, authentication, and persistence against MySQL.
| Repo | api |
| Stack | Django 6, MySQL (mysqlclient), Gunicorn / WhiteNoise for deploy |
| Local URL | http://127.0.0.1:8000 (or next free port) |
| API prefix | /api/ |
| Admin | /django-admin/ |
Role in RESA
Customer / Staff ──HTTP──► API (/api/…) ──► MySQL
Clients never talk to the database directly. The API processes requests, enforces staff auth where needed, and reads/writes data. See Home and Environments.
Project apps
Django apps live at the repo root. Detail pages will grow under Applications (placeholder for now).
| App | Responsibility (summary) |
|---|---|
auth |
Staff login, logout, me; StaffMember accounts |
core |
Shared HTTP helpers, staff gates, order/product services |
customers |
Guest menu, products surface, guest order create |
waiter |
Waiter order submit |
register |
Floor register: active orders, tables, reservations, accounts |
owner |
Patron/admin: catalog, settings, reports, day closures, logs, push |
Auth (staff)
Staff clients use a signed Bearer token (Django signing), not JWT/DRF tokens.
POST /api/auth/login/POST /api/auth/logout/GET /api/auth/me/- Header:
Authorization: Bearer <token>
Guest menu endpoints under customers are largely public; staff/owner/register paths expect a valid staff session.
Documentation map
| Page | Contents |
|---|---|
| Installation | Docker MySQL, Python, venv, migrate, runserver |
| Configuration | local_settings.py, .env, CORS, database |
| Applications | Per-app docs (empty — TBD) |