# cristian-lillo-dev/front_elec architecture

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

- Interactive diagram: https://gitdiagram.com/cristian-lillo-dev/front_elec
- Repository: https://github.com/cristian-lillo-dev/front_elec

## Overview

AreaElectrica is a Spanish-language electrical training and SEC RIC reference application. Users authenticate, enter a learning dashboard, select training units or calculation tools, and can consult an RIC assistant or browse regulatory documents. The source excerpts show the app-level routing, unit loading, assistant request, and PDF catalog wiring. Several listed modules—including the route-map and lesson implementations—were not sampled, so their internal behavior and connections are not inferred.

Main entry points: [`src/Dashboard.jsx`](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/Dashboard.jsx) (Learning dashboard), [`src/App.jsx`](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/App.jsx) (App routing), [`src/DetalleUnidad.jsx`](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/DetalleUnidad.jsx) (Unit detail), [`src/PliegosRIC.jsx`](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/PliegosRIC.jsx) (RIC document library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application flow"]
  node_app["App routing<br/>[App.jsx]"]
  node_auth["Authentication<br/>[Auth.jsx]"]
  node_dashboard["Learning dashboard<br/>[Dashboard.jsx]"]
  node_learning_api{{"Learning API"}}
end

subgraph group_learning["Training experience"]
  node_unit_detail["Unit detail<br/>[DetalleUnidad.jsx]"]
  node_lesson["Lesson modal<br/>[LeccionModal.jsx]"]
  node_route_map["RIC route map<br/>[MapaRutaRIC.jsx]"]
  node_map_view["Map view<br/>[mapa.jsx]"]
  node_particle_test["Particle view<br/>[TestParticulas.jsx]"]
end

subgraph group_tools["Electrical tools"]
  node_alimentadores["Feeder calculator"]
  node_grounding["Grounding calculator"]
  node_ohm["Ohm calculator"]
  node_power_factor["Power factor calculator"]
end

subgraph group_ric["RIC reference"]
  node_ric_library["RIC document library<br/>[PliegosRIC.jsx]"]
  node_ric_catalog["RIC catalog<br/>[pliegosRic.js]"]
  node_ric_pdfs["RIC PDF documents"]
  node_assistant["RIC assistant<br/>[AsistenteRIC.jsx]"]
  node_ric_api{{"RIC answer service"}}
end

subgraph group_shared["Shared interface"]
  node_navbar["HUD navigation<br/>[NavbarHUD.jsx]"]
  node_sounds["Sound effects<br/>[soundEffects.js]"]
end

node_learner(("Learner"))

node_learner -->|"opens"| node_app
node_app -->|"renders unauthenticated"| node_auth
node_app -->|"renders signed-in"| node_dashboard
node_app -->|"routes to library"| node_ric_library
node_auth -.->|"posts credentials"| node_learning_api
node_dashboard -->|"fetches units"| node_learning_api
node_dashboard -->|"renders unit"| node_unit_detail
node_unit_detail -->|"opens lesson"| node_lesson
node_dashboard -->|"renders calculator"| node_alimentadores
node_dashboard -->|"renders calculator"| node_grounding
node_dashboard -->|"renders calculator"| node_ohm
node_dashboard -->|"renders calculator"| node_power_factor
node_dashboard -->|"renders assistant"| node_assistant
node_ric_library -->|"reads catalog"| node_ric_catalog
node_ric_catalog -->|"loads PDF assets"| node_ric_pdfs
node_ric_library -->|"renders assistant"| node_assistant
node_assistant -->|"asks question"| node_ric_api
node_auth -->|"renders"| node_navbar
node_unit_detail -->|"renders"| node_navbar
node_ric_library -->|"renders"| node_navbar
node_dashboard -.->|"provides route-map capability"| node_route_map
node_dashboard -.->|"provides map capability"| node_map_view
node_unit_detail -.->|"particle-view relationship unverified"| node_particle_test

click node_app "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/App.jsx"
click node_auth "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/Auth.jsx"
click node_dashboard "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/Dashboard.jsx"
click node_unit_detail "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/DetalleUnidad.jsx"
click node_lesson "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/LeccionModal.jsx"
click node_route_map "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/MapaRutaRIC.jsx"
click node_map_view "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/mapa.jsx"
click node_alimentadores "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/CalculadoraAlimentadores.jsx"
click node_grounding "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/CalculadoraPuestaTierra.jsx"
click node_ohm "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/CalculadoraLeyOhm.jsx"
click node_power_factor "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/CalculadoraFactorPotencia.jsx"
click node_ric_library "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/PliegosRIC.jsx"
click node_ric_catalog "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/data/pliegosRic.js"
click node_ric_pdfs "https://github.com/cristian-lillo-dev/front_elec/tree/master/src/data"
click node_assistant "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/AsistenteRIC.jsx"
click node_navbar "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/NavbarHUD.jsx"
click node_sounds "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/soundEffects.js"
click node_particle_test "https://github.com/cristian-lillo-dev/front_elec/blob/master/src/TestParticulas.jsx"

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_app,node_auth,node_dashboard,node_learning_api toneBlue
class node_unit_detail,node_lesson,node_route_map,node_map_view,node_particle_test toneAmber
class node_alimentadores,node_grounding,node_ohm,node_power_factor toneMint
class node_ric_library,node_ric_catalog,node_ric_pdfs,node_assistant,node_ric_api toneRose
class node_navbar,node_sounds,node_learner toneIndigo
```

## Components

### Application flow

- [App routing](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/App.jsx): `src/App.jsx`
- [Authentication](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/Auth.jsx): `src/Auth.jsx`
- [Learning dashboard](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/Dashboard.jsx): `src/Dashboard.jsx`
- **Learning API**

### Training experience

- [Unit detail](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/DetalleUnidad.jsx): `src/DetalleUnidad.jsx`
- [Lesson modal](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/LeccionModal.jsx): `src/LeccionModal.jsx`
- [RIC route map](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/MapaRutaRIC.jsx): `src/MapaRutaRIC.jsx`
- [Map view](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/mapa.jsx): `src/mapa.jsx`
- [Particle view](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/TestParticulas.jsx): `src/TestParticulas.jsx`

### Electrical tools

- [Feeder calculator](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/CalculadoraAlimentadores.jsx): `src/CalculadoraAlimentadores.jsx`
- [Grounding calculator](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/CalculadoraPuestaTierra.jsx): `src/CalculadoraPuestaTierra.jsx`
- [Ohm calculator](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/CalculadoraLeyOhm.jsx): `src/CalculadoraLeyOhm.jsx`
- [Power factor calculator](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/CalculadoraFactorPotencia.jsx): `src/CalculadoraFactorPotencia.jsx`

### RIC reference

- [RIC document library](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/PliegosRIC.jsx): `src/PliegosRIC.jsx`
- [RIC catalog](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/data/pliegosRic.js): `src/data/pliegosRic.js`
- [RIC PDF documents](https://github.com/cristian-lillo-dev/front_elec/tree/master/src/data): `src/data`
- [RIC assistant](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/AsistenteRIC.jsx): `src/AsistenteRIC.jsx`
- **RIC answer service**

### Shared interface

- [HUD navigation](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/NavbarHUD.jsx): `src/NavbarHUD.jsx`
- [Sound effects](https://github.com/cristian-lillo-dev/front_elec/blob/master/src/soundEffects.js): `src/soundEffects.js`

### Other components

- **Learner**

## Connections

- Learner → App routing: opens
- App routing → Authentication: renders unauthenticated (evidence: `src/App.jsx`)
- App routing → Learning dashboard: renders signed-in (evidence: `src/App.jsx`)
- App routing → RIC document library: routes to library (evidence: `src/App.jsx`)
- Authentication → Learning API: posts credentials (evidence: `src/Auth.jsx`)
- Learning dashboard → Learning API: fetches units (evidence: `src/Dashboard.jsx`)
- Learning dashboard → Unit detail: renders unit (evidence: `src/Dashboard.jsx`)
- Unit detail → Lesson modal: opens lesson (evidence: `src/DetalleUnidad.jsx`)
- Learning dashboard → Feeder calculator: renders calculator (evidence: `src/Dashboard.jsx`)
- Learning dashboard → Grounding calculator: renders calculator (evidence: `src/Dashboard.jsx`)
- Learning dashboard → Ohm calculator: renders calculator (evidence: `src/Dashboard.jsx`)
- Learning dashboard → Power factor calculator: renders calculator (evidence: `src/Dashboard.jsx`)
- Learning dashboard → RIC assistant: renders assistant (evidence: `src/Dashboard.jsx`)
- RIC document library → RIC catalog: reads catalog (evidence: `src/PliegosRIC.jsx`)
- RIC catalog → RIC PDF documents: loads PDF assets (evidence: `src/data/pliegosRic.js`)
- RIC document library → RIC assistant: renders assistant (evidence: `src/PliegosRIC.jsx`)
- RIC assistant → RIC answer service: asks question (evidence: `src/AsistenteRIC.jsx`)
- Authentication → HUD navigation: renders (evidence: `src/Auth.jsx`)
- Unit detail → HUD navigation: renders (evidence: `src/DetalleUnidad.jsx`)
- RIC document library → HUD navigation: renders (evidence: `src/PliegosRIC.jsx`)
- Learning dashboard → RIC route map: provides route-map capability
- Learning dashboard → Map view: provides map capability
- Unit detail → Particle view: particle-view relationship unverified
