# lucyneitor/castillo architecture

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

- Interactive diagram: https://gitdiagram.com/lucyneitor/castillo
- Repository: https://github.com/lucyneitor/castillo

## Overview

EcoTech Solutions is documented as an MVC/DAO business-management system for employees, departments, projects, time tracking, users, and reports. The intended user flow is through views to controllers, which coordinate business operations and persistence, with results presented back to users. The checked-in source is much smaller than the README’s described structure: controller and view implementations are absent, and the DAO files shown are empty. Accordingly, most workflow links reflect documented architecture, not verified calls.

Main entry points: [`controllers`](https://github.com/lucyneitor/castillo/tree/main/controllers) (Business controllers), [`config/database.py`](https://github.com/lucyneitor/castillo/blob/main/config/database.py) (Database connection), [`views`](https://github.com/lucyneitor/castillo/tree/main/views) (Management views), [`models`](https://github.com/lucyneitor/castillo/tree/main/models) (Persistence DAOs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interaction"]
  node_views["Management views"]
  node_controllers["Business controllers"]
end

subgraph group_business["Business domain"]
  node_entities["Business entities"]
  node_department["Department model<br/>[departamento.py]"]
  node_report["Report model<br/>[informe.py]"]
end

subgraph group_persistence["Persistence"]
  node_daos["Persistence DAOs"]
  node_database["Database connection<br/>[database.py]"]
  node_sqlite[("SQLite database")]
end

node_employee_user(("Employee / admin"))

node_employee_user -.->|"uses"| node_views
node_views -.->|"routes requests"| node_controllers
node_controllers -.->|"coordinates"| node_entities
node_controllers -.->|"requests persistence"| node_daos
node_controllers -.->|"returns results"| node_views
node_database -->|"opens connection"| node_sqlite
node_database -->|"creates tables"| node_sqlite
node_daos -.->|"uses connection"| node_database

click node_views "https://github.com/lucyneitor/castillo/tree/main/views"
click node_controllers "https://github.com/lucyneitor/castillo/tree/main/controllers"
click node_entities "https://github.com/lucyneitor/castillo/tree/main/models"
click node_department "https://github.com/lucyneitor/castillo/blob/main/models/departamento.py"
click node_report "https://github.com/lucyneitor/castillo/blob/main/models/informe.py"
click node_daos "https://github.com/lucyneitor/castillo/tree/main/models"
click node_database "https://github.com/lucyneitor/castillo/blob/main/config/database.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_views,node_controllers toneBlue
class node_entities,node_department,node_report toneAmber
class node_daos,node_database,node_sqlite toneMint
class node_employee_user toneIndigo
```

## Components

### User interaction

- [Management views](https://github.com/lucyneitor/castillo/tree/main/views): `views`
- [Business controllers](https://github.com/lucyneitor/castillo/tree/main/controllers): `controllers`

### Business domain

- [Business entities](https://github.com/lucyneitor/castillo/tree/main/models): `models`
- [Department model](https://github.com/lucyneitor/castillo/blob/main/models/departamento.py): `models/departamento.py`
- [Report model](https://github.com/lucyneitor/castillo/blob/main/models/informe.py): `models/informe.py`

### Persistence

- [Persistence DAOs](https://github.com/lucyneitor/castillo/tree/main/models): `models`
- [Database connection](https://github.com/lucyneitor/castillo/blob/main/config/database.py): `config/database.py`
- **SQLite database**

### Other components

- **Employee / admin**

## Connections

- Employee / admin → Management views: uses (evidence: `README.md`)
- Management views → Business controllers: routes requests (evidence: `README.md`)
- Business controllers → Business entities: coordinates (evidence: `README.md`)
- Business controllers → Persistence DAOs: requests persistence (evidence: `README.md`)
- Business controllers → Management views: returns results
- Database connection → SQLite database: opens connection (evidence: `config/database.py`)
- Database connection → SQLite database: creates tables (evidence: `config/database.py`)
- Persistence DAOs → Database connection: uses connection (evidence: `README.md`)
