# smoposa/sipeip architecture

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

- Interactive diagram: https://gitdiagram.com/smoposa/sipeip
- Repository: https://github.com/smoposa/sipeip

## Overview

This appears to be a Spanish-language institutional planning and public-investment management application built on Laravel. Its main workflow manages institutional plans and their objectives, goals, and indicators; the tree also shows investment classification, programs and projects, progress and budget tracking, reporting, administration, and auditing. The sampled plan controller calls a plan service, and the provider binds repository interfaces to Eloquent implementations. The README is generic Laravel material, so product capabilities are inferred from the application tree; unsampled subsystem links are omitted rather than assumed.

Main entry points: [`app/Repositories/Contracts/ClasificacionInversionRepositoryInterface.php`](https://github.com/smoposa/sipeip/blob/main/app/Repositories/Contracts/ClasificacionInversionRepositoryInterface.php) (Classification contract), [`app/Models/Plan.php`](https://github.com/smoposa/sipeip/blob/main/app/Models/Plan.php) (Institutional plans), [`app/Services/ClasificacionInversionService.php`](https://github.com/smoposa/sipeip/blob/main/app/Services/ClasificacionInversionService.php) (Investment classification), [`app/Models/User.php`](https://github.com/smoposa/sipeip/blob/main/app/Models/User.php) (Users and roles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Planning"]
  node_plan_controller["Plan workflow<br/>[PlanController.php]"]
  node_plan_service["Plan rules<br/>[PlanService.php]"]
  node_plan_model[("Institutional plans<br/>[Plan.php]")]
  node_objectives[("Objectives<br/>[Objetivo.php]")]
  node_goals[("Goals<br/>[Meta.php]")]
  node_indicators[("Indicators<br/>[Indicador.php]")]
  node_pnd["National plan<br/>[PndService.php]"]
  node_ods["ODS alignment<br/>[OdsService.php]"]
end

subgraph group_investment["Investment"]
  node_classification_service["Investment classification"]
  node_classification_repository["Classification repository"]
  node_classification_interface["Classification contract"]
  node_macrosector[("Macro-sectors<br/>[Macrosector.php]")]
  node_sector[("Sectors<br/>[Sector.php]")]
  node_subsector[("Sub-sectors<br/>[Subsector.php]")]
  node_programs[("Programs<br/>[Programa.php]")]
  node_projects[("Projects<br/>[Proyecto.php]")]
end

subgraph group_tracking["Tracking and reports"]
  node_progress["Progress tracking<br/>[AvanceService.php]"]
  node_budgets["Budget tracking"]
  node_reports["Reports<br/>[ReporteService.php]"]
end

subgraph group_platform["Administration and security"]
  node_entity[("Institutions<br/>[Entidad.php]")]
  node_audit["Audit trail"]
  node_auth["Authentication"]
  node_users[("Users and roles<br/>[User.php]")]
  node_repository_bindings["Repository bindings"]
end

node_staff(("Institutional user"))

node_staff -.->|"manages plans"| node_plan_controller
node_plan_controller -->|"calls"| node_plan_service
node_plan_model -->|"belongs to"| node_entity
node_plan_model -->|"has objectives"| node_objectives
node_objectives -.->|"has goals"| node_goals
node_goals -->|"has indicators"| node_indicators
node_indicators -->|"has advances"| node_progress
node_classification_service -->|"uses contract"| node_classification_interface
node_classification_interface -->|"queries"| node_macrosector
node_classification_interface -->|"queries"| node_sector
node_classification_interface -->|"queries"| node_subsector
node_classification_service -.->|"delegates to"| node_classification_repository
node_repository_bindings -->|"binds"| node_classification_interface
node_repository_bindings -->|"binds"| node_classification_repository
node_users -->|"belongs to"| node_entity
node_users -->|"has plans"| node_plan_model
node_auth -->|"records sessions"| node_audit

click node_plan_controller "https://github.com/smoposa/sipeip/blob/main/app/Http/Controllers/PlanController.php"
click node_plan_service "https://github.com/smoposa/sipeip/blob/main/app/Services/PlanService.php"
click node_plan_model "https://github.com/smoposa/sipeip/blob/main/app/Models/Plan.php"
click node_objectives "https://github.com/smoposa/sipeip/blob/main/app/Models/Objetivo.php"
click node_goals "https://github.com/smoposa/sipeip/blob/main/app/Models/Meta.php"
click node_indicators "https://github.com/smoposa/sipeip/blob/main/app/Models/Indicador.php"
click node_pnd "https://github.com/smoposa/sipeip/blob/main/app/Services/PndService.php"
click node_ods "https://github.com/smoposa/sipeip/blob/main/app/Services/OdsService.php"
click node_entity "https://github.com/smoposa/sipeip/blob/main/app/Models/Entidad.php"
click node_classification_service "https://github.com/smoposa/sipeip/blob/main/app/Services/ClasificacionInversionService.php"
click node_classification_repository "https://github.com/smoposa/sipeip/blob/main/app/Repositories/Eloquent/ClasificacionInversionRepository.php"
click node_classification_interface "https://github.com/smoposa/sipeip/blob/main/app/Repositories/Contracts/ClasificacionInversionRepositoryInterface.php"
click node_macrosector "https://github.com/smoposa/sipeip/blob/main/app/Models/Macrosector.php"
click node_sector "https://github.com/smoposa/sipeip/blob/main/app/Models/Sector.php"
click node_subsector "https://github.com/smoposa/sipeip/blob/main/app/Models/Subsector.php"
click node_programs "https://github.com/smoposa/sipeip/blob/main/app/Models/Programa.php"
click node_projects "https://github.com/smoposa/sipeip/blob/main/app/Models/Proyecto.php"
click node_progress "https://github.com/smoposa/sipeip/blob/main/app/Services/AvanceService.php"
click node_budgets "https://github.com/smoposa/sipeip/blob/main/app/Services/PresupuestoService.php"
click node_reports "https://github.com/smoposa/sipeip/blob/main/app/Services/ReporteService.php"
click node_audit "https://github.com/smoposa/sipeip/blob/main/app/Http/Controllers/AuditoriaController.php"
click node_auth "https://github.com/smoposa/sipeip/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_users "https://github.com/smoposa/sipeip/blob/main/app/Models/User.php"
click node_repository_bindings "https://github.com/smoposa/sipeip/blob/main/app/Providers/RepositoryServiceProvider.php"

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_plan_controller,node_plan_service,node_plan_model,node_objectives,node_goals,node_indicators,node_pnd,node_ods,node_staff toneBlue
class node_classification_service,node_classification_repository,node_classification_interface,node_macrosector,node_sector,node_subsector,node_programs,node_projects toneAmber
class node_progress,node_budgets,node_reports toneMint
class node_entity,node_audit,node_auth,node_users,node_repository_bindings toneRose
```

## Components

### Planning

- [Plan workflow](https://github.com/smoposa/sipeip/blob/main/app/Http/Controllers/PlanController.php): `app/Http/Controllers/PlanController.php`
- [Plan rules](https://github.com/smoposa/sipeip/blob/main/app/Services/PlanService.php): `app/Services/PlanService.php`
- [Institutional plans](https://github.com/smoposa/sipeip/blob/main/app/Models/Plan.php): `app/Models/Plan.php`
- [Objectives](https://github.com/smoposa/sipeip/blob/main/app/Models/Objetivo.php): `app/Models/Objetivo.php`
- [Goals](https://github.com/smoposa/sipeip/blob/main/app/Models/Meta.php): `app/Models/Meta.php`
- [Indicators](https://github.com/smoposa/sipeip/blob/main/app/Models/Indicador.php): `app/Models/Indicador.php`
- [National plan](https://github.com/smoposa/sipeip/blob/main/app/Services/PndService.php): `app/Services/PndService.php`
- [ODS alignment](https://github.com/smoposa/sipeip/blob/main/app/Services/OdsService.php): `app/Services/OdsService.php`

### Investment

- [Investment classification](https://github.com/smoposa/sipeip/blob/main/app/Services/ClasificacionInversionService.php): `app/Services/ClasificacionInversionService.php`
- [Classification repository](https://github.com/smoposa/sipeip/blob/main/app/Repositories/Eloquent/ClasificacionInversionRepository.php): `app/Repositories/Eloquent/ClasificacionInversionRepository.php`
- [Classification contract](https://github.com/smoposa/sipeip/blob/main/app/Repositories/Contracts/ClasificacionInversionRepositoryInterface.php): `app/Repositories/Contracts/ClasificacionInversionRepositoryInterface.php`
- [Macro-sectors](https://github.com/smoposa/sipeip/blob/main/app/Models/Macrosector.php): `app/Models/Macrosector.php`
- [Sectors](https://github.com/smoposa/sipeip/blob/main/app/Models/Sector.php): `app/Models/Sector.php`
- [Sub-sectors](https://github.com/smoposa/sipeip/blob/main/app/Models/Subsector.php): `app/Models/Subsector.php`
- [Programs](https://github.com/smoposa/sipeip/blob/main/app/Models/Programa.php): `app/Models/Programa.php`
- [Projects](https://github.com/smoposa/sipeip/blob/main/app/Models/Proyecto.php): `app/Models/Proyecto.php`

### Tracking and reports

- [Progress tracking](https://github.com/smoposa/sipeip/blob/main/app/Services/AvanceService.php): `app/Services/AvanceService.php`
- [Budget tracking](https://github.com/smoposa/sipeip/blob/main/app/Services/PresupuestoService.php): `app/Services/PresupuestoService.php`
- [Reports](https://github.com/smoposa/sipeip/blob/main/app/Services/ReporteService.php): `app/Services/ReporteService.php`

### Administration and security

- [Institutions](https://github.com/smoposa/sipeip/blob/main/app/Models/Entidad.php): `app/Models/Entidad.php`
- [Audit trail](https://github.com/smoposa/sipeip/blob/main/app/Http/Controllers/AuditoriaController.php): `app/Http/Controllers/AuditoriaController.php`
- [Authentication](https://github.com/smoposa/sipeip/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Users and roles](https://github.com/smoposa/sipeip/blob/main/app/Models/User.php): `app/Models/User.php`
- [Repository bindings](https://github.com/smoposa/sipeip/blob/main/app/Providers/RepositoryServiceProvider.php): `app/Providers/RepositoryServiceProvider.php`

### Other components

- **Institutional user**

## Connections

- Institutional user → Plan workflow: manages plans
- Plan workflow → Plan rules: calls (evidence: `app/Http/Controllers/PlanController.php`)
- Institutional plans → Institutions: belongs to (evidence: `app/Models/Plan.php`)
- Institutional plans → Objectives: has objectives (evidence: `app/Models/Plan.php`)
- Objectives → Goals: has goals (evidence: `app/Models/Meta.php`)
- Goals → Indicators: has indicators (evidence: `app/Models/Meta.php`)
- Indicators → Progress tracking: has advances (evidence: `app/Models/Indicador.php`)
- Investment classification → Classification contract: uses contract (evidence: `app/Services/ClasificacionInversionService.php`)
- Classification contract → Macro-sectors: queries (evidence: `app/Repositories/Contracts/ClasificacionInversionRepositoryInterface.php`)
- Classification contract → Sectors: queries (evidence: `app/Repositories/Contracts/ClasificacionInversionRepositoryInterface.php`)
- Classification contract → Sub-sectors: queries (evidence: `app/Repositories/Contracts/ClasificacionInversionRepositoryInterface.php`)
- Investment classification → Classification repository: delegates to
- Repository bindings → Classification contract: binds (evidence: `app/Providers/RepositoryServiceProvider.php`)
- Repository bindings → Classification repository: binds (evidence: `app/Providers/RepositoryServiceProvider.php`)
- Users and roles → Institutions: belongs to (evidence: `app/Models/User.php`)
- Users and roles → Institutional plans: has plans (evidence: `app/Models/User.php`)
- Authentication → Audit trail: records sessions (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
