# tanishqsoni0/skipbin architecture

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

- Interactive diagram: https://gitdiagram.com/tanishqsoni0/skipbin
- Repository: https://github.com/tanishqsoni0/skipbin

## Overview

Jerry’s Bins is a skip-bin hire and booking service with a customer-facing website and an admin operations console. Customers browse hire options, obtain pricing and submit bookings; account access, payment, and invoice/account functions support that journey. Administrators manage bookings, scheduling, customers, and catalogue data. The graph combines sampled route/service behavior with the frontend routes and product areas listed in the tree; unsampled capability links are omitted where their runtime wiring is not evidenced.

Main entry points: [`backend/app.py`](https://github.com/tanishqsoni0/skipbin/blob/main/backend/app.py) (Flask app and routes), [`backend/database/db.py`](https://github.com/tanishqsoni0/skipbin/blob/main/backend/database/db.py) (MySQL persistence), [`backend/routes/admin_auth_routes.py`](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/admin_auth_routes.py) (Admin authentication), [`backend/routes/booking_routes.py`](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/booking_routes.py) (Booking and invoices)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Customer website"]
  node_frontend["Web app routing<br/>[App.jsx]"]
  node_booking_ui["Booking experience<br/>[BookingWebsite.jsx]"]
  node_account_ui["Account and invoices<br/>[MyAccount.jsx]"]
end

subgraph group_auth["Identity and access"]
  node_auth_ui["Customer auth client<br/>[authService.js]"]
  node_auth_routes["Customer authentication<br/>[auth_routes.py]"]
  node_admin_auth["Admin authentication"]
  node_admin_guard["Admin access guard<br/>[decorators.py]"]
end

subgraph group_booking["Hire and payment"]
  node_booking_routes["Booking and invoices<br/>[booking_routes.py]"]
  node_pricing["Pricing and loyalty<br/>[pricing_service.py]"]
  node_paypal_routes["PayPal checkout<br/>[paypal_routes.py]"]
  node_paypal_service["PayPal integration<br/>[paypal_service.py]"]
  node_postcode["Postcode services"]
end

subgraph group_ops["Admin operations"]
  node_admin_ui["Admin console<br/>[Dashboard.jsx]"]
  node_customer_ops["Customer management<br/>[customer_routes.py]"]
  node_calendar_ops["Scheduling calendar<br/>[calendar_routes.py]"]
  node_catalog_ops["Hire catalogue<br/>[bin_routes.py]"]
  node_waste_ops["Waste types<br/>[waste_routes.py]"]
  node_promotion_ops["Promotions"]
  node_commercial_ops["Commercial quotes"]
end

subgraph group_core["Backend foundation"]
  node_api_client["API client<br/>[api.js]"]
  node_app["Flask app and routes<br/>[app.py]"]
  node_db[("MySQL persistence<br/>[db.py]")]
  node_validation["Input validation<br/>[validators.py]"]
  node_async["Async tasks<br/>[async_tasks.py]"]
  node_metrics["Metrics<br/>[metrics_service.py]"]
end

node_customer(("Customer"))

node_customer -->|"uses"| node_frontend
node_frontend -->|"routes to"| node_booking_ui
node_frontend -->|"routes to"| node_account_ui
node_booking_ui -.->|"requests"| node_api_client
node_account_ui -->|"uses"| node_auth_ui
node_account_ui -->|"requests"| node_api_client
node_auth_ui -->|"requests"| node_api_client
node_api_client -.->|"calls API"| node_app
node_app -->|"registers"| node_auth_routes
node_app -->|"registers"| node_booking_routes
node_app -->|"registers"| node_admin_auth
node_app -->|"registers"| node_paypal_routes
node_app -->|"registers"| node_customer_ops
node_app -->|"registers"| node_calendar_ops
node_app -->|"registers"| node_catalog_ops
node_app -->|"registers"| node_waste_ops
node_app -->|"registers"| node_promotion_ops
node_app -->|"registers"| node_commercial_ops
node_auth_routes -->|"reads/writes"| node_db
node_admin_auth -->|"reads/writes"| node_db
node_admin_auth -->|"queues email"| node_async
node_admin_auth -->|"uses"| node_admin_guard
node_booking_routes -->|"calculates price"| node_pricing
node_booking_routes -->|"reads/writes"| node_db
node_pricing -->|"reads pricing"| node_db
node_pricing -->|"gets delivery charge"| node_postcode
node_paypal_routes -->|"calculates price"| node_pricing
node_paypal_routes -->|"payment operations"| node_paypal_service
node_paypal_routes -->|"reads/writes"| node_db
node_customer_ops -->|"reads/writes"| node_db
node_calendar_ops -->|"reads/writes"| node_db
node_catalog_ops -->|"reads/writes"| node_db
node_waste_ops -->|"reads/writes"| node_db
node_promotion_ops -->|"reads/writes"| node_db
node_commercial_ops -->|"reads/writes"| node_db
node_customer_ops -->|"validates"| node_validation
node_booking_routes -->|"validates"| node_validation
node_app -->|"initializes"| node_metrics
node_customer -.->|"admin use"| node_admin_ui

click node_frontend "https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/App.jsx"
click node_booking_ui "https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/pages/BookingWebsite.jsx"
click node_account_ui "https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/pages/MyAccount.jsx"
click node_auth_ui "https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/services/authService.js"
click node_api_client "https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/services/api.js"
click node_auth_routes "https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/auth_routes.py"
click node_admin_auth "https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/admin_auth_routes.py"
click node_admin_guard "https://github.com/tanishqsoni0/skipbin/blob/main/backend/utils/decorators.py"
click node_booking_routes "https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/booking_routes.py"
click node_pricing "https://github.com/tanishqsoni0/skipbin/blob/main/backend/services/pricing_service.py"
click node_paypal_routes "https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/paypal_routes.py"
click node_paypal_service "https://github.com/tanishqsoni0/skipbin/blob/main/backend/services/paypal_service.py"
click node_admin_ui "https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/pages/Dashboard.jsx"
click node_customer_ops "https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/customer_routes.py"
click node_calendar_ops "https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/calendar_routes.py"
click node_catalog_ops "https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/bin_routes.py"
click node_waste_ops "https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/waste_routes.py"
click node_promotion_ops "https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/promotion_routes.py"
click node_commercial_ops "https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/commercial_quote_routes.py"
click node_postcode "https://github.com/tanishqsoni0/skipbin/blob/main/backend/services/postcode_service.py"
click node_app "https://github.com/tanishqsoni0/skipbin/blob/main/backend/app.py"
click node_db "https://github.com/tanishqsoni0/skipbin/blob/main/backend/database/db.py"
click node_validation "https://github.com/tanishqsoni0/skipbin/blob/main/backend/utils/validators.py"
click node_async "https://github.com/tanishqsoni0/skipbin/blob/main/backend/services/async_tasks.py"
click node_metrics "https://github.com/tanishqsoni0/skipbin/blob/main/backend/services/metrics_service.py"

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_frontend,node_booking_ui,node_account_ui toneBlue
class node_auth_ui,node_auth_routes,node_admin_auth,node_admin_guard toneAmber
class node_booking_routes,node_pricing,node_paypal_routes,node_paypal_service,node_postcode toneMint
class node_admin_ui,node_customer_ops,node_calendar_ops,node_catalog_ops,node_waste_ops,node_promotion_ops,node_commercial_ops toneRose
class node_api_client,node_app,node_db,node_validation,node_async,node_metrics,node_customer toneIndigo
```

## Components

### Customer website

- [Web app routing](https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Booking experience](https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/pages/BookingWebsite.jsx): `frontend/src/pages/BookingWebsite.jsx`
- [Account and invoices](https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/pages/MyAccount.jsx): `frontend/src/pages/MyAccount.jsx`

### Identity and access

- [Customer auth client](https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/services/authService.js): `frontend/src/services/authService.js`
- [Customer authentication](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/auth_routes.py): `backend/routes/auth_routes.py`
- [Admin authentication](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/admin_auth_routes.py): `backend/routes/admin_auth_routes.py`
- [Admin access guard](https://github.com/tanishqsoni0/skipbin/blob/main/backend/utils/decorators.py): `backend/utils/decorators.py`

### Hire and payment

- [Booking and invoices](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/booking_routes.py): `backend/routes/booking_routes.py`
- [Pricing and loyalty](https://github.com/tanishqsoni0/skipbin/blob/main/backend/services/pricing_service.py): `backend/services/pricing_service.py`
- [PayPal checkout](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/paypal_routes.py): `backend/routes/paypal_routes.py`
- [PayPal integration](https://github.com/tanishqsoni0/skipbin/blob/main/backend/services/paypal_service.py): `backend/services/paypal_service.py`
- [Postcode services](https://github.com/tanishqsoni0/skipbin/blob/main/backend/services/postcode_service.py): `backend/services/postcode_service.py`

### Admin operations

- [Admin console](https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Customer management](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/customer_routes.py): `backend/routes/customer_routes.py`
- [Scheduling calendar](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/calendar_routes.py): `backend/routes/calendar_routes.py`
- [Hire catalogue](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/bin_routes.py): `backend/routes/bin_routes.py`
- [Waste types](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/waste_routes.py): `backend/routes/waste_routes.py`
- [Promotions](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/promotion_routes.py): `backend/routes/promotion_routes.py`
- [Commercial quotes](https://github.com/tanishqsoni0/skipbin/blob/main/backend/routes/commercial_quote_routes.py): `backend/routes/commercial_quote_routes.py`

### Backend foundation

- [API client](https://github.com/tanishqsoni0/skipbin/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Flask app and routes](https://github.com/tanishqsoni0/skipbin/blob/main/backend/app.py): `backend/app.py`
- [MySQL persistence](https://github.com/tanishqsoni0/skipbin/blob/main/backend/database/db.py): `backend/database/db.py`
- [Input validation](https://github.com/tanishqsoni0/skipbin/blob/main/backend/utils/validators.py): `backend/utils/validators.py`
- [Async tasks](https://github.com/tanishqsoni0/skipbin/blob/main/backend/services/async_tasks.py): `backend/services/async_tasks.py`
- [Metrics](https://github.com/tanishqsoni0/skipbin/blob/main/backend/services/metrics_service.py): `backend/services/metrics_service.py`

### Other components

- **Customer**

## Connections

- Customer → Web app routing: uses (evidence: `frontend/src/App.jsx`)
- Web app routing → Booking experience: routes to (evidence: `frontend/src/App.jsx`)
- Web app routing → Account and invoices: routes to (evidence: `frontend/src/App.jsx`)
- Booking experience → API client: requests
- Account and invoices → Customer auth client: uses (evidence: `frontend/src/pages/MyAccount.jsx`)
- Account and invoices → API client: requests (evidence: `frontend/src/pages/MyAccount.jsx`)
- Customer auth client → API client: requests (evidence: `frontend/src/services/authService.js`)
- API client → Flask app and routes: calls API
- Flask app and routes → Customer authentication: registers (evidence: `backend/app.py`)
- Flask app and routes → Booking and invoices: registers (evidence: `backend/app.py`)
- Flask app and routes → Admin authentication: registers (evidence: `backend/app.py`)
- Flask app and routes → PayPal checkout: registers (evidence: `backend/app.py`)
- Flask app and routes → Customer management: registers (evidence: `backend/app.py`)
- Flask app and routes → Scheduling calendar: registers (evidence: `backend/app.py`)
- Flask app and routes → Hire catalogue: registers (evidence: `backend/app.py`)
- Flask app and routes → Waste types: registers (evidence: `backend/app.py`)
- Flask app and routes → Promotions: registers (evidence: `backend/app.py`)
- Flask app and routes → Commercial quotes: registers (evidence: `backend/app.py`)
- Customer authentication → MySQL persistence: reads/writes (evidence: `backend/routes/auth_routes.py`)
- Admin authentication → MySQL persistence: reads/writes (evidence: `backend/routes/admin_auth_routes.py`)
- Admin authentication → Async tasks: queues email (evidence: `backend/routes/admin_auth_routes.py`)
- Admin authentication → Admin access guard: uses (evidence: `backend/routes/admin_auth_routes.py`)
- Booking and invoices → Pricing and loyalty: calculates price (evidence: `backend/routes/booking_routes.py`)
- Booking and invoices → MySQL persistence: reads/writes (evidence: `backend/routes/booking_routes.py`)
- Pricing and loyalty → MySQL persistence: reads pricing (evidence: `backend/services/pricing_service.py`)
- Pricing and loyalty → Postcode services: gets delivery charge (evidence: `backend/services/pricing_service.py`)
- PayPal checkout → Pricing and loyalty: calculates price (evidence: `backend/routes/paypal_routes.py`)
- PayPal checkout → PayPal integration: payment operations (evidence: `backend/routes/paypal_routes.py`)
- PayPal checkout → MySQL persistence: reads/writes (evidence: `backend/routes/paypal_routes.py`)
- Customer management → MySQL persistence: reads/writes (evidence: `backend/routes/customer_routes.py`)
- Scheduling calendar → MySQL persistence: reads/writes (evidence: `backend/routes/calendar_routes.py`)
- Hire catalogue → MySQL persistence: reads/writes (evidence: `backend/routes/bin_routes.py`)
- Waste types → MySQL persistence: reads/writes (evidence: `backend/routes/waste_routes.py`)
- Promotions → MySQL persistence: reads/writes (evidence: `backend/routes/promotion_routes.py`)
- Commercial quotes → MySQL persistence: reads/writes (evidence: `backend/routes/commercial_quote_routes.py`)
- Customer management → Input validation: validates (evidence: `backend/routes/customer_routes.py`)
- Booking and invoices → Input validation: validates (evidence: `backend/routes/booking_routes.py`)
- Flask app and routes → Metrics: initializes (evidence: `backend/app.py`)
- Customer → Admin console: admin use
