# ayoonb-star/dbms-final-2026-labadahub architecture

> Architecture diagram of the GitHub repository ayoonb-star/dbms-final-2026-labadahub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ayoonb-star/dbms-final-2026-labadahub
- Repository: https://github.com/ayoonb-star/dbms-final-2026-labadahub

## Overview

This repository contains a laundry-service backend for account access, service and time-slot browsing, customer bookings, and staff order-status updates, alongside a mobile Expo starter UI. The backend routes are mounted by the Express app and query a MySQL pool; order booking also generates a QR code. The README provides no capability details, and the sampled mobile screens show no API integration, so the mobile UI is shown separately rather than connected to backend results. Relationships below are limited to source-index references and shown calls.

Main entry points: [`backend/src/config/db.js`](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/config/db.js) (MySQL pool), [`backend/src/app.js`](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/app.js) (Express API), [`backend/src/routes/orders.js`](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/routes/orders.js) (Order handling), [`mobile/src/components/app-tabs.web.tsx`](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/components/app-tabs.web.tsx) (Web tab navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API runtime"]
  node_app["Express API<br/>[app.js]"]
  node_dbpool["MySQL pool<br/>[db.js]"]
  node_seed["Initial data seeding<br/>[seed.js]"]
end

subgraph group_identity["Identity and access"]
  node_authroutes["Account routes<br/>[auth.js]"]
  node_authmw["JWT and roles<br/>[auth.js]"]
end

subgraph group_catalog["Services and slots"]
  node_services["Services and slots<br/>[services.js]"]
end

subgraph group_orders["Order lifecycle"]
  node_orders["Order handling<br/>[orders.js]"]
end

subgraph group_mobile["Mobile starter UI"]
  node_mobileapp["Home and explore screens"]
  node_mobilelayout["Router layout<br/>[_layout.tsx]"]
  node_mobiletabs["Web tab navigation<br/>[app-tabs.web.tsx]"]
  node_themedtext["Themed text<br/>[themed-text.tsx]"]
  node_themedview["Themed view<br/>[themed-view.tsx]"]
  node_externallink["External link<br/>[external-link.tsx]"]
end

node_client(("API client"))
node_mysql[("MySQL database")]
node_qr["QR code generator"]

node_client -->|"sends requests"| node_app
node_app -->|"mounts routes"| node_authroutes
node_app -->|"mounts routes"| node_services
node_app -->|"mounts routes"| node_orders
node_authroutes -->|"queries"| node_dbpool
node_services -->|"queries"| node_dbpool
node_services -->|"checks access"| node_authmw
node_orders -->|"queries"| node_dbpool
node_orders -->|"checks access"| node_authmw
node_dbpool -->|"opens pool"| node_mysql
node_seed -->|"inserts seed data"| node_dbpool
node_orders -->|"generates QR"| node_qr
node_mobilelayout -.->|"hosts screens"| node_mobileapp
node_mobiletabs -->|"renders"| node_themedtext
node_mobiletabs -->|"renders"| node_themedview
node_mobiletabs -->|"renders"| node_externallink

click node_app "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/app.js"
click node_authroutes "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/routes/auth.js"
click node_authmw "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/middleware/auth.js"
click node_services "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/routes/services.js"
click node_orders "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/routes/orders.js"
click node_dbpool "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/config/db.js"
click node_seed "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/seed.js"
click node_mobileapp "https://github.com/ayoonb-star/dbms-final-2026-labadahub/tree/main/mobile/src/app"
click node_mobilelayout "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/app/_layout.tsx"
click node_mobiletabs "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/components/app-tabs.web.tsx"
click node_themedtext "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/components/themed-text.tsx"
click node_themedview "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/components/themed-view.tsx"
click node_externallink "https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/components/external-link.tsx"

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_dbpool,node_seed,node_client toneBlue
class node_authroutes,node_authmw,node_mysql toneAmber
class node_services toneMint
class node_orders toneRose
class node_mobileapp,node_mobilelayout,node_mobiletabs,node_themedtext,node_themedview,node_externallink,node_qr toneIndigo
```

## Components

### API runtime

- [Express API](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/app.js): `backend/src/app.js`
- [MySQL pool](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/config/db.js): `backend/src/config/db.js`
- [Initial data seeding](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/seed.js): `backend/src/seed.js`

### Identity and access

- [Account routes](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/routes/auth.js): `backend/src/routes/auth.js`
- [JWT and roles](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/middleware/auth.js): `backend/src/middleware/auth.js`

### Services and slots

- [Services and slots](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/routes/services.js): `backend/src/routes/services.js`

### Order lifecycle

- [Order handling](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/backend/src/routes/orders.js): `backend/src/routes/orders.js`

### Mobile starter UI

- [Home and explore screens](https://github.com/ayoonb-star/dbms-final-2026-labadahub/tree/main/mobile/src/app): `mobile/src/app`
- [Router layout](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/app/_layout.tsx): `mobile/src/app/_layout.tsx`
- [Web tab navigation](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/components/app-tabs.web.tsx): `mobile/src/components/app-tabs.web.tsx`
- [Themed text](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/components/themed-text.tsx): `mobile/src/components/themed-text.tsx`
- [Themed view](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/components/themed-view.tsx): `mobile/src/components/themed-view.tsx`
- [External link](https://github.com/ayoonb-star/dbms-final-2026-labadahub/blob/main/mobile/src/components/external-link.tsx): `mobile/src/components/external-link.tsx`

### Other components

- **API client**
- **MySQL database**
- **QR code generator**

## Connections

- API client → Express API: sends requests (evidence: `backend/src/app.js`)
- Express API → Account routes: mounts routes (evidence: `backend/src/app.js`)
- Express API → Services and slots: mounts routes (evidence: `backend/src/app.js`)
- Express API → Order handling: mounts routes (evidence: `backend/src/app.js`)
- Account routes → MySQL pool: queries (evidence: `backend/src/routes/auth.js`)
- Services and slots → MySQL pool: queries (evidence: `backend/src/routes/services.js`)
- Services and slots → JWT and roles: checks access (evidence: `backend/src/routes/services.js`)
- Order handling → MySQL pool: queries (evidence: `backend/src/routes/orders.js`)
- Order handling → JWT and roles: checks access (evidence: `backend/src/routes/orders.js`)
- MySQL pool → MySQL database: opens pool (evidence: `backend/src/config/db.js`)
- Initial data seeding → MySQL pool: inserts seed data (evidence: `backend/src/seed.js`)
- Order handling → QR code generator: generates QR (evidence: `backend/src/routes/orders.js`)
- Router layout → Home and explore screens: hosts screens
- Web tab navigation → Themed text: renders (evidence: `mobile/src/components/app-tabs.web.tsx`)
- Web tab navigation → Themed view: renders (evidence: `mobile/src/components/app-tabs.web.tsx`)
- Web tab navigation → External link: renders (evidence: `mobile/src/components/app-tabs.web.tsx`)
