# sandeepreddy2488-alt/messmate architecture

> Architecture diagram of the GitHub repository sandeepreddy2488-alt/messmate, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sandeepreddy2488-alt/messmate
- Repository: https://github.com/sandeepreddy2488-alt/messmate

## Overview

MessMate manages hostel-mess operations through a React student/admin interface and a Django REST API: users view menus and operational information, submit feedback or complaints, and administrators manage records and dashboard metrics. The README describes PostgreSQL with SQLite fallback; the sampled Django settings confirm that configuration. The tree also contains a separate Express/SQLite implementation. The React API client targets Django, while the sampled legacy client wiring is incomplete, so those implementations are shown separately rather than as one connected request path.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/App.jsx) (React app), [`frontend/src/api/client.js`](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/api/client.js) (API client), [`frontend/src/pages/AdminDashboard.jsx`](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/AdminDashboard.jsx) (Admin dashboard), [`backend/mess/views.py`](https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/mess/views.py) (API handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React application"]
  node_react["React app<br/>[App.jsx]"]
  node_auth["User session<br/>[AuthContext.jsx]"]
  node_api_client["API client<br/>[client.js]"]
end

subgraph group_operations["Mess operations"]
  node_menu_pages["Menu pages<br/>[TodayMenu.jsx]"]
  node_student_dashboard["Student dashboard"]
  node_feedback_page["Food feedback"]
  node_complaints_page["Mess complaints<br/>[Complaints.jsx]"]
  node_chef_pages["Chef feedback<br/>[ChefReviews.jsx]"]
  node_admin_dashboard["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_admin_management["Admin management<br/>[ManageMenu.jsx]"]
end

subgraph group_api["Django REST API"]
  node_django_routes["API routes<br/>[urls.py]"]
  node_django_views["API handlers<br/>[views.py]"]
  node_serializers["Data serializers<br/>[serializers.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_django_config["Database configuration<br/>[settings.py]"]
  node_relational_db[("Django database")]
end

subgraph group_legacy["Legacy Express API"]
  node_legacy_js["Legacy browser client<br/>[api.js]"]
  node_legacy_server["Express API<br/>[server.js]"]
  node_legacy_db[("SQLite database<br/>[db.js]")]
end

node_student(("Student"))
node_admin(("Administrator"))

node_student -->|"uses"| node_react
node_admin -->|"uses"| node_react
node_react -->|"provides session"| node_auth
node_react -->|"routes to"| node_menu_pages
node_react -->|"routes to"| node_student_dashboard
node_react -->|"routes to"| node_feedback_page
node_react -->|"routes to"| node_complaints_page
node_react -->|"routes to"| node_chef_pages
node_react -->|"routes to"| node_admin_dashboard
node_admin_dashboard -->|"renders"| node_admin_management
node_menu_pages -->|"requests menus"| node_api_client
node_student_dashboard -->|"requests data"| node_api_client
node_feedback_page -->|"submits feedback"| node_api_client
node_complaints_page -->|"submits complaints"| node_api_client
node_chef_pages -->|"requests reviews"| node_api_client
node_admin_dashboard -->|"requests metrics"| node_api_client
node_admin_management -->|"manages records"| node_api_client
node_api_client -->|"sends HTTP requests"| node_django_routes
node_django_routes -->|"dispatches"| node_django_views
node_django_views -->|"uses"| node_serializers
node_django_views -->|"queries"| node_models
node_django_config -->|"configures"| node_relational_db
node_models -->|"persists records"| node_relational_db
node_legacy_js -.->|"calls API"| node_legacy_server
node_legacy_server -->|"reads and writes"| node_legacy_db

click node_react "https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/App.jsx"
click node_auth "https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/context/AuthContext.jsx"
click node_api_client "https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/api/client.js"
click node_menu_pages "https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/TodayMenu.jsx"
click node_student_dashboard "https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/StudentDashboard.jsx"
click node_feedback_page "https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/FoodRatingFeedback.jsx"
click node_complaints_page "https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/Complaints.jsx"
click node_chef_pages "https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/ChefReviews.jsx"
click node_admin_dashboard "https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/AdminDashboard.jsx"
click node_admin_management "https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/components/ManageMenu.jsx"
click node_django_routes "https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/mess/urls.py"
click node_django_views "https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/mess/views.py"
click node_serializers "https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/mess/serializers.py"
click node_models "https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/mess/models.py"
click node_django_config "https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/messmate_core/settings.py"
click node_legacy_js "https://github.com/sandeepreddy2488-alt/messmate/blob/main/js/api.js"
click node_legacy_server "https://github.com/sandeepreddy2488-alt/messmate/blob/main/server.js"
click node_legacy_db "https://github.com/sandeepreddy2488-alt/messmate/blob/main/database/db.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_react,node_auth,node_api_client toneBlue
class node_menu_pages,node_student_dashboard,node_feedback_page,node_complaints_page,node_chef_pages,node_admin_dashboard,node_admin_management toneAmber
class node_django_routes,node_django_views,node_serializers,node_models,node_django_config,node_relational_db toneMint
class node_legacy_js,node_legacy_server,node_legacy_db toneRose
class node_student,node_admin toneIndigo
```

## Components

### React application

- [React app](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [User session](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### Mess operations

- [Menu pages](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/TodayMenu.jsx): `frontend/src/pages/TodayMenu.jsx`
- [Student dashboard](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/StudentDashboard.jsx): `frontend/src/pages/StudentDashboard.jsx`
- [Food feedback](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/FoodRatingFeedback.jsx): `frontend/src/pages/FoodRatingFeedback.jsx`
- [Mess complaints](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/Complaints.jsx): `frontend/src/pages/Complaints.jsx`
- [Chef feedback](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/ChefReviews.jsx): `frontend/src/pages/ChefReviews.jsx`
- [Admin dashboard](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`
- [Admin management](https://github.com/sandeepreddy2488-alt/messmate/blob/main/frontend/src/components/ManageMenu.jsx): `frontend/src/components/ManageMenu.jsx`

### Django REST API

- [API routes](https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/mess/urls.py): `backend/mess/urls.py`
- [API handlers](https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/mess/views.py): `backend/mess/views.py`
- [Data serializers](https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/mess/serializers.py): `backend/mess/serializers.py`
- [Domain models](https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/mess/models.py): `backend/mess/models.py`
- [Database configuration](https://github.com/sandeepreddy2488-alt/messmate/blob/main/backend/messmate_core/settings.py): `backend/messmate_core/settings.py`
- **Django database**

### Legacy Express API

- [Legacy browser client](https://github.com/sandeepreddy2488-alt/messmate/blob/main/js/api.js): `js/api.js`
- [Express API](https://github.com/sandeepreddy2488-alt/messmate/blob/main/server.js): `server.js`
- [SQLite database](https://github.com/sandeepreddy2488-alt/messmate/blob/main/database/db.js): `database/db.js`

### Other components

- **Student**
- **Administrator**

## Connections

- Student → React app: uses
- Administrator → React app: uses
- React app → User session: provides session
- React app → Menu pages: routes to
- React app → Student dashboard: routes to
- React app → Food feedback: routes to
- React app → Mess complaints: routes to
- React app → Chef feedback: routes to
- React app → Admin dashboard: routes to
- Admin dashboard → Admin management: renders
- Menu pages → API client: requests menus
- Student dashboard → API client: requests data
- Food feedback → API client: submits feedback
- Mess complaints → API client: submits complaints
- Chef feedback → API client: requests reviews
- Admin dashboard → API client: requests metrics
- Admin management → API client: manages records
- API client → API routes: sends HTTP requests
- API routes → API handlers: dispatches
- API handlers → Data serializers: uses
- API handlers → Domain models: queries
- Database configuration → Django database: configures
- Domain models → Django database: persists records
- Legacy browser client → Express API: calls API
- Express API → SQLite database: reads and writes
