# blacknight3648/gestion-proyectos architecture

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

- Interactive diagram: https://gitdiagram.com/blacknight3648/gestion-proyectos
- Repository: https://github.com/blacknight3648/gestion-proyectos

## Overview

SGP is a Django project-management and change-control application. Users sign in through Okta/Auth0, then directors or read-only team members work with project plans, resources, change requests, and dashboards. The main domain flow covers WBS planning, dependency-based scheduling, resource/cost oversight, and formal change propagation; KPI calculations summarize project and change performance. The source index and excerpts establish the principal service calls, but many view details and subsystem implementations were not sampled, so unsupported links are omitted.

Main entry points: [`webappexample/gestion/views.py`](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/views.py) (Project Views), [`webappexample/gestion/models.py`](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/models.py) (Project Domain), [`webappexample/webappexample/urls.py`](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/webappexample/urls.py) (Site Router), [`webappexample/webappexample/views.py`](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/webappexample/views.py) (SSO Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Routing"]
  node_router["Site Router<br/>[urls.py]"]
  node_login["SSO Views<br/>[views.py]"]
  node_auth["Role Authorization<br/>[auth_service.py]"]
  node_middleware["Auth Middleware<br/>[middleware.py]"]
  node_routes["Business Routes<br/>[urls.py]"]
end

subgraph group_planning["Project Planning"]
  node_domain["Project Domain<br/>[models.py]"]
  node_wbs["WBS Engine<br/>[wbs_service.py]"]
  node_schedule["Precedence Engine"]
  node_demo["Demo Data Seeder<br/>[seed_demo_data.py]"]
end

subgraph group_operations["Project Operations"]
  node_resources["Resource Analysis"]
end

subgraph group_change["Change Control"]
  node_changeflow["Change Propagation"]
end

subgraph group_insight["Analytics and UI"]
  node_controllers["Project Views<br/>[views.py]"]
  node_kpis["KPI Engine<br/>[kpi_service.py]"]
  node_dashboards["Project Dashboards<br/>[views.py]"]
  node_templates["Web Interface"]
end

node_user(("Project User"))
node_identity{{"Okta / Auth0"}}
node_store[("SQLite Database")]

node_user -->|"opens app"| node_router
node_router -->|"routes auth"| node_login
node_router -->|"includes routes"| node_routes
node_login -->|"OIDC exchange"| node_identity
node_login -->|"checks identity"| node_auth
node_middleware -->|"checks roles"| node_auth
node_routes -->|"routes requests"| node_controllers
node_controllers -->|"checks permissions"| node_auth
node_controllers -->|"reads and writes"| node_domain
node_domain -.->|"persists records"| node_store
node_controllers -->|"builds WBS"| node_wbs
node_controllers -->|"recalculates dates"| node_schedule
node_controllers -->|"checks allocation"| node_resources
node_controllers -->|"advances changes"| node_changeflow
node_controllers -->|"calculates metrics"| node_kpis
node_changeflow -->|"recalculates cascade"| node_schedule
node_wbs -.->|"reads hierarchy"| node_domain
node_schedule -->|"reads dependencies"| node_domain
node_resources -->|"reads assignments"| node_domain
node_changeflow -->|"updates impacts"| node_domain
node_kpis -->|"reads measures"| node_domain
node_controllers -->|"loads demo"| node_demo
node_controllers -->|"renders dashboards"| node_dashboards
node_dashboards -.->|"renders views"| node_templates
node_user -.->|"views interface"| node_templates

click node_router "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/webappexample/urls.py"
click node_login "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/webappexample/views.py"
click node_auth "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/auth_service.py"
click node_middleware "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/middleware.py"
click node_routes "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/urls.py"
click node_controllers "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/views.py"
click node_domain "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/models.py"
click node_wbs "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/wbs_service.py"
click node_schedule "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/precedencias_service.py"
click node_resources "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/recursos_service.py"
click node_changeflow "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/propagacion_service.py"
click node_kpis "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/kpi_service.py"
click node_dashboards "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/views.py"
click node_demo "https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/management/commands/seed_demo_data.py"
click node_templates "https://github.com/blacknight3648/gestion-proyectos/tree/main/webappexample/webappexample/templates/gestion"

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_router,node_login,node_auth,node_middleware,node_routes,node_user toneBlue
class node_domain,node_wbs,node_schedule,node_demo,node_store toneAmber
class node_resources toneMint
class node_changeflow toneRose
class node_controllers,node_kpis,node_dashboards,node_templates,node_identity toneIndigo
```

## Components

### Access and Routing

- [Site Router](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/webappexample/urls.py): `webappexample/webappexample/urls.py`
- [SSO Views](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/webappexample/views.py): `webappexample/webappexample/views.py`
- [Role Authorization](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/auth_service.py): `webappexample/gestion/services/auth_service.py`
- [Auth Middleware](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/middleware.py): `webappexample/gestion/middleware.py`
- [Business Routes](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/urls.py): `webappexample/gestion/urls.py`

### Project Planning

- [Project Domain](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/models.py): `webappexample/gestion/models.py`
- [WBS Engine](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/wbs_service.py): `webappexample/gestion/services/wbs_service.py`
- [Precedence Engine](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/precedencias_service.py): `webappexample/gestion/services/precedencias_service.py`
- [Demo Data Seeder](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/management/commands/seed_demo_data.py): `webappexample/gestion/management/commands/seed_demo_data.py`

### Project Operations

- [Resource Analysis](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/recursos_service.py): `webappexample/gestion/services/recursos_service.py`

### Change Control

- [Change Propagation](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/propagacion_service.py): `webappexample/gestion/services/propagacion_service.py`

### Analytics and UI

- [Project Views](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/views.py): `webappexample/gestion/views.py`
- [KPI Engine](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/services/kpi_service.py): `webappexample/gestion/services/kpi_service.py`
- [Project Dashboards](https://github.com/blacknight3648/gestion-proyectos/blob/main/webappexample/gestion/views.py): `webappexample/gestion/views.py`
- [Web Interface](https://github.com/blacknight3648/gestion-proyectos/tree/main/webappexample/webappexample/templates/gestion): `webappexample/webappexample/templates/gestion`

### Other components

- **Project User**
- **Okta / Auth0**
- **SQLite Database**

## Connections

- Project User → Site Router: opens app (evidence: `webappexample/webappexample/urls.py`)
- Site Router → SSO Views: routes auth (evidence: `webappexample/webappexample/urls.py`)
- Site Router → Business Routes: includes routes (evidence: `webappexample/webappexample/urls.py`)
- SSO Views → Okta / Auth0: OIDC exchange (evidence: `webappexample/webappexample/views.py`)
- SSO Views → Role Authorization: checks identity (evidence: `webappexample/webappexample/views.py`)
- Auth Middleware → Role Authorization: checks roles (evidence: `webappexample/gestion/middleware.py`)
- Business Routes → Project Views: routes requests (evidence: `webappexample/gestion/urls.py`)
- Project Views → Role Authorization: checks permissions (evidence: `webappexample/gestion/views.py`)
- Project Views → Project Domain: reads and writes (evidence: `webappexample/gestion/views.py`)
- Project Domain → SQLite Database: persists records (evidence: `README.md`)
- Project Views → WBS Engine: builds WBS (evidence: `webappexample/gestion/views.py`)
- Project Views → Precedence Engine: recalculates dates (evidence: `webappexample/gestion/views.py`)
- Project Views → Resource Analysis: checks allocation (evidence: `webappexample/gestion/views.py`)
- Project Views → Change Propagation: advances changes (evidence: `webappexample/gestion/views.py`)
- Project Views → KPI Engine: calculates metrics (evidence: `webappexample/gestion/views.py`)
- Change Propagation → Precedence Engine: recalculates cascade (evidence: `webappexample/gestion/services/propagacion_service.py`)
- WBS Engine → Project Domain: reads hierarchy
- Precedence Engine → Project Domain: reads dependencies (evidence: `webappexample/gestion/services/precedencias_service.py`)
- Resource Analysis → Project Domain: reads assignments (evidence: `webappexample/gestion/services/recursos_service.py`)
- Change Propagation → Project Domain: updates impacts (evidence: `webappexample/gestion/services/propagacion_service.py`)
- KPI Engine → Project Domain: reads measures (evidence: `webappexample/gestion/services/kpi_service.py`)
- Project Views → Demo Data Seeder: loads demo (evidence: `webappexample/gestion/views.py`)
- Project Views → Project Dashboards: renders dashboards (evidence: `README.md`)
- Project Dashboards → Web Interface: renders views
- Project User → Web Interface: views interface
