Vertical packs
Menu Versioning by Date/Time (Restaurants)
Indicative price, not an offer: €24/mo; menu scheduling, item availability by time, allergen tagging
Generated from docs/plan/paid/menu-versioning-by-date-time/PLAN.md in the AstroBaaS repository. Nothing described below is implemented — it is the written plan for it.
Menu versioning for restaurants with date/time-based activation. Lunch menu differs from dinner menu. Seasonal items appear only in specific months. Prices vary by daypart (lunch burger €8, dinner €14). Admin sets active dates for each menu version. Public menu API returns correct version by current time. PDF export for printing.
The problem
Lunch menu differs from dinner; seasonal items appear in summer only. Without versioning, staff manually swap menus or customers see wrong prices. Menu management is scattered across printed sheets, making updates error-prone.
What it does
- Multiple menu versions (Lunch, Dinner, Breakfast, Summer Special)
- Menu schedule (which version active by date/time/day-of-week)
- Item availability by version (steak dinner only, not lunch)
- Seasonal menus (valid Sept 1 - Oct 31 only)
- Limited-time specials (end date enforcement)
- Pricing per version (Lunch: €8, Dinner: €15)
- Allergen tags per item (peanuts, dairy, gluten)
- Admin: create versions, bulk-edit prices, set schedules
- Public menu API (customer sees correct version by time)
- PDF print export (per version, formatted for printing)
What it deliberately does NOT do
Each boundary carries its reason. A boundary without a reason gets crossed by the next person who reads this.
- Recipe/ingredients for nutritional calculations — third-party nutrition DB needed. Reason: licensing complexity.
- Food-safety compliance APIs — jurisdiction-specific liability. Reason: legal variability.
- Auto-pricing based on ingredient costs — business logic, not our scope. Reason: merchant owns margin rules.
Data model
New tables: menu_versions (versionId, name, isActive, valid_from, valid_to). menu_items (itemId, versionId, name, description, price (minor units), allergens (array), available (boolean), category). menu_schedules (scheduleId, versionId, dayOfWeek (array), startTime, endTime, season). Product schema: add menuItemId (fk). Audit: all menu changes. Migration: add tables + denormalized schedule index for fast lookup.
API
- GET /api/menu
- GET /api/menu/{versionId}
- GET /api/menu/schedule
- POST /api/admin/menu-versions
- POST /api/admin/menu-items
- PUT /api/admin/menu-items/{itemId}
- POST /api/admin/menu-schedules
- GET /api/admin/menu/{versionId}/print-pdf
- DELETE /api/admin/menu-versions/{versionId}
Every route added here must also appear in src/pages/openapi.json.ts — a test
fails the build if it does not.
Admin
Menu editor (create/edit versions, items). Schedule builder (set active times: lunch 11am-3pm weekdays). Bulk editor (change all dinner prices by 5%). Allergen tagger (checkboxes). Menu preview. Print PDF generator. Version history (restore old menu).
The seam — why this is paid
Core owns: menu + item schema, schedule engine, public API, generic PDF export. Paid pack owns: version scheduling, allergen tracking, PDF formatting, menu templates.
Support commitment: menu version history, allergen tracking, food-safety compliance
Dependencies
- Time-based scheduling engine
- PDF generation library
- Item categorization system
Acceptance checks
Each of these must be able to fail. Before claiming this is done, break the code deliberately and watch each one go red.
- Lunch menu active 11am-3pm weekdays; shows burger €8, pasta €10
- Dinner menu active 6pm-11pm; burger €14, pasta €16
- Item ‘Pumpkin Soup’ marked valid Sept 1 - Oct 31; not shown in June
- Item tagged ‘peanuts’; appears with allergy warning on menu
- Pricing per-version correct (Lunch burger €8, Dinner €14 on retrieval)
- Deleting ‘Summer Menu’ version removes items, past reservations unaffected
- Menu schedule shows all active versions by day/time (visual grid, no gaps)
- Public API returns only currently active items (no future items leaked)
- PDF menu shows allergen icons, prices, descriptions (printable A4)
- Restoring menu version from history restores all items + prices
Risks
Menu item in multiple versions; price edited in one version only (inconsistency). Schedule gap (11am-6pm no menu active): customer sees no items. Allergen tag missing: surprise allergy incident. PDF generation fails: staff can’t print 10 min before opening. Schedule not re-evaluated on time boundary (old menu stays active past end time).
Commercial context
| Suggested price | €24/mo; menu scheduling, item availability by time, allergen tagging |
| Rival anchor | Toast: built-in; Square: custom; custom: €1200+ |
The anchor is what the nearest equivalent charges on Shopify or Magento today. It is context for a pricing decision, not the decision.
Generated from the commerce plan. See docs/COMMERCE-PLAN.md for the full
catalogue and ../../AI-GUIDE.md for how to work on this repository.