# electro-kerubin/autofix architecture

> Architecture diagram of the GitHub repository electro-kerubin/autofix, 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/electro-kerubin/autofix
- Repository: https://github.com/electro-kerubin/autofix

## Overview

AutoFix SUGO combines a workshop-operations application with a project-management workspace. The main operational journey runs from customer and vehicle registration through booking, repair-order diagnosis, evidence-backed estimates and customer approval, parts validation, delivery, warranty, and reporting. A separate project workspace manages plans, milestones, risks, changes, and project KPIs. The README documents the workflow and major capabilities; source excerpts and the index establish selected frontend routing and service relationships, so unsampled subsystem links are omitted.

Main entry points: [`Frontend/src/app/api.ts`](https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/api.ts) (API client), [`Backend/src/ordenes-trabajo/ordenes-trabajo.service.ts`](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/ordenes-trabajo/ordenes-trabajo.service.ts) (Repair orders), [`Frontend/src/app/app.ts`](https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/app.ts) (Angular application), [`Backend/src/gestion`](https://github.com/electro-kerubin/autofix/tree/main/Backend/src/gestion) (Plans and changes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_webapp["Angular application<br/>[app.ts]"]
  node_api_client["API client<br/>[api.ts]"]
  node_operations_ui["Operations workspace<br/>[workspace.ts]"]
  node_project_ui["Project workspace"]
  node_portal_ui["Customer portal<br/>[portal.ts]"]
end

subgraph group_identity["Access and foundation"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_database[("PostgreSQL<br/>[database.module.ts]")]
end

subgraph group_workshop["Workshop operations"]
  node_customers["Customers and vehicles"]
  node_reservations["Workshop bookings"]
  node_work_orders["Repair orders"]
  node_evidence["Repair evidence"]
  node_estimates["Estimates and approval"]
  node_parts["Parts and stock"]
  node_warranties["Warranties and history"]
end

subgraph group_project["Project management"]
  node_project_management["Plans and changes"]
  node_gantt["Gantt plans"]
  node_project_metrics["Project indicators<br/>[hitos-kpi.ts]"]
end

subgraph group_insights["Insights and integrations"]
  node_operational_metrics["Operational indicators"]
  node_reporting["Reports and history"]
  node_integrations["External synchronization<br/>[sync.service.ts]"]
end

node_staff(("Workshop staff"))
node_customer(("Vehicle customer"))

node_staff -->|"uses"| node_webapp
node_customer -->|"reviews estimate"| node_portal_ui
node_webapp -->|"invokes"| node_api_client
node_webapp -->|"routes to"| node_operations_ui
node_webapp -->|"routes to"| node_project_ui
node_webapp -->|"routes to"| node_portal_ui
node_operations_ui -->|"uses"| node_api_client
node_project_ui -->|"uses"| node_api_client
node_portal_ui -->|"uses"| node_api_client
node_api_client -.->|"authenticates through"| node_auth
node_api_client -->|"calls API"| node_customers
node_api_client -->|"calls API"| node_reservations
node_api_client -->|"calls API"| node_work_orders
node_api_client -->|"calls API"| node_project_management
node_api_client -->|"calls API"| node_operational_metrics
node_customers -->|"identifies booking"| node_reservations
node_reservations -->|"receives as order"| node_work_orders
node_work_orders -->|"records evidence"| node_evidence
node_work_orders -->|"prepares estimate"| node_estimates
node_customer -->|"approves via portal"| node_estimates
node_work_orders -->|"validates consumption"| node_parts
node_work_orders -->|"generates warranty"| node_warranties
node_work_orders -->|"queues ERP sync"| node_integrations
node_work_orders -->|"supplies history"| node_reporting
node_operational_metrics -->|"reads operational data"| node_database
node_project_management -.->|"manages plans"| node_gantt
node_project_management -->|"tracks milestones and KPIs"| node_project_metrics
node_project_management -.->|"persists project data"| node_database

click node_webapp "https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/app.ts"
click node_api_client "https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/api.ts"
click node_operations_ui "https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/workspace.ts"
click node_project_ui "https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/project-workspace.ts"
click node_portal_ui "https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/portal.ts"
click node_auth "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/auth/auth.service.ts"
click node_customers "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/clientes/clientes.service.ts"
click node_reservations "https://github.com/electro-kerubin/autofix/tree/main/Backend/src/reservas"
click node_work_orders "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/ordenes-trabajo/ordenes-trabajo.service.ts"
click node_evidence "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/ordenes-trabajo/evidencias.service.ts"
click node_estimates "https://github.com/electro-kerubin/autofix/tree/main/Backend/src/presupuestos"
click node_parts "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/repuestos/repuestos.service.ts"
click node_warranties "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/garantias/garantias.service.ts"
click node_project_management "https://github.com/electro-kerubin/autofix/tree/main/Backend/src/gestion"
click node_gantt "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/cartas-gantt/cartas-gantt.service.ts"
click node_project_metrics "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/proyecto/hitos-kpi.ts"
click node_operational_metrics "https://github.com/electro-kerubin/autofix/tree/main/Backend/src/indicadores"
click node_reporting "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/reportes/reportes.service.ts"
click node_integrations "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/integraciones/sync.service.ts"
click node_database "https://github.com/electro-kerubin/autofix/blob/main/Backend/src/database/database.module.ts"

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_webapp,node_api_client,node_operations_ui,node_project_ui,node_portal_ui toneBlue
class node_auth,node_database toneAmber
class node_customers,node_reservations,node_work_orders,node_evidence,node_estimates,node_parts,node_warranties toneMint
class node_project_management,node_gantt,node_project_metrics toneRose
class node_operational_metrics,node_reporting,node_integrations,node_staff,node_customer toneIndigo
```

## Components

### Web application

- [Angular application](https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/app.ts): `Frontend/src/app/app.ts`
- [API client](https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/api.ts): `Frontend/src/app/api.ts`
- [Operations workspace](https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/workspace.ts): `Frontend/src/app/workspace.ts`
- [Project workspace](https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/project-workspace.ts): `Frontend/src/app/project-workspace.ts`
- [Customer portal](https://github.com/electro-kerubin/autofix/blob/main/Frontend/src/app/portal.ts): `Frontend/src/app/portal.ts`

### Access and foundation

- [Authentication](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/auth/auth.service.ts): `Backend/src/auth/auth.service.ts`
- [PostgreSQL](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/database/database.module.ts): `Backend/src/database/database.module.ts`

### Workshop operations

- [Customers and vehicles](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/clientes/clientes.service.ts): `Backend/src/clientes/clientes.service.ts`
- [Workshop bookings](https://github.com/electro-kerubin/autofix/tree/main/Backend/src/reservas): `Backend/src/reservas`
- [Repair orders](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/ordenes-trabajo/ordenes-trabajo.service.ts): `Backend/src/ordenes-trabajo/ordenes-trabajo.service.ts`
- [Repair evidence](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/ordenes-trabajo/evidencias.service.ts): `Backend/src/ordenes-trabajo/evidencias.service.ts`
- [Estimates and approval](https://github.com/electro-kerubin/autofix/tree/main/Backend/src/presupuestos): `Backend/src/presupuestos`
- [Parts and stock](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/repuestos/repuestos.service.ts): `Backend/src/repuestos/repuestos.service.ts`
- [Warranties and history](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/garantias/garantias.service.ts): `Backend/src/garantias/garantias.service.ts`

### Project management

- [Plans and changes](https://github.com/electro-kerubin/autofix/tree/main/Backend/src/gestion): `Backend/src/gestion`
- [Gantt plans](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/cartas-gantt/cartas-gantt.service.ts): `Backend/src/cartas-gantt/cartas-gantt.service.ts`
- [Project indicators](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/proyecto/hitos-kpi.ts): `Backend/src/proyecto/hitos-kpi.ts`

### Insights and integrations

- [Operational indicators](https://github.com/electro-kerubin/autofix/tree/main/Backend/src/indicadores): `Backend/src/indicadores`
- [Reports and history](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/reportes/reportes.service.ts): `Backend/src/reportes/reportes.service.ts`
- [External synchronization](https://github.com/electro-kerubin/autofix/blob/main/Backend/src/integraciones/sync.service.ts): `Backend/src/integraciones/sync.service.ts`

### Other components

- **Workshop staff**
- **Vehicle customer**

## Connections

- Workshop staff → Angular application: uses (evidence: `README.md`)
- Vehicle customer → Customer portal: reviews estimate (evidence: `README.md`)
- Angular application → API client: invokes (evidence: `Frontend/src/app/app.ts`)
- Angular application → Operations workspace: routes to
- Angular application → Project workspace: routes to
- Angular application → Customer portal: routes to
- Operations workspace → API client: uses (evidence: `Frontend/src/app/workspace.ts`)
- Project workspace → API client: uses (evidence: `Frontend/src/app/project-workspace.ts`)
- Customer portal → API client: uses (evidence: `Frontend/src/app/portal.ts`)
- API client → Authentication: authenticates through
- API client → Customers and vehicles: calls API (evidence: `README.md`)
- API client → Workshop bookings: calls API (evidence: `README.md`)
- API client → Repair orders: calls API (evidence: `README.md`)
- API client → Plans and changes: calls API (evidence: `README.md`)
- API client → Operational indicators: calls API (evidence: `README.md`)
- Customers and vehicles → Workshop bookings: identifies booking (evidence: `README.md`)
- Workshop bookings → Repair orders: receives as order (evidence: `README.md`)
- Repair orders → Repair evidence: records evidence (evidence: `README.md`)
- Repair orders → Estimates and approval: prepares estimate (evidence: `README.md`)
- Vehicle customer → Estimates and approval: approves via portal (evidence: `README.md`)
- Repair orders → Parts and stock: validates consumption (evidence: `README.md`)
- Repair orders → Warranties and history: generates warranty (evidence: `README.md`)
- Repair orders → External synchronization: queues ERP sync (evidence: `README.md`)
- Repair orders → Reports and history: supplies history (evidence: `README.md`)
- Operational indicators → PostgreSQL: reads operational data (evidence: `README.md`)
- Plans and changes → Gantt plans: manages plans
- Plans and changes → Project indicators: tracks milestones and KPIs (evidence: `README.md`)
- Plans and changes → PostgreSQL: persists project data
