Skip to content
adityak1609Public

About

Campus mess food-waste tracking with daily measurements, photo evidence, action follow-up, and an AWS serverless backend.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MessWise

Hackathon team: crypto_knights (solo entrant). See the submission writeup and 2:40 demo guide.

A small food-waste log for a campus mess: turn the daily published waste figure, menu, and supporting photos into a record that staff can review and act on.

The three-day scope is one mess. Daily kilograms are the main measure; photos add context and are never used to estimate grams. Sample records are illustrative, not field results.

Live application: Open MessWise. The app opens with labelled sample data; the private AWS workspace requires an administrator-created Cognito login.

Deployment rechecked on 11 October 2026: Amplify hosting, Cognito first-login/password flow, Lambda/API CORS, DynamoDB save/reload and user isolation, private S3 upload/retrieval, and locked paired-photo human reviews. All 13 live API checks passed; disposable technical test data was removed. Plate observations, vision-model accuracy and follow-up outcomes remain to be evaluated. Bedrock reports NOT_AUTHORIZED, and a minimal direct Converse request returns ValidationException: Operation not allowed; no successful inference is claimed. The daily tracker and human-review workflow remain usable while model access is resolved.

The private pilot workspace now contains seven daily weights supplied by the mess participant for 5–11 October 2026, totalling 603 kg (86.1 kg/day), with the matching dated menus. The participant confirmed all seven weights as measured. Two real after-eating photos from two different students' Thursday lunch plates are attached to the 8 October record and verified through private S3 retrieval. They are unpaired observations: original serving photos, plate weights, ratings and model results have not been collected. The separately reported 87 kg daily total is not attributed to lunch or these plates. Waste scope and covered meals remain unconfirmed; distinct-student counts are kept as notes rather than meal-serving denominators. Original source-notice photos, plate evaluation and follow-up outcomes remain to be collected.

Run locally

Use Node.js 22 or later and npm. From the project directory:

npm install
npm run dev

Open the local URL printed by Vite. Local mode works without AWS configuration and stores data in this browser. Clearing site data removes local records/photos; local storage is not shared across devices.

npm test
npm --prefix backend install
npm run test:backend
npm run build
npm run preview

These are commands for reproducing the checks, not a claim that a cloud deployment has passed them.

For website-only AWS deployment, run npm run package:aws. It creates ready-to-upload Lambda, CloudFormation, and Amplify files in .artifacts/aws/. Follow the console deployment steps. Rebuild the frontend after setting the real AWS identifiers.

Collect only what is available

Field What to record
Date and waste kg Copy the mess's posted figure and attach its source photo when available.
Menu The food served during the period covered by the figure.
Coverage and scope Which meals are included; plate waste, kitchen waste, combined waste, or unconfirmed.
Attendance, optional Meals served during the same covered meals. Leave blank if only enrolment is known.
Plate photos, optional Friends' consented photos and feedback. Three photos are examples, not a representative survey.
Action A proposed change, its status, and a follow-up note.

Attendance is optional. Grams per meal served is waste kg × 1000 ÷ meal servings; registered students are a different denominator and must not be entered as meals served. Missing attendance suppresses the per-meal metric. Compare measurements only when their coverage and scope match.

Linked weekly menu

The user-supplied Tikmit menu for 5–11 October 2026, labelled Food Court 2, is included as a dated snapshot in src/data/weekly-menu.json. New daily entries fill breakfast, lunch, snacks, and dinner for the selected date. Check actual service and edit substitutions. Date changes update untouched fields; edited fields and existing saved menus are preserved. Use published menu explicitly replaces the four menu fields. Dates outside this week get no imported dishes, and the snapshot does not refresh automatically.

The plate-pair form offers menu choices for its selected date and meal, with listed alternatives separated. Nothing is preselected: choose only the dishes actually served on that plate, up to eight, or enter substitutions manually. Menus never create waste measurements or plate observations. The source URL, data URL, retrieval time, and bundle generation time are retained with the snapshot. The menu provider is credited in THIRD_PARTY_NOTICES.md.

Daily waste cannot be attributed to a particular dish from a daily menu alone. A before/after change is an observation, not evidence that an action caused a reduction. The app does not calculate money, carbon, compost, or biogas savings from unverified factors. Recording amounts and reasons is consistent with EPA food-waste assessment guidance.

Optional plate pilot

Plate pilot stores before/after photo pairs separately from daily measurements. Two people rate each served dish in quarter steps (or "cannot assess") before an optional Amazon Bedrock request. Human ratings are locked, the model receives no human scores or student feedback, and a second run checks repeatability. The evaluation reports plate and dish counts, exact/within-step agreement, and excluded unclear observations. Local mode supports the collection and human-review flow; Bedrock requires the AWS deployment.

Start with five pairs. See the pilot protocol and evaluation guide. Scores are experimental visual estimates and do not produce grams. JSON exports contain ratings and model provenance; image files are separate.

AWS path

The live application uses Amplify Hosting and the backend shown below in us-east-1. The repository also includes the template and instructions for deploying your own private workspace. Local mode does not demonstrate AWS use.

flowchart LR
  Browser[React app / Amplify Hosting] --> Cognito[Amazon Cognito sign-in]
  Browser --> API[API Gateway HTTP API]
  API --> Lambda[AWS Lambda]
  Lambda --> DB[DynamoDB records]
  Lambda --> S3[Private S3 photo bucket]
  Browser -->|Presigned photo upload| S3
  Lambda --> Logs[CloudWatch logs]
  Lambda -->|Optional paired-photo scoring| Bedrock[Amazon Bedrock / Nova Lite]
Loading

The backend uses Node.js 22. Cognito restricts account creation to administrators; API requests are authenticated and each user's data is isolated. Photos use short-lived signed access. See AWS deployment for setup and validation.

Copy .env.example to .env.local and fill the three public frontend configuration values only when the backend has been deployed. Restart Vite after changes, or rebuild before hosting. Never put AWS access keys or passwords into a VITE_ variable.

Submission materials

Replace submission placeholders with verified facts. Keep a real repository history of work completed during the event. The owner has not yet selected a licence for the original project code; dependency licences are recorded separately.

About

Campus mess food-waste tracking with daily measurements, photo evidence, action follow-up, and an AWS serverless backend.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages