Skip to main content

SKOLE-FOOD — Food Menu Module

Module ID: SKOLE-FOOD | Version: 1.0 | Status: Active
Products: Parent App (read) · Teacher App (manage) · Web App (manage)

1. Overview

FieldValue
Module NameFood Menu
Module CodeFOOD
Business ValueTransparently communicates the school cafeteria/tiffin menu to parents. Parents know what meals are planned, reducing guesswork and supporting children with dietary needs.

Scope In

  • Create and manage menu items with title, items, nutrients, health benefits, day, and period
  • Schedule menus for specific days and periods
  • Parent read-only view, filterable by day/period

Scope Out

  • Allergen filtering / medical diet customization
  • Online meal ordering or payment

2. Requirements

Functional Requirements (FR)

What the module must DO — actions, behaviors, and outcomes.
  • SKOLE-FOOD-FR001: The module shall allow admins and teachers to define food menu items with details on title, items, nutrients, and health benefits.
  • SKOLE-FOOD-FR002: The module shall enable scheduling of menu items for specific days of the week and meal periods (breakfast, lunch, snack).
  • SKOLE-FOOD-FR003: The module shall allow parents to view the weekly food menu, filtered by day and period.
  • SKOLE-FOOD-FR004: The module shall allow admins to toggle the status of menu items (active/inactive).
  • SKOLE-FOOD-FR005: The module shall provide soft-deletion for menu records.

Non-Functional Requirements (NFR)

How well the module must do it — performance, security, and reliability.
  • SKOLE-FOOD-NFR001: The module shall perform multi-tenant scoping by ensuring food data is strictly isolated by skole_id.
  • SKOLE-FOOD-NFR002: The module shall behave reliably by excluding items marked for deletion (deleted_status = 1) from all frontend views.

Constraints

Rules and boundaries — tech choices and platform restrictions.
  • C001: We must separate the menu item definition from the schedule mapping in the database to allow for recurring menu rotations.
  • C002: We must maintain compatibility with the platform-wide soft-deletion pattern using the deleted_status integer column.

3. Sub-modules / Backlog

IDSub-modulePriorityStatusEstimateLinked FR
SKOLE-FOOD-SM001Food menu CRUDP0Done2dFR001–FR002, FR004–FR005
SKOLE-FOOD-SM002Parent menu viewerP0Done1dFR003
SKOLE-FOOD-SM003Menu schedule managementP1Done1dFR002

4. Logical Implementation

GET /parent-app/food-menu?day=Monday&period=lunch
  WHERE skole_id = jwt.skole_id AND deleted_status = 0
  AND menu_day = 'Monday' AND period = 'lunch'
POST /teachers-app/food-menu
  { skole_id, food_menu_title, food_menu_items, menu_nutrients,
    menu_health_benefits, menu_day, period, status }

5. UI Requirements

Parent App

IDScreenRouteDescription
SKOLE-FOOD-UI001FoodMenuScreen/food-menuWeekly grid or day-selector with menu cards per period
Components:
IDComponentProps
SKOLE-FOOD-UC001MenuCarditem, period
SKOLE-FOOD-UC002DaySelectordays[], selected, onChange
SKOLE-FOOD-UC003NutrientsSectionnutrients

Teacher App & Web App

IDScreenRouteDescription
SKOLE-FOOD-UI002FoodMenuManage/foodCreate/edit/delete menus with schedule
SKOLE-FOOD-UI003Admin Food Menu/:skoleId/food-menuWeb display and management

6. Conditional Expressions

IDExpressionTriggerTrue ActionFalse Action
SKOLE-FOOD-CE001deleted_status === 1DB queryExcludeInclude
SKOLE-FOOD-CE002menu.status === 'inactive'Parent viewHideShow
SKOLE-FOOD-CE003selectedDay changesParent appRe-fetch menus for day

7. Database Tables

IDTableRole
SKOLE-FOOD-TB001food_menusMenu item definitions
SKOLE-FOOD-TB002food_menu_scheduleDay/period schedule mapping

8. API Endpoints

IDMethodRouteAuthDescription
SKOLE-FOOD-EP001GET/parent-app/food-menuJWT (parent)View daily menu
SKOLE-FOOD-EP002GET/teachers-app/food-menuJWT (staff)View all menus
SKOLE-FOOD-EP003POST/teachers-app/food-menuJWT (staff)Create menu item
SKOLE-FOOD-EP004PUT/teachers-app/food-menu/:idJWT (staff)Update menu item
SKOLE-FOOD-EP005DELETE/teachers-app/food-menu/:idJWT (staff)Delete menu item
SKOLE-FOOD-EP006GET/web-app/food-menuJWT (user)Admin view menus
SKOLE-FOOD-EP007POST/web-app/food-menuJWT (user)Admin create menu
SKOLE-FOOD-EP008PUT/web-app/food-menu/:idJWT (user)Admin update menu
SKOLE-FOOD-EP009DELETE/web-app/food-menu/:idJWT (user)Admin delete menu
SKOLE-FOOD-EP010POST/web-app/food-menu-scheduleJWT (user)Create schedule entry