# lucciano-stn/tools-directory architecture

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

- Interactive diagram: https://gitdiagram.com/lucciano-stn/tools-directory
- Repository: https://github.com/lucciano-stn/tools-directory

## Overview

This is a small Flask web application for managing an internal tool catalogue by service. Users browse, search and filter tools, then create, edit or delete entries; separate service pages manage service records. The application also supports CSV import/export and a documented health endpoint. Routes, SQLAlchemy models, database setup and request handling are concentrated in app.py, with Jinja templates providing the interface. The README documents SQLite for local use and PostgreSQL for Docker deployments. Some route implementations are excerpted only partially, so their template links are omitted where not evidenced.

Main entry points: [`app.py`](https://github.com/lucciano-stn/tools-directory/blob/main/app.py) (Flask application), [`templates/base.html`](https://github.com/lucciano-stn/tools-directory/blob/main/templates/base.html) (Shared page layout), [`templates/index.html`](https://github.com/lucciano-stn/tools-directory/blob/main/templates/index.html) (Catalogue page), [`templates/tool_form.html`](https://github.com/lucciano-stn/tools-directory/blob/main/templates/tool_form.html) (Tool form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflows"]
  node_flask_app["Flask application<br/>[app.py]"]
  node_browse["Browse and search<br/>[app.py]"]
  node_tool_edit["Tool management<br/>[app.py]"]
  node_service_manage["Service management<br/>[app.py]"]
  node_csv_transfer["CSV transfer<br/>[app.py]"]
  node_health["Health endpoint<br/>[app.py]"]
end

subgraph group_catalog["Catalogue data"]
  node_tool_model["Tool records<br/>[app.py]"]
  node_service_model["Service records<br/>[app.py]"]
end

subgraph group_persistence["Persistence"]
  node_sqlalchemy["SQLAlchemy setup<br/>[app.py]"]
  node_database[("Application database")]
end

subgraph group_interface["User interface"]
  node_index_view["Catalogue page<br/>[index.html]"]
  node_form_view["Tool form<br/>[tool_form.html]"]
  node_services_view["Services page<br/>[services.html]"]
  node_base_view["Shared page layout<br/>[base.html]"]
  node_styles["Page styling<br/>[styles.css]"]
end

node_user(("User"))

node_user -->|"uses"| node_flask_app
node_flask_app -->|"registers routes"| node_browse
node_flask_app -->|"registers routes"| node_tool_edit
node_flask_app -->|"registers routes"| node_service_manage
node_flask_app -->|"registers routes"| node_csv_transfer
node_flask_app -.->|"serves"| node_health
node_browse -->|"queries"| node_tool_model
node_tool_edit -->|"creates and updates"| node_tool_model
node_tool_edit -->|"deletes"| node_tool_model
node_browse -->|"filters by"| node_service_model
node_service_manage -->|"manages"| node_service_model
node_csv_transfer -->|"imports and exports"| node_tool_model
node_flask_app -->|"initializes"| node_sqlalchemy
node_sqlalchemy -->|"connects to"| node_database
node_tool_edit -->|"renders"| node_form_view
node_service_manage -->|"renders"| node_services_view
node_browse -.->|"renders"| node_index_view
node_index_view -.->|"extends"| node_base_view
node_form_view -.->|"extends"| node_base_view
node_services_view -.->|"extends"| node_base_view
node_base_view -.->|"loads styles"| node_styles

click node_flask_app "https://github.com/lucciano-stn/tools-directory/blob/main/app.py"
click node_browse "https://github.com/lucciano-stn/tools-directory/blob/main/app.py"
click node_tool_edit "https://github.com/lucciano-stn/tools-directory/blob/main/app.py"
click node_service_manage "https://github.com/lucciano-stn/tools-directory/blob/main/app.py"
click node_csv_transfer "https://github.com/lucciano-stn/tools-directory/blob/main/app.py"
click node_health "https://github.com/lucciano-stn/tools-directory/blob/main/app.py"
click node_tool_model "https://github.com/lucciano-stn/tools-directory/blob/main/app.py"
click node_service_model "https://github.com/lucciano-stn/tools-directory/blob/main/app.py"
click node_sqlalchemy "https://github.com/lucciano-stn/tools-directory/blob/main/app.py"
click node_index_view "https://github.com/lucciano-stn/tools-directory/blob/main/templates/index.html"
click node_form_view "https://github.com/lucciano-stn/tools-directory/blob/main/templates/tool_form.html"
click node_services_view "https://github.com/lucciano-stn/tools-directory/blob/main/templates/services.html"
click node_base_view "https://github.com/lucciano-stn/tools-directory/blob/main/templates/base.html"
click node_styles "https://github.com/lucciano-stn/tools-directory/blob/main/static/styles.css"

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_flask_app,node_browse,node_tool_edit,node_service_manage,node_csv_transfer,node_health,node_user toneBlue
class node_tool_model,node_service_model toneAmber
class node_sqlalchemy,node_database toneMint
class node_index_view,node_form_view,node_services_view,node_base_view,node_styles toneRose
```

## Components

### Web workflows

- [Flask application](https://github.com/lucciano-stn/tools-directory/blob/main/app.py): `app.py`
- [Browse and search](https://github.com/lucciano-stn/tools-directory/blob/main/app.py): `app.py`
- [Tool management](https://github.com/lucciano-stn/tools-directory/blob/main/app.py): `app.py`
- [Service management](https://github.com/lucciano-stn/tools-directory/blob/main/app.py): `app.py`
- [CSV transfer](https://github.com/lucciano-stn/tools-directory/blob/main/app.py): `app.py`
- [Health endpoint](https://github.com/lucciano-stn/tools-directory/blob/main/app.py): `app.py`

### Catalogue data

- [Tool records](https://github.com/lucciano-stn/tools-directory/blob/main/app.py): `app.py`
- [Service records](https://github.com/lucciano-stn/tools-directory/blob/main/app.py): `app.py`

### Persistence

- [SQLAlchemy setup](https://github.com/lucciano-stn/tools-directory/blob/main/app.py): `app.py`
- **Application database**

### User interface

- [Catalogue page](https://github.com/lucciano-stn/tools-directory/blob/main/templates/index.html): `templates/index.html`
- [Tool form](https://github.com/lucciano-stn/tools-directory/blob/main/templates/tool_form.html): `templates/tool_form.html`
- [Services page](https://github.com/lucciano-stn/tools-directory/blob/main/templates/services.html): `templates/services.html`
- [Shared page layout](https://github.com/lucciano-stn/tools-directory/blob/main/templates/base.html): `templates/base.html`
- [Page styling](https://github.com/lucciano-stn/tools-directory/blob/main/static/styles.css): `static/styles.css`

### Other components

- **User**

## Connections

- User → Flask application: uses (evidence: `README.md`)
- Flask application → Browse and search: registers routes (evidence: `app.py`)
- Flask application → Tool management: registers routes (evidence: `app.py`)
- Flask application → Service management: registers routes (evidence: `app.py`)
- Flask application → CSV transfer: registers routes (evidence: `app.py`)
- Flask application → Health endpoint: serves (evidence: `app.py`)
- Browse and search → Tool records: queries (evidence: `app.py`)
- Tool management → Tool records: creates and updates (evidence: `app.py`)
- Tool management → Tool records: deletes (evidence: `app.py`)
- Browse and search → Service records: filters by (evidence: `app.py`)
- Service management → Service records: manages (evidence: `app.py`)
- CSV transfer → Tool records: imports and exports (evidence: `app.py`)
- Flask application → SQLAlchemy setup: initializes (evidence: `app.py`)
- SQLAlchemy setup → Application database: connects to (evidence: `app.py`)
- Tool management → Tool form: renders (evidence: `app.py`)
- Service management → Services page: renders (evidence: `app.py`)
- Browse and search → Catalogue page: renders
- Catalogue page → Shared page layout: extends
- Tool form → Shared page layout: extends
- Services page → Shared page layout: extends
- Shared page layout → Page styling: loads styles
