# autesjesus/canteen architecture

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

- Interactive diagram: https://gitdiagram.com/autesjesus/canteen
- Repository: https://github.com/autesjesus/canteen

## Overview

EVSU Canteen is a React Native canteen app with a small Express/MySQL backend. The visible user journey starts at login, proceeds to the student dashboard on success, and branches to signup or password recovery; recovery verifies an emailed OTP before resetting the password. The README provides no additional product detail. The dashboard’s vendor request and signup’s server address do not match a route or port shown in the sampled backend, so those links are marked unverified; reset-password implementation was not sampled.

Main entry points: [`App.js`](https://github.com/autesjesus/canteen/blob/main/App.js) (Navigation app), [`server.js`](https://github.com/autesjesus/canteen/blob/main/server.js) (Express API), [`EVSU_Canteen_Login.js`](https://github.com/autesjesus/canteen/blob/main/EVSU_Canteen_Login.js) (Login), [`EVSU_Canteen_Signup.js`](https://github.com/autesjesus/canteen/blob/main/EVSU_Canteen_Signup.js) (Signup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile app"]
  node_app["Navigation app<br/>[App.js]"]
  node_login["Login"]
  node_signup["Signup"]
  node_dashboard["Student dashboard"]
end

subgraph group_recovery["Password recovery"]
  node_forgot["Forgot password"]
  node_otp["OTP verification<br/>[VerifyOTP.js]"]
  node_reset["Password reset<br/>[resetpassword.js]"]
end

subgraph group_backend["Backend services"]
  node_server["Express API<br/>[server.js]"]
  node_mysql[("MySQL database")]
end

subgraph group_integrations["External integrations"]
  node_emailjs["EmailJS service"]
  node_gmail["Gmail SMTP"]
end

node_student(("Student"))

node_student -->|"opens"| node_app
node_app -->|"registers"| node_login
node_app -->|"registers"| node_signup
node_app -->|"registers"| node_forgot
node_app -->|"registers"| node_otp
node_app -->|"registers"| node_reset
node_app -->|"registers"| node_dashboard
node_login -->|"posts login"| node_server
node_login -->|"checks status"| node_server
node_login -->|"navigates on success"| node_dashboard
node_signup -.->|"posts signup"| node_server
node_signup -->|"returns on success"| node_login
node_dashboard -.->|"requests vendors"| node_server
node_forgot -->|"sends OTP email"| node_emailjs
node_forgot -->|"passes OTP"| node_otp
node_otp -->|"navigates on match"| node_reset
node_server -->|"queries users"| node_mysql
node_server -->|"sends OTP email"| node_gmail

click node_app "https://github.com/autesjesus/canteen/blob/main/App.js"
click node_login "https://github.com/autesjesus/canteen/blob/main/EVSU_Canteen_Login.js"
click node_signup "https://github.com/autesjesus/canteen/blob/main/EVSU_Canteen_Signup.js"
click node_dashboard "https://github.com/autesjesus/canteen/blob/main/EVSU_Student_DashBoard.js"
click node_forgot "https://github.com/autesjesus/canteen/blob/main/EVSU_Canteen_Forgot.js"
click node_otp "https://github.com/autesjesus/canteen/blob/main/VerifyOTP.js"
click node_reset "https://github.com/autesjesus/canteen/blob/main/resetpassword.js"
click node_server "https://github.com/autesjesus/canteen/blob/main/server.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_app,node_login,node_signup,node_dashboard toneBlue
class node_forgot,node_otp,node_reset toneAmber
class node_server,node_mysql toneMint
class node_emailjs,node_gmail toneRose
class node_student toneIndigo
```

## Components

### Mobile app

- [Navigation app](https://github.com/autesjesus/canteen/blob/main/App.js): `App.js`
- [Login](https://github.com/autesjesus/canteen/blob/main/EVSU_Canteen_Login.js): `EVSU_Canteen_Login.js`
- [Signup](https://github.com/autesjesus/canteen/blob/main/EVSU_Canteen_Signup.js): `EVSU_Canteen_Signup.js`
- [Student dashboard](https://github.com/autesjesus/canteen/blob/main/EVSU_Student_DashBoard.js): `EVSU_Student_DashBoard.js`

### Password recovery

- [Forgot password](https://github.com/autesjesus/canteen/blob/main/EVSU_Canteen_Forgot.js): `EVSU_Canteen_Forgot.js`
- [OTP verification](https://github.com/autesjesus/canteen/blob/main/VerifyOTP.js): `VerifyOTP.js`
- [Password reset](https://github.com/autesjesus/canteen/blob/main/resetpassword.js): `resetpassword.js`

### Backend services

- [Express API](https://github.com/autesjesus/canteen/blob/main/server.js): `server.js`
- **MySQL database**

### External integrations

- **EmailJS service**
- **Gmail SMTP**

### Other components

- **Student**

## Connections

- Student → Navigation app: opens
- Navigation app → Login: registers (evidence: `App.js`)
- Navigation app → Signup: registers (evidence: `App.js`)
- Navigation app → Forgot password: registers (evidence: `App.js`)
- Navigation app → OTP verification: registers (evidence: `App.js`)
- Navigation app → Password reset: registers (evidence: `App.js`)
- Navigation app → Student dashboard: registers (evidence: `App.js`)
- Login → Express API: posts login (evidence: `EVSU_Canteen_Login.js`)
- Login → Express API: checks status (evidence: `EVSU_Canteen_Login.js`)
- Login → Student dashboard: navigates on success (evidence: `EVSU_Canteen_Login.js`)
- Signup → Express API: posts signup
- Signup → Login: returns on success (evidence: `EVSU_Canteen_Signup.js`)
- Student dashboard → Express API: requests vendors
- Forgot password → EmailJS service: sends OTP email (evidence: `EVSU_Canteen_Forgot.js`)
- Forgot password → OTP verification: passes OTP (evidence: `EVSU_Canteen_Forgot.js`)
- OTP verification → Password reset: navigates on match (evidence: `VerifyOTP.js`)
- Express API → MySQL database: queries users (evidence: `server.js`)
- Express API → Gmail SMTP: sends OTP email (evidence: `server.js`)
