# rhyancornejosanchez-web/web-system-group-6 architecture

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

- Interactive diagram: https://gitdiagram.com/rhyancornejosanchez-web/web-system-group-6
- Repository: https://github.com/rhyancornejosanchez-web/web-system-group-6

## Overview

This is a Flask apartment-management web application for tenants and a landlord. The principal workflow is a tenant signing in, viewing rental units and rent status, then sending an inquiry or message; landlord routes manage units and occupancy, tenants, applications, and replies. Route handlers own the domain operations and access MySQL through the model layer. Startup initializes and seeds data, while CLI commands provide database reset and user listing. The README gives no capability details; broader feature coverage is inferred from the route/template names in the tree, and those unsampled links are omitted where relationships cannot be verified.

Main entry points: [`views.py`](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py) (Web routes), [`models.py`](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/models.py) (Database access), [`app.py`](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/app.py) (App startup), [`seed.py`](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/seed.py) (Sample data seeding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_routes["Web routes<br/>[views.py]"]
  node_pages["Role pages"]
end

subgraph group_domain["Rental operations"]
  node_helpers["Auth and rent helpers<br/>[utils.py]"]
  node_rentals["Units and occupancy<br/>[views.py]"]
  node_rent["Rent tracking<br/>[views.py]"]
  node_communications["Inquiries and messages<br/>[views.py]"]
  node_accounts["Accounts and approvals<br/>[views.py]"]
end

subgraph group_data["Persistence"]
  node_dbaccess["Database access<br/>[models.py]"]
  node_mysql[("MySQL database")]
end

subgraph group_ops["Initialization and CLI"]
  node_startup["App startup<br/>[app.py]"]
  node_seed["Sample data seeding<br/>[seed.py]"]
  node_cli["Database CLI<br/>[cli_command.py]"]
end

node_tenant(("Tenant"))
node_landlord(("Landlord"))

node_tenant -->|"uses routes"| node_routes
node_landlord -->|"uses routes"| node_routes
node_routes -->|"renders"| node_pages
node_routes -->|"queries"| node_dbaccess
node_routes -->|"uses helpers"| node_helpers
node_routes -.->|"handles"| node_rentals
node_routes -.->|"handles"| node_rent
node_routes -->|"handles"| node_communications
node_routes -.->|"handles"| node_accounts
node_dbaccess -->|"reads and writes"| node_mysql
node_startup -->|"initializes"| node_dbaccess
node_startup -->|"registers"| node_routes
node_startup -->|"runs"| node_seed
node_startup -->|"registers commands"| node_cli
node_seed -->|"writes seed data"| node_dbaccess
node_seed -->|"hashes passwords"| node_helpers
node_cli -->|"queries and resets"| node_dbaccess
node_cli -->|"reseeds"| node_seed

click node_routes "https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py"
click node_pages "https://github.com/rhyancornejosanchez-web/web-system-group-6/tree/main/templates"
click node_helpers "https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/utils.py"
click node_rentals "https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py"
click node_rent "https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py"
click node_communications "https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py"
click node_accounts "https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py"
click node_dbaccess "https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/models.py"
click node_startup "https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/app.py"
click node_seed "https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/seed.py"
click node_cli "https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/cli_command.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_routes,node_pages toneBlue
class node_helpers,node_rentals,node_rent,node_communications,node_accounts toneAmber
class node_dbaccess,node_mysql toneMint
class node_startup,node_seed,node_cli toneRose
class node_tenant,node_landlord toneIndigo
```

## Components

### Web application

- [Web routes](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py): `views.py`
- [Role pages](https://github.com/rhyancornejosanchez-web/web-system-group-6/tree/main/templates): `templates`

### Rental operations

- [Auth and rent helpers](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/utils.py): `utils.py`
- [Units and occupancy](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py): `views.py`
- [Rent tracking](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py): `views.py`
- [Inquiries and messages](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py): `views.py`
- [Accounts and approvals](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/views.py): `views.py`

### Persistence

- [Database access](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/models.py): `models.py`
- **MySQL database**

### Initialization and CLI

- [App startup](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/app.py): `app.py`
- [Sample data seeding](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/seed.py): `seed.py`
- [Database CLI](https://github.com/rhyancornejosanchez-web/web-system-group-6/blob/main/cli_command.py): `cli_command.py`

### Other components

- **Tenant**
- **Landlord**

## Connections

- Tenant → Web routes: uses routes (evidence: `views.py`)
- Landlord → Web routes: uses routes (evidence: `views.py`)
- Web routes → Role pages: renders (evidence: `views.py`)
- Web routes → Database access: queries (evidence: `views.py`)
- Web routes → Auth and rent helpers: uses helpers (evidence: `views.py`)
- Web routes → Units and occupancy: handles (evidence: `views.py`)
- Web routes → Rent tracking: handles (evidence: `views.py`)
- Web routes → Inquiries and messages: handles (evidence: `views.py`)
- Web routes → Accounts and approvals: handles (evidence: `views.py`)
- Database access → MySQL database: reads and writes (evidence: `models.py`)
- App startup → Database access: initializes (evidence: `app.py`)
- App startup → Web routes: registers (evidence: `app.py`)
- App startup → Sample data seeding: runs (evidence: `app.py`)
- App startup → Database CLI: registers commands (evidence: `app.py`)
- Sample data seeding → Database access: writes seed data (evidence: `seed.py`)
- Sample data seeding → Auth and rent helpers: hashes passwords (evidence: `seed.py`)
- Database CLI → Database access: queries and resets (evidence: `cli_command.py`)
- Database CLI → Sample data seeding: reseeds (evidence: `cli_command.py`)
