# ragz743/cpts_451_meta_capstone architecture

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

- Interactive diagram: https://gitdiagram.com/ragz743/cpts_451_meta_capstone
- Repository: https://github.com/ragz743/cpts_451_meta_capstone

## Overview

This is a Flask restaurant-management application backed by Oracle. Users enter through web routes to maintain customers, reservations, orders, order items, and payments, or view operational reports; route handlers execute SQL through a shared database helper and render HTML templates. The graph separates these domain areas while retaining the shared persistence and configuration layers. The excerpts establish several template-rendering links, but not every route-to-template relationship, so uncertain links are omitted.

Main entry points: [`app.py`](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py) (Flask routes), [`db.py`](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/db.py) (SQL helper), [`config.py`](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/config.py) (Runtime configuration), [`templates/index.html`](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/templates/index.html) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_routes["Flask routes<br/>[app.py]"]
  node_home["Home page<br/>[index.html]"]
  node_reservations_view["Reservation pages<br/>[reservations.html]"]
  node_orders_view["Order pages<br/>[orders.html]"]
  node_items_view["Order-item page<br/>[order_items.html]"]
end

subgraph group_operations["Restaurant operations"]
  node_customers["Customer management<br/>[app.py]"]
  node_reservations["Reservation management<br/>[app.py]"]
  node_orders["Order management<br/>[app.py]"]
  node_order_items["Order-item management<br/>[app.py]"]
  node_payments["Payment management<br/>[app.py]"]
  node_reports["Operational reports<br/>[app.py]"]
end

subgraph group_persistence["Persistence"]
  node_db_helper["SQL helper<br/>[db.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
  node_oracle[("Oracle database")]
  node_schema["Restaurant schema<br/>[schema.sql]"]
end

node_user(("Browser user"))

node_user -->|"uses routes"| node_routes
node_routes -->|"renders"| node_home
node_routes -->|"renders"| node_reservations_view
node_routes -->|"renders"| node_orders_view
node_routes -->|"renders"| node_items_view
node_routes -->|"dispatches to"| node_customers
node_routes -->|"dispatches to"| node_reservations
node_routes -->|"dispatches to"| node_orders
node_routes -->|"dispatches to"| node_order_items
node_routes -->|"dispatches to"| node_payments
node_routes -->|"dispatches to"| node_reports
node_customers -->|"queries"| node_db_helper
node_reservations -->|"queries"| node_db_helper
node_orders -->|"queries"| node_db_helper
node_order_items -->|"queries"| node_db_helper
node_payments -->|"queries"| node_db_helper
node_reports -->|"queries"| node_db_helper
node_routes -->|"loads secret"| node_config
node_db_helper -->|"loads credentials"| node_config
node_db_helper -->|"connects to"| node_oracle
node_oracle -.->|"stores data"| node_schema

click node_routes "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py"
click node_home "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/templates/index.html"
click node_reservations_view "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/templates/reservations.html"
click node_orders_view "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/templates/orders.html"
click node_items_view "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/templates/order_items.html"
click node_customers "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py"
click node_reservations "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py"
click node_orders "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py"
click node_order_items "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py"
click node_payments "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py"
click node_reports "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py"
click node_db_helper "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/db.py"
click node_config "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/config.py"
click node_schema "https://github.com/ragz743/cpts_451_meta_capstone/blob/main/schema.sql"

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_routes,node_home,node_reservations_view,node_orders_view,node_items_view,node_user toneBlue
class node_customers,node_reservations,node_orders,node_order_items,node_payments,node_reports toneAmber
class node_db_helper,node_config,node_oracle,node_schema toneMint
```

## Components

### Web interface

- [Flask routes](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py): `app.py`
- [Home page](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/templates/index.html): `templates/index.html`
- [Reservation pages](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/templates/reservations.html): `templates/reservations.html`
- [Order pages](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/templates/orders.html): `templates/orders.html`
- [Order-item page](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/templates/order_items.html): `templates/order_items.html`

### Restaurant operations

- [Customer management](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py): `app.py`
- [Reservation management](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py): `app.py`
- [Order management](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py): `app.py`
- [Order-item management](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py): `app.py`
- [Payment management](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py): `app.py`
- [Operational reports](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/app.py): `app.py`

### Persistence

- [SQL helper](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/db.py): `db.py`
- [Runtime configuration](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/config.py): `config.py`
- **Oracle database**
- [Restaurant schema](https://github.com/ragz743/cpts_451_meta_capstone/blob/main/schema.sql): `schema.sql`

### Other components

- **Browser user**

## Connections

- Browser user → Flask routes: uses routes (evidence: `app.py`)
- Flask routes → Home page: renders (evidence: `app.py`)
- Flask routes → Reservation pages: renders (evidence: `app.py`)
- Flask routes → Order pages: renders (evidence: `app.py`)
- Flask routes → Order-item page: renders (evidence: `app.py`)
- Flask routes → Customer management: dispatches to (evidence: `app.py`)
- Flask routes → Reservation management: dispatches to (evidence: `app.py`)
- Flask routes → Order management: dispatches to (evidence: `app.py`)
- Flask routes → Order-item management: dispatches to (evidence: `app.py`)
- Flask routes → Payment management: dispatches to (evidence: `app.py`)
- Flask routes → Operational reports: dispatches to (evidence: `app.py`)
- Customer management → SQL helper: queries (evidence: `app.py`)
- Reservation management → SQL helper: queries (evidence: `app.py`)
- Order management → SQL helper: queries (evidence: `app.py`)
- Order-item management → SQL helper: queries (evidence: `app.py`)
- Payment management → SQL helper: queries (evidence: `app.py`)
- Operational reports → SQL helper: queries (evidence: `app.py`)
- Flask routes → Runtime configuration: loads secret (evidence: `app.py`)
- SQL helper → Runtime configuration: loads credentials (evidence: `db.py`)
- SQL helper → Oracle database: connects to (evidence: `db.py`)
- Oracle database → Restaurant schema: stores data
