# davy2898/kcnwebsite architecture

> Architecture diagram of the GitHub repository davy2898/kcnwebsite, 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/davy2898/kcnwebsite
- Repository: https://github.com/davy2898/kcnwebsite

## Overview

Reach is a hospital information website backed by a Flask application, with a Vue single-page experience for hospital services, news, pages, search and appointment requests. Its content-management workflow lets administrators manage posts, categories, pages, comments and users; public readers browse content and submit comments. The API and server-rendered public routes expose related content paths. Source excerpts establish the app’s blueprint registration and ORM usage; Vue-to-API evidence is explicit for appointment submission, while other client/API wiring is not shown.

Main entry points: [`kcnprh-main/reach/app/__init__.py`](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/__init__.py) (App factory), [`kcnprh-main/reach/app/models.py`](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/models.py) (Domain models), [`kcnprh-main/reach/app/public/__init__.py`](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/public/__init__.py) (Public pages), [`kcnprh-main/reach/app/api.py`](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/api.py) (JSON API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Visitor experience"]
  node_vue["Vue site<br/>[App.vue]"]
  node_vue_router["Vue routes<br/>[main.js]"]
  node_frontend_shell["SPA page shell<br/>[frontend.py]"]
  node_public_routes["Public pages<br/>[__init__.py]"]
end

subgraph group_content["Content management"]
  node_admin["Admin CMS<br/>[__init__.py]"]
end

subgraph group_backend["Application backend"]
  node_api["JSON API<br/>[api.py]"]
  node_app_factory["App factory<br/>[__init__.py]"]
  node_config["Runtime config<br/>[config.py]"]
end

subgraph group_data["Content data"]
  node_orm["Domain models<br/>[models.py]"]
  node_store[("Relational database")]
end

node_visitor(("Visitor"))
node_telegram["Telegram Bot API"]

node_visitor -->|"uses"| node_vue
node_vue -->|"uses routes"| node_vue_router
node_visitor -->|"browses"| node_public_routes
node_visitor -->|"administers"| node_admin
node_vue -->|"submits appointment"| node_api
node_app_factory -->|"registers"| node_frontend_shell
node_app_factory -->|"registers"| node_api
node_app_factory -->|"registers"| node_public_routes
node_app_factory -->|"registers"| node_admin
node_app_factory -->|"loads settings"| node_config
node_api -->|"queries models"| node_orm
node_public_routes -->|"queries models"| node_orm
node_admin -->|"manages records"| node_orm
node_app_factory -->|"initializes models"| node_orm
node_orm -->|"maps records"| node_store
node_config -->|"configures URI"| node_store
node_api -.->|"may notify"| node_telegram
node_public_routes -.->|"may notify"| node_telegram

click node_vue "https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/frontend/src/App.vue"
click node_vue_router "https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/frontend/src/main.js"
click node_frontend_shell "https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/frontend.py"
click node_public_routes "https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/public/__init__.py"
click node_admin "https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/admin/__init__.py"
click node_api "https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/api.py"
click node_app_factory "https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/__init__.py"
click node_config "https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/config.py"
click node_orm "https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/models.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_vue,node_vue_router,node_frontend_shell,node_public_routes toneBlue
class node_admin toneAmber
class node_api,node_app_factory,node_config,node_telegram toneMint
class node_orm,node_store toneRose
class node_visitor toneIndigo
```

## Components

### Visitor experience

- [Vue site](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/frontend/src/App.vue): `kcnprh-main/reach/frontend/src/App.vue`
- [Vue routes](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/frontend/src/main.js): `kcnprh-main/reach/frontend/src/main.js`
- [SPA page shell](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/frontend.py): `kcnprh-main/reach/app/frontend.py`
- [Public pages](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/public/__init__.py): `kcnprh-main/reach/app/public/__init__.py`

### Content management

- [Admin CMS](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/admin/__init__.py): `kcnprh-main/reach/app/admin/__init__.py`

### Application backend

- [JSON API](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/api.py): `kcnprh-main/reach/app/api.py`
- [App factory](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/__init__.py): `kcnprh-main/reach/app/__init__.py`
- [Runtime config](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/config.py): `kcnprh-main/reach/app/config.py`

### Content data

- [Domain models](https://github.com/davy2898/kcnwebsite/blob/master/kcnprh-main/reach/app/models.py): `kcnprh-main/reach/app/models.py`
- **Relational database**

### Other components

- **Visitor**
- **Telegram Bot API**

## Connections

- Visitor → Vue site: uses (evidence: `kcnprh-main/reach/frontend/src/App.vue`)
- Vue site → Vue routes: uses routes (evidence: `kcnprh-main/reach/frontend/src/main.js`)
- Visitor → Public pages: browses (evidence: `kcnprh-main/reach/app/public/__init__.py`)
- Visitor → Admin CMS: administers (evidence: `kcnprh-main/reach/app/admin/__init__.py`)
- Vue site → JSON API: submits appointment (evidence: `kcnprh-main/reach/frontend/src/App.vue`)
- App factory → SPA page shell: registers (evidence: `kcnprh-main/reach/app/__init__.py`)
- App factory → JSON API: registers (evidence: `kcnprh-main/reach/app/__init__.py`)
- App factory → Public pages: registers (evidence: `kcnprh-main/reach/app/__init__.py`)
- App factory → Admin CMS: registers (evidence: `kcnprh-main/reach/app/__init__.py`)
- App factory → Runtime config: loads settings (evidence: `kcnprh-main/reach/app/__init__.py`)
- JSON API → Domain models: queries models (evidence: `kcnprh-main/reach/app/api.py`)
- Public pages → Domain models: queries models (evidence: `kcnprh-main/reach/app/public/__init__.py`)
- Admin CMS → Domain models: manages records (evidence: `kcnprh-main/reach/app/admin/__init__.py`)
- App factory → Domain models: initializes models (evidence: `kcnprh-main/reach/app/__init__.py`)
- Domain models → Relational database: maps records (evidence: `kcnprh-main/reach/app/models.py`)
- Runtime config → Relational database: configures URI (evidence: `kcnprh-main/reach/app/config.py`)
- JSON API → Telegram Bot API: may notify
- Public pages → Telegram Bot API: may notify (evidence: `kcnprh-main/reach/app/public/__init__.py`)
