# shawnmm777/anpanweb architecture

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

- Interactive diagram: https://gitdiagram.com/shawnmm777/anpanweb
- Repository: https://github.com/shawnmm777/anpanweb

## Overview

This is a travel-planning and booking web application: users enter through a home page, can explore city routes on an interactive map, manage an account, and reach booking and payment screens. The backend provides signup/login and payment endpoints, with MySQL-backed account operations and email notifications. The README gives only run instructions, so the map reflects the sampled frontend routing and backend calls; several frontend-to-backend links and the payment database wiring are not established by the excerpts.

Main entry points: [`src/App.js`](https://github.com/shawnmm777/anpanweb/blob/main/src/App.js) (App router), [`BACKEND/auth/signupauth.js`](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/auth/signupauth.js) (Signup API), [`BACKEND/server.js`](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/server.js) (Express server), [`BACKEND/auth/loginauth.js`](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/auth/loginauth.js) (Login and reset API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Travel frontend"]
  node_app["App router<br/>[App.js]"]
  node_home["Home<br/>[Homepage.js]"]
  node_login["Login<br/>[Login.js]"]
  node_signup["Signup<br/>[Signup.js]"]
  node_forgot["Forgot password<br/>[forgotpassword.js]"]
  node_reset["Reset password<br/>[resetpassword.js]"]
  node_map["Route planner<br/>[MapRouter.js]"]
  node_account["Account<br/>[account.js]"]
  node_booking["Booking<br/>[booking.js]"]
  node_drafts["Drafts<br/>[Drafts.js]"]
  node_second["Second page<br/>[second.js]"]
end

subgraph group_identity["Identity and email"]
  node_server["Express server<br/>[server.js]"]
  node_signup_api["Signup API<br/>[signupauth.js]"]
  node_login_api["Login and reset API<br/>[loginauth.js]"]
  node_admin_api["Admin auth<br/>[adminauth.js]"]
  node_user_db[("User database<br/>[db.js]")]
  node_email["Email service<br/>[emailService.js]"]
end

subgraph group_payments["Payments"]
  node_payment_ui["Payment form<br/>[payment.js]"]
  node_confirmation["Payment confirmation"]
  node_payment_api["Payment API<br/>[payments.js]"]
  node_payment_controller["Payment controller"]
  node_payment_store[("Payment store")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_signup
node_app -->|"routes to"| node_forgot
node_app -->|"routes to"| node_reset
node_app -->|"routes to"| node_map
node_app -->|"routes to"| node_account
node_app -->|"routes to"| node_booking
node_app -->|"routes to"| node_drafts
node_app -->|"routes to"| node_second
node_app -->|"routes to"| node_payment_ui
node_app -->|"routes to"| node_confirmation
node_signup -->|"posts signup"| node_signup_api
node_server -->|"mounts"| node_signup_api
node_server -->|"mounts"| node_login_api
node_server -->|"mounts"| node_payment_api
node_signup_api -->|"queries"| node_user_db
node_signup_api -->|"sends welcome"| node_email
node_login_api -->|"queries"| node_user_db
node_login_api -->|"sends reset"| node_email
node_payment_ui -->|"posts payment"| node_payment_api
node_payment_api -.->|"queries"| node_payment_store

click node_app "https://github.com/shawnmm777/anpanweb/blob/main/src/App.js"
click node_home "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/Homepage.js"
click node_login "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/Login.js"
click node_signup "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/Signup.js"
click node_forgot "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/forgotpassword.js"
click node_reset "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/resetpassword.js"
click node_map "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/MapRouter.js"
click node_account "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/account.js"
click node_booking "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/booking.js"
click node_drafts "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/Drafts.js"
click node_second "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/second.js"
click node_payment_ui "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/payment.js"
click node_confirmation "https://github.com/shawnmm777/anpanweb/blob/main/src/Components/paymentConfimation.js"
click node_server "https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/server.js"
click node_signup_api "https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/auth/signupauth.js"
click node_login_api "https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/auth/loginauth.js"
click node_admin_api "https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/auth/adminauth.js"
click node_user_db "https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/db.js"
click node_email "https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/emailService.js"
click node_payment_api "https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/routes/payments.js"
click node_payment_controller "https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/controllers/paymentController.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_home,node_login,node_signup,node_forgot,node_reset,node_map,node_account,node_booking,node_drafts,node_second toneBlue
class node_server,node_signup_api,node_login_api,node_admin_api,node_user_db,node_email toneAmber
class node_payment_ui,node_confirmation,node_payment_api,node_payment_controller,node_payment_store toneMint
class node_visitor toneIndigo
```

## Components

### Travel frontend

- [App router](https://github.com/shawnmm777/anpanweb/blob/main/src/App.js): `src/App.js`
- [Home](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/Homepage.js): `src/Components/Homepage.js`
- [Login](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/Login.js): `src/Components/Login.js`
- [Signup](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/Signup.js): `src/Components/Signup.js`
- [Forgot password](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/forgotpassword.js): `src/Components/forgotpassword.js`
- [Reset password](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/resetpassword.js): `src/Components/resetpassword.js`
- [Route planner](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/MapRouter.js): `src/Components/MapRouter.js`
- [Account](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/account.js): `src/Components/account.js`
- [Booking](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/booking.js): `src/Components/booking.js`
- [Drafts](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/Drafts.js): `src/Components/Drafts.js`
- [Second page](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/second.js): `src/Components/second.js`

### Identity and email

- [Express server](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/server.js): `BACKEND/server.js`
- [Signup API](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/auth/signupauth.js): `BACKEND/auth/signupauth.js`
- [Login and reset API](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/auth/loginauth.js): `BACKEND/auth/loginauth.js`
- [Admin auth](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/auth/adminauth.js): `BACKEND/auth/adminauth.js`
- [User database](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/db.js): `BACKEND/db.js`
- [Email service](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/emailService.js): `BACKEND/emailService.js`

### Payments

- [Payment form](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/payment.js): `src/Components/payment.js`
- [Payment confirmation](https://github.com/shawnmm777/anpanweb/blob/main/src/Components/paymentConfimation.js): `src/Components/paymentConfimation.js`
- [Payment API](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/routes/payments.js): `BACKEND/routes/payments.js`
- [Payment controller](https://github.com/shawnmm777/anpanweb/blob/main/BACKEND/controllers/paymentController.js): `BACKEND/controllers/paymentController.js`
- **Payment store**

### Other components

- **Visitor**

## Connections

- Visitor → App router: opens (evidence: `src/App.js`)
- App router → Home: routes to (evidence: `src/App.js`)
- App router → Login: routes to (evidence: `src/App.js`)
- App router → Signup: routes to (evidence: `src/App.js`)
- App router → Forgot password: routes to (evidence: `src/App.js`)
- App router → Reset password: routes to (evidence: `src/App.js`)
- App router → Route planner: routes to (evidence: `src/App.js`)
- App router → Account: routes to (evidence: `src/App.js`)
- App router → Booking: routes to (evidence: `src/App.js`)
- App router → Drafts: routes to (evidence: `src/App.js`)
- App router → Second page: routes to (evidence: `src/App.js`)
- App router → Payment form: routes to (evidence: `src/App.js`)
- App router → Payment confirmation: routes to (evidence: `src/App.js`)
- Signup → Signup API: posts signup (evidence: `src/Components/Signup.js`)
- Express server → Signup API: mounts (evidence: `BACKEND/server.js`)
- Express server → Login and reset API: mounts (evidence: `BACKEND/server.js`)
- Express server → Payment API: mounts (evidence: `BACKEND/server.js`)
- Signup API → User database: queries (evidence: `BACKEND/auth/signupauth.js`)
- Signup API → Email service: sends welcome (evidence: `BACKEND/auth/signupauth.js`)
- Login and reset API → User database: queries (evidence: `BACKEND/auth/loginauth.js`)
- Login and reset API → Email service: sends reset (evidence: `BACKEND/auth/loginauth.js`)
- Payment form → Payment API: posts payment (evidence: `src/Components/payment.js`)
- Payment API → Payment store: queries
