# koskin17/users_database architecture

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

- Interactive diagram: https://gitdiagram.com/koskin17/users_database
- Repository: https://github.com/koskin17/users_database

## Overview

#### Purpose and Delivery Forms
This repository implements a user-management application with two packaging models:
- A standalone local application rooted at `App/start.py`, with application logic in `App/classes.py`.
- A Docker-oriented split deployment rooted at `Docker_App/start.py`, separating GUI and server/API roles.

A prebuilt Windows distribution is present at `App_exe/start.exe`.

#### Standalone Application
`App/start.py` is the primary local entry point. It likely initializes the UI, application objects, and local persistence workflow. Core domain behavior is centralized in `App/classes.py`; cross-cutting access or validation behavior is likely implemented through `App/decorators.py`.

Local UI assets are colocated under `App/Font` and `App/Pictures`, indicating a desktop GUI rather than a browser client.

#### Docker Client/Server Boundary
The containerized architecture separates presentation from backend service:
- GUI client: `Docker_App/gui_app/gui.py`
- HTTP/API layer: `Docker_App/server_app/api.py`
- Server bootstrap/runtime: `Docker_App/server_app/server.py`

`Docker_App/start.py` is the composition entry point and likely selects or launches these roles. The GUI communicates with the server through the API boundary rather than directly owning server-side operations.

#### Domain and Persistence
User records are the central persisted data concern, supported by database backup artifacts in `App/DB_backup`, including `App/DB_backup/usersDB_09042026_4`. SQL setup/sample operations are documented in `App/SQL queries with test data.txt`.

The likely flow is: UI collects user actions → domain classes validate/process them → persistence operations read or update the users database. In the Docker variant, requests instead cross from GUI to API before reaching server-side processing and persistence.

#### Runtime and Dependencies
Both delivery modes are Python applications with independently declared dependencies:
- `App/requirements.txt`
- `Docker_App/requirements.txt`

Container execution is defined by `Docker_App/Dockerfile`; `.dockerignore` controls the Docker build context. This makes Docker the primary infrastructure boundary for the distributed variant.

#### Assets and Operational Artifacts
Visual resources are duplicated between local and Docker GUI layouts:
- `App/Font`, `App/Pictures`
- `Docker_App/gui_app/Font`, `Docker_App/gui_app/Pictures`

Database backups and the executable are operational/distribution artifacts, not runtime integration points for the Docker client-server architecture.

Main entry points: [`App/start.py`](https://github.com/koskin17/users_database/blob/main/App/start.py) (Local entry point), [`App/classes.py`](https://github.com/koskin17/users_database/blob/main/App/classes.py) (User domain logic), [`Docker_App/gui_app/gui.py`](https://github.com/koskin17/users_database/blob/main/Docker_App/gui_app/gui.py) (GUI client), [`Docker_App/start.py`](https://github.com/koskin17/users_database/blob/main/Docker_App/start.py) (Docker composition entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_standalone["Standalone desktop app"]
  node_app_start["Local entry point<br/>Python entry point<br/>[start.py]"]
  node_app_domain["User domain logic<br/>Python module<br/>[classes.py]"]
  node_app_decorators["Access and validation<br/>Python module<br/>[decorators.py]"]
  node_app_assets["Desktop UI assets<br/>GUI assets"]
  node_app_requirements["Local dependencies<br/>Python dependencies<br/>[requirements.txt]"]
end

subgraph group_docker["Docker client/server deployment"]
  node_docker_start["Docker composition entry<br/>Python entry point<br/>[start.py]"]
  node_docker_gui["GUI client<br/>Python GUI<br/>[gui.py]"]
  node_docker_assets["Docker GUI assets"]
  node_api{{"HTTP API<br/>Python API<br/>[api.py]"}}
  node_server["Server runtime<br/>Python server<br/>[server.py]"]
  node_dockerfile["Container image build<br/>Docker build"]
  node_docker_requirements["Container dependencies<br/>Python dependencies<br/>[requirements.txt]"]
end

subgraph group_data["Data and distribution"]
  node_users_db[("Users database<br/>Persistent data")]
  node_sql_data["SQL setup and sample data<br/>SQL documentation"]
  node_windows_exe["Windows distribution<br/>Prebuilt executable<br/>[start.exe]"]
end

node_app_start -->|"invokes"| node_app_domain
node_app_domain -->|"uses"| node_app_decorators
node_app_start -->|"renders with"| node_app_assets
node_app_domain -->|"reads and updates"| node_users_db
node_sql_data -.->|"defines setup data"| node_users_db
node_windows_exe -.->|"packages"| node_app_start
node_app_requirements -.->|"provides dependencies"| node_app_start
node_docker_start -->|"launches role"| node_docker_gui
node_docker_start -->|"launches role"| node_server
node_docker_gui -->|"renders with"| node_docker_assets
node_docker_gui -->|"HTTP requests"| node_api
node_api -->|"dispatches operations"| node_server
node_server -->|"reads and updates"| node_users_db
node_dockerfile -.->|"containerizes"| node_docker_start
node_docker_requirements -.->|"installed during build"| node_dockerfile

click node_app_start "https://github.com/koskin17/users_database/blob/main/App/start.py"
click node_app_domain "https://github.com/koskin17/users_database/blob/main/App/classes.py"
click node_app_decorators "https://github.com/koskin17/users_database/blob/main/App/decorators.py"
click node_app_assets "https://github.com/koskin17/users_database/tree/main/App/Pictures"
click node_docker_start "https://github.com/koskin17/users_database/blob/main/Docker_App/start.py"
click node_docker_gui "https://github.com/koskin17/users_database/blob/main/Docker_App/gui_app/gui.py"
click node_docker_assets "https://github.com/koskin17/users_database/tree/main/Docker_App/gui_app/Pictures"
click node_api "https://github.com/koskin17/users_database/blob/main/Docker_App/server_app/api.py"
click node_server "https://github.com/koskin17/users_database/blob/main/Docker_App/server_app/server.py"
click node_dockerfile "https://github.com/koskin17/users_database/blob/main/Docker_App/Dockerfile"
click node_users_db "https://github.com/koskin17/users_database/blob/main/App/DB_backup/usersDB_09042026_4"
click node_sql_data "https://github.com/koskin17/users_database/blob/main/App/SQL%20queries%20with%20test%20data.txt"
click node_windows_exe "https://github.com/koskin17/users_database/blob/main/App_exe/start.exe"
click node_app_requirements "https://github.com/koskin17/users_database/blob/main/App/requirements.txt"
click node_docker_requirements "https://github.com/koskin17/users_database/blob/main/Docker_App/requirements.txt"

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_start,node_app_domain,node_app_decorators,node_app_assets,node_app_requirements toneBlue
class node_docker_start,node_docker_gui,node_docker_assets,node_api,node_server,node_dockerfile,node_docker_requirements toneAmber
class node_users_db,node_sql_data,node_windows_exe toneMint
```

## Components

### Standalone desktop app

- [Local entry point](https://github.com/koskin17/users_database/blob/main/App/start.py): Python entry point · `App/start.py`
- [User domain logic](https://github.com/koskin17/users_database/blob/main/App/classes.py): Python module · Validates and processes user operations. · `App/classes.py`
- [Access and validation](https://github.com/koskin17/users_database/blob/main/App/decorators.py): Python module · `App/decorators.py`
- [Desktop UI assets](https://github.com/koskin17/users_database/tree/main/App/Pictures): GUI assets · `App/Pictures`
- [Local dependencies](https://github.com/koskin17/users_database/blob/main/App/requirements.txt): Python dependencies · `App/requirements.txt`

### Docker client/server deployment

- [Docker composition entry](https://github.com/koskin17/users_database/blob/main/Docker_App/start.py): Python entry point · Launches or selects the split application roles. · `Docker_App/start.py`
- [GUI client](https://github.com/koskin17/users_database/blob/main/Docker_App/gui_app/gui.py): Python GUI · `Docker_App/gui_app/gui.py`
- [Docker GUI assets](https://github.com/koskin17/users_database/tree/main/Docker_App/gui_app/Pictures): GUI assets · `Docker_App/gui_app/Pictures`
- [HTTP API](https://github.com/koskin17/users_database/blob/main/Docker_App/server_app/api.py): Python API · Client/server boundary for user operations. · `Docker_App/server_app/api.py`
- [Server runtime](https://github.com/koskin17/users_database/blob/main/Docker_App/server_app/server.py): Python server · `Docker_App/server_app/server.py`
- [Container image build](https://github.com/koskin17/users_database/blob/main/Docker_App/Dockerfile): Docker build · `Docker_App/Dockerfile`
- [Container dependencies](https://github.com/koskin17/users_database/blob/main/Docker_App/requirements.txt): Python dependencies · `Docker_App/requirements.txt`

### Data and distribution

- [Users database](https://github.com/koskin17/users_database/blob/main/App/DB_backup/usersDB_09042026_4): Persistent data · Central store for user records. · `App/DB_backup/usersDB_09042026_4`
- [SQL setup and sample data](https://github.com/koskin17/users_database/blob/main/App/SQL%20queries%20with%20test%20data.txt): SQL documentation · `App/SQL queries with test data.txt`
- [Windows distribution](https://github.com/koskin17/users_database/blob/main/App_exe/start.exe): Prebuilt executable · Standalone packaged delivery artifact. · `App_exe/start.exe`

## Connections

- Local entry point → User domain logic: invokes
- User domain logic → Access and validation: uses
- Local entry point → Desktop UI assets: renders with
- User domain logic → Users database: reads and updates
- SQL setup and sample data → Users database: defines setup data
- Windows distribution → Local entry point: packages
- Local dependencies → Local entry point: provides dependencies
- Docker composition entry → GUI client: launches role
- Docker composition entry → Server runtime: launches role
- GUI client → Docker GUI assets: renders with
- GUI client → HTTP API: HTTP requests
- HTTP API → Server runtime: dispatches operations
- Server runtime → Users database: reads and updates
- Container image build → Docker composition entry: containerizes
- Container dependencies → Container image build: installed during build
