# mindy12-ux/web-project architecture

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

- Interactive diagram: https://gitdiagram.com/mindy12-ux/web-project
- Repository: https://github.com/mindy12-ux/web-project

## Overview

Web-project is a Flask website for sharing vacant-house information. Visitors explore vacant houses by region, inspect nearby shops, and can register, sign in, and save houses; activity feeds public trends and scoped official dashboards, while administrators manage roles and official invitations. The graph includes the documented route modules and the MariaDB access layer. Source excerpts show selected route behavior; links to database access are supported by the SOURCE INDEX, while unsampled UI and route details are not expanded.

Main entry points: [`backend/app.py`](https://github.com/mindy12-ux/web-project/blob/main/backend/app.py) (Flask app), [`backend/db.py`](https://github.com/mindy12-ux/web-project/blob/main/backend/db.py) (DB access), [`backend/routes/houses.py`](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/houses.py) (House map and APIs), [`backend/routes/auth.py`](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/auth.py) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry"]
  node_app["Flask app<br/>[app.py]"]
  node_dbaccess["DB access<br/>[db.py]"]
  node_common["Response helpers<br/>[common.py]"]
  node_main["Home page<br/>[main.py]"]
end

subgraph group_discovery["House discovery"]
  node_houses["House map and APIs<br/>[houses.py]"]
  node_stores["Store routes<br/>[stores.py]"]
  node_contractors["Contractor routes<br/>[contractors.py]"]
end

subgraph group_accounts["Accounts and saves"]
  node_auth["Authentication<br/>[auth.py]"]
  node_mypage["Profile and saved houses<br/>[mypage.py]"]
  node_manage["Roles and invitations<br/>[manage.py]"]
end

subgraph group_insights["Trends and administration"]
  node_events["Activity logging<br/>[events.py]"]
  node_trends["Public trends<br/>[trends.py]"]
  node_admin["Official statistics<br/>[admin.py]"]
end

node_visitor(("Visitor"))
node_mariadb[("MariaDB")]

node_visitor -->|"requests pages"| node_app
node_app -->|"registers blueprint"| node_auth
node_app -->|"registers blueprint"| node_mypage
node_app -->|"registers blueprint"| node_main
node_app -->|"registers blueprint"| node_houses
node_app -->|"registers blueprint"| node_stores
node_app -->|"registers blueprint"| node_contractors
node_app -->|"registers blueprint"| node_events
node_app -->|"registers blueprint"| node_trends
node_app -->|"registers blueprint"| node_admin
node_app -->|"registers blueprint"| node_manage
node_main -->|"gets popular regions"| node_trends
node_houses -->|"logs house views"| node_events
node_houses -->|"formats responses"| node_common
node_mypage -->|"uses login checks"| node_auth
node_manage -->|"uses auth checks"| node_auth
node_admin -->|"redirects dashboard"| node_trends
node_houses -->|"queries data"| node_dbaccess
node_auth -->|"queries accounts"| node_dbaccess
node_mypage -->|"reads and writes"| node_dbaccess
node_events -->|"writes activity"| node_dbaccess
node_trends -->|"queries aggregates"| node_dbaccess
node_admin -->|"queries statistics"| node_dbaccess
node_manage -->|"manages account data"| node_dbaccess
node_stores -->|"queries data"| node_dbaccess
node_contractors -->|"queries data"| node_dbaccess
node_dbaccess -->|"opens connection"| node_mariadb

click node_app "https://github.com/mindy12-ux/web-project/blob/main/backend/app.py"
click node_dbaccess "https://github.com/mindy12-ux/web-project/blob/main/backend/db.py"
click node_common "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/common.py"
click node_main "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/main.py"
click node_houses "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/houses.py"
click node_stores "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/stores.py"
click node_contractors "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/contractors.py"
click node_auth "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/auth.py"
click node_mypage "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/mypage.py"
click node_events "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/events.py"
click node_trends "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/trends.py"
click node_admin "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/admin.py"
click node_manage "https://github.com/mindy12-ux/web-project/blob/main/backend/routes/manage.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_app,node_dbaccess,node_common,node_main toneBlue
class node_houses,node_stores,node_contractors,node_mariadb toneAmber
class node_auth,node_mypage,node_manage toneMint
class node_events,node_trends,node_admin toneRose
class node_visitor toneIndigo
```

## Components

### Web entry

- [Flask app](https://github.com/mindy12-ux/web-project/blob/main/backend/app.py): `backend/app.py`
- [DB access](https://github.com/mindy12-ux/web-project/blob/main/backend/db.py): `backend/db.py`
- [Response helpers](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/common.py): `backend/routes/common.py`
- [Home page](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/main.py): `backend/routes/main.py`

### House discovery

- [House map and APIs](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/houses.py): `backend/routes/houses.py`
- [Store routes](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/stores.py): `backend/routes/stores.py`
- [Contractor routes](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/contractors.py): `backend/routes/contractors.py`

### Accounts and saves

- [Authentication](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/auth.py): `backend/routes/auth.py`
- [Profile and saved houses](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/mypage.py): `backend/routes/mypage.py`
- [Roles and invitations](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/manage.py): `backend/routes/manage.py`

### Trends and administration

- [Activity logging](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/events.py): `backend/routes/events.py`
- [Public trends](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/trends.py): `backend/routes/trends.py`
- [Official statistics](https://github.com/mindy12-ux/web-project/blob/main/backend/routes/admin.py): `backend/routes/admin.py`

### Other components

- **Visitor**
- **MariaDB**

## Connections

- Visitor → Flask app: requests pages (evidence: `backend/app.py`)
- Flask app → Authentication: registers blueprint (evidence: `backend/app.py`)
- Flask app → Profile and saved houses: registers blueprint (evidence: `backend/app.py`)
- Flask app → Home page: registers blueprint (evidence: `backend/app.py`)
- Flask app → House map and APIs: registers blueprint (evidence: `backend/app.py`)
- Flask app → Store routes: registers blueprint (evidence: `backend/app.py`)
- Flask app → Contractor routes: registers blueprint (evidence: `backend/app.py`)
- Flask app → Activity logging: registers blueprint (evidence: `backend/app.py`)
- Flask app → Public trends: registers blueprint (evidence: `backend/app.py`)
- Flask app → Official statistics: registers blueprint (evidence: `backend/app.py`)
- Flask app → Roles and invitations: registers blueprint (evidence: `backend/app.py`)
- Home page → Public trends: gets popular regions (evidence: `backend/routes/main.py`)
- House map and APIs → Activity logging: logs house views (evidence: `backend/routes/houses.py`)
- House map and APIs → Response helpers: formats responses (evidence: `backend/routes/houses.py`)
- Profile and saved houses → Authentication: uses login checks (evidence: `backend/routes/mypage.py`)
- Roles and invitations → Authentication: uses auth checks (evidence: `backend/routes/manage.py`)
- Official statistics → Public trends: redirects dashboard (evidence: `backend/routes/admin.py`)
- House map and APIs → DB access: queries data (evidence: `backend/routes/houses.py`)
- Authentication → DB access: queries accounts (evidence: `backend/routes/auth.py`)
- Profile and saved houses → DB access: reads and writes (evidence: `backend/routes/mypage.py`)
- Activity logging → DB access: writes activity (evidence: `backend/routes/events.py`)
- Public trends → DB access: queries aggregates (evidence: `backend/routes/trends.py`)
- Official statistics → DB access: queries statistics (evidence: `backend/routes/admin.py`)
- Roles and invitations → DB access: manages account data (evidence: `backend/routes/manage.py`)
- Store routes → DB access: queries data (evidence: `backend/routes/stores.py`)
- Contractor routes → DB access: queries data (evidence: `backend/routes/contractors.py`)
- DB access → MariaDB: opens connection (evidence: `backend/db.py`)
