# aero-oli/teamskillsmatrix architecture

> Architecture diagram of the GitHub repository aero-oli/teamskillsmatrix, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aero-oli/teamskillsmatrix
- Repository: https://github.com/aero-oli/teamskillsmatrix

## Overview

##### Project type and purpose
- This is a full‑stack web application (“Skills Matrix Application”) built on Flask (Python) with a Jinja2/Bootstrap front end, SQLAlchemy ORM, Alembic migrations, and a WSGI server (Waitress for production).
- It provides employee skill tracking, professional development management, an org chart, audit logging, and role‑based access (admin vs. standard user).

##### File structure
- Top‑level files:
– app.py: main Flask app, routes, models, controller logic
– config.py: configuration classes loaded from .env
– database.py: SQLAlchemy database setup
– wsgi.py: entry point for dev (Flask) and prod (Waitress)
– requirements.txt, .env(.example): dependency and environment settings
- migrations/: Alembic config and version scripts (DB migration layer)
- templates/: Jinja2 HTML views (organized into partials “_*.html” and full pages)
- static assets: (if present) or loaded via CDN (Bootstrap, Font Awesome, Google Charts JS)

##### README for additional insights
- Technology stack: Flask, SQLAlchemy, Flask‑Migrate, Bootstrap 5, Vanilla JS, Google Charts, WTForms, Waitress.
- Architectural notes: separate dev (SQLite) vs. prod (MySQL) DB URIs, Flask CLI commands for DB ops, role‑based decorators (@login_required, @admin_required).
- Functional modules: Authentication, Employee Management, Skill Management, Admin Tools (backup/restore), Audit Log, Org Chart, User Guide.

##### Thoroughness
- Essential modules: Auth, Admin Panel, Skills Management, Employee Reports, Org Chart, Audit Log, Backup/Restore.
- Don’t over‑simplify—show both dev and prod DB options, migration pipeline, and CLI tools.
- Review the file tree and README to verify no component is omitted (e.g., config.py, database.py, migrations).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        Browser["User Browser\n(HTML/CSS/JS)"]:::frontend
        Templates["Templates & Static Assets"]:::frontend
    end

    %% Application Layer
    subgraph "Application Layer"
        HTTPServer["WSGI Server\n(wsgi.py, Waitress)"]:::backend
        FlaskApp["Flask App\n(app.py, WTForms, Jinja2)"]:::backend
    end

    %% Data Layer
    subgraph "Data Layer"
        Database["Database\n(SQLite/MySQL)"]:::data
        Migrations["Migration Engine\n(Alembic/Flask‑Migrate)"]:::data
    end

    %% External Services
    subgraph "External Services"
        SMTP["SMTP Service"]:::external
        GoogleCharts["Google Charts API"]:::external
    end

    %% Module Breakdown
    subgraph "Flask Modules"
        Auth["Authentication Module"]:::backend
        EmployeeMgmt["Employee Management"]:::backend
        SkillMgmt["Skill Management"]:::backend
        AdminTools["Admin Tools"]:::backend
        AuditLog["Audit Log Module"]:::backend
        OrgChart["Org Chart Module"]:::backend
        Reports["Reports & Tables"]:::backend
        UserGuide["User Guide"]:::backend
        RoleControl["Role-Based Access Control"]:::backend
        Config["Configuration Management"]:::backend
        Requirements["Requirements & Dependencies"]:::backend
    end

    %% Connections
    Browser -->|"HTTP/S Requests"| HTTPServer
    HTTPServer -->|"WSGI Call"| FlaskApp
    FlaskApp -->|"Renders Templates"| Templates
    FlaskApp -->|"Sends Email"| SMTP
    Browser -->|"JS Calls"| GoogleCharts

    FlaskApp -->|"SQLAlchemy ORM"| Database
    Migrations -->|"Schema Migration"| Database
    FlaskApp -->|"CLI Commands"| Migrations

    %% Modules relationships
    FlaskApp --> Auth
    FlaskApp --> EmployeeMgmt
    FlaskApp --> SkillMgmt
    FlaskApp --> AdminTools
    FlaskApp --> AuditLog
    FlaskApp --> OrgChart
    FlaskApp --> Reports
    FlaskApp --> UserGuide
    FlaskApp --> RoleControl
    FlaskApp --> Config
    FlaskApp --> Requirements

    %% Click Events
    click Browser "https://github.com/aero-oli/teamskillsmatrix/tree/main/templates/"
    click Templates "https://github.com/aero-oli/teamskillsmatrix/tree/main/templates/"
    click HTTPServer "https://github.com/aero-oli/teamskillsmatrix/blob/main/wsgi.py"
    click FlaskApp "https://github.com/aero-oli/teamskillsmatrix/blob/main/app.py"
    click Config "https://github.com/aero-oli/teamskillsmatrix/blob/main/.env"
    click Config "https://github.com/aero-oli/teamskillsmatrix/blob/main/.env.example"
    click Config "https://github.com/aero-oli/teamskillsmatrix/blob/main/config.py"
    click Database "https://github.com/aero-oli/teamskillsmatrix/blob/main/database.py"
    click Migrations "https://github.com/aero-oli/teamskillsmatrix/tree/main/migrations/"
    click Auth "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/login.html"
    click Auth "https://github.com/aero-oli/teamskillsmatrix/blob/main/app.py"
    click EmployeeMgmt "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/add_employee.html"
    click EmployeeMgmt "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/edit_employee.html"
    click EmployeeMgmt "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/profile.html"
    click EmployeeMgmt "https://github.com/aero-oli/teamskillsmatrix/blob/main/app.py"
    click SkillMgmt "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/add_skill.html"
    click SkillMgmt "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/update_skills.html"
    click SkillMgmt "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/_skill_form_fields.html"
    click SkillMgmt "https://github.com/aero-oli/teamskillsmatrix/blob/main/app.py"
    click AdminTools "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/admin.html"
    click AdminTools "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/_admin_users_table.html"
    click AdminTools "https://github.com/aero-oli/teamskillsmatrix/blob/main/app.py"
    click AuditLog "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/audit_log.html"
    click AuditLog "https://github.com/aero-oli/teamskillsmatrix/blob/main/migrations/versions/7357c0f64e56_add_auditlog_model.py"
    click OrgChart "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/org_chart.html"
    click Reports "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/employee_report.html"
    click Reports "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/_employee_table.html"
    click Reports "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/_skills_table.html"
    click Reports "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/_levels_table.html"
    click Reports "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/_projects_table.html"
    click UserGuide "https://github.com/aero-oli/teamskillsmatrix/blob/main/templates/user_guide.html"
    click RoleControl "https://github.com/aero-oli/teamskillsmatrix/blob/main/app.py"
    click Requirements "https://github.com/aero-oli/teamskillsmatrix/blob/main/requirements.txt"

    %% Styles
    classDef frontend fill:#8ecae6,stroke:#023047,color:#000
    classDef backend fill:#219ebc,stroke:#023047,color:#fff
    classDef data fill:#ffb703,stroke:#023047,color:#000
    classDef external fill:#adb5bd,stroke:#023047,color:#000
```
