# omondragon/microwebappbase architecture

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

## Overview

The product is a small web UI backed by a Flask user-management API. A user opens the frontend, which renders pages; browser-side JavaScript lists, creates, updates, and deletes users through the API. The API controller uses the user model and SQLAlchemy session for persistence. The source excerpts establish these calls and the configured MySQL URI; they do not show template-to-script wiring or the database connection lifecycle.

Main entry points: [`microUsers/users/views.py`](https://github.com/omondragon/microwebappbase/blob/main/microUsers/users/views.py) (API registration), [`microUsers/db/db.py`](https://github.com/omondragon/microwebappbase/blob/main/microUsers/db/db.py) (SQLAlchemy session), [`microUsers/users/controllers/user_controller.py`](https://github.com/omondragon/microwebappbase/blob/main/microUsers/users/controllers/user_controller.py) (User controller), [`frontend/run.py`](https://github.com/omondragon/microwebappbase/blob/main/frontend/run.py) (Frontend launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web frontend"]
  node_front_entry["Frontend launcher<br/>[run.py]"]
  node_page_routes["Page routes<br/>[views.py]"]
  node_templates["Page templates"]
  node_browser_crud["Browser CRUD<br/>[scriptUsers.js]"]
end

subgraph group_service["User API"]
  node_api_entry["API launcher<br/>[run.py]"]
  node_api_routes["API registration<br/>[views.py]"]
  node_user_controller["User controller<br/>[user_controller.py]"]
end

subgraph group_persistence["Persistence"]
  node_user_model["User model<br/>[user_model.py]"]
  node_orm["SQLAlchemy session<br/>[db.py]"]
  node_configuration["Database configuration<br/>[config.py]"]
  node_mysql[("MySQL database")]
end

node_user(("User"))

node_user -->|"opens app"| node_front_entry
node_front_entry -->|"starts"| node_page_routes
node_page_routes -->|"renders"| node_templates
node_user -.->|"uses CRUD"| node_browser_crud
node_browser_crud -->|"requests users"| node_api_routes
node_user -->|"starts service"| node_api_entry
node_api_entry -->|"starts"| node_api_routes
node_api_routes -->|"registers routes"| node_user_controller
node_api_routes -->|"initializes"| node_orm
node_user_controller -->|"queries"| node_user_model
node_user_controller -->|"writes session"| node_orm
node_user_model -->|"defines columns"| node_orm
node_api_routes -->|"loads config"| node_configuration
node_configuration -->|"configures URI"| node_mysql
node_orm -.->|"persists records"| node_mysql

click node_front_entry "https://github.com/omondragon/microwebappbase/blob/main/frontend/run.py"
click node_page_routes "https://github.com/omondragon/microwebappbase/blob/main/frontend/web/views.py"
click node_templates "https://github.com/omondragon/microwebappbase/tree/main/frontend/web/templates"
click node_browser_crud "https://github.com/omondragon/microwebappbase/blob/main/frontend/web/static/scriptUsers.js"
click node_api_entry "https://github.com/omondragon/microwebappbase/blob/main/microUsers/run.py"
click node_api_routes "https://github.com/omondragon/microwebappbase/blob/main/microUsers/users/views.py"
click node_user_controller "https://github.com/omondragon/microwebappbase/blob/main/microUsers/users/controllers/user_controller.py"
click node_user_model "https://github.com/omondragon/microwebappbase/blob/main/microUsers/users/models/user_model.py"
click node_orm "https://github.com/omondragon/microwebappbase/blob/main/microUsers/db/db.py"
click node_configuration "https://github.com/omondragon/microwebappbase/blob/main/microUsers/config.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_front_entry,node_page_routes,node_templates,node_browser_crud,node_user toneBlue
class node_api_entry,node_api_routes,node_user_controller toneAmber
class node_user_model,node_orm,node_configuration,node_mysql toneMint
```

## Components

### Web frontend

- [Frontend launcher](https://github.com/omondragon/microwebappbase/blob/main/frontend/run.py): `frontend/run.py`
- [Page routes](https://github.com/omondragon/microwebappbase/blob/main/frontend/web/views.py): `frontend/web/views.py`
- [Page templates](https://github.com/omondragon/microwebappbase/tree/main/frontend/web/templates): `frontend/web/templates`
- [Browser CRUD](https://github.com/omondragon/microwebappbase/blob/main/frontend/web/static/scriptUsers.js): `frontend/web/static/scriptUsers.js`

### User API

- [API launcher](https://github.com/omondragon/microwebappbase/blob/main/microUsers/run.py): `microUsers/run.py`
- [API registration](https://github.com/omondragon/microwebappbase/blob/main/microUsers/users/views.py): `microUsers/users/views.py`
- [User controller](https://github.com/omondragon/microwebappbase/blob/main/microUsers/users/controllers/user_controller.py): `microUsers/users/controllers/user_controller.py`

### Persistence

- [User model](https://github.com/omondragon/microwebappbase/blob/main/microUsers/users/models/user_model.py): `microUsers/users/models/user_model.py`
- [SQLAlchemy session](https://github.com/omondragon/microwebappbase/blob/main/microUsers/db/db.py): `microUsers/db/db.py`
- [Database configuration](https://github.com/omondragon/microwebappbase/blob/main/microUsers/config.py): `microUsers/config.py`
- **MySQL database**

### Other components

- **User**

## Connections

- User → Frontend launcher: opens app (evidence: `README.md`)
- Frontend launcher → Page routes: starts (evidence: `frontend/run.py`)
- Page routes → Page templates: renders (evidence: `frontend/web/views.py`)
- User → Browser CRUD: uses CRUD
- Browser CRUD → API registration: requests users (evidence: `frontend/web/static/scriptUsers.js`)
- User → API launcher: starts service (evidence: `README.md`)
- API launcher → API registration: starts (evidence: `microUsers/run.py`)
- API registration → User controller: registers routes (evidence: `microUsers/users/views.py`)
- API registration → SQLAlchemy session: initializes (evidence: `microUsers/users/views.py`)
- User controller → User model: queries (evidence: `microUsers/users/controllers/user_controller.py`)
- User controller → SQLAlchemy session: writes session (evidence: `microUsers/users/controllers/user_controller.py`)
- User model → SQLAlchemy session: defines columns (evidence: `microUsers/users/models/user_model.py`)
- API registration → Database configuration: loads config (evidence: `microUsers/users/views.py`)
- Database configuration → MySQL database: configures URI (evidence: `microUsers/config.py`)
- SQLAlchemy session → MySQL database: persists records
