# victorfloresdev/jsa-proy-smart-campus architecture

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

- Interactive diagram: https://gitdiagram.com/victorfloresdev/jsa-proy-smart-campus
- Repository: https://github.com/victorfloresdev/jsa-proy-smart-campus

## Overview

Smart Campus is an Angular SPA backed by an Express REST API. Campus users browse and submit carpooling, cafeteria, lost-property, reservation and support-ticket information; feature services make HTTP requests and the corresponding API controllers validate and update domain data. The README documents all five capabilities and the client/server arrangement. Some frontend pages and API handlers were not excerpted, so those feature branches are represented at subsystem level; links between them are documented rather than inferred from shared names.

Main entry points: [`backend/src/app.ts`](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/app.ts) (Express API), [`frontend/src/app/app.routes.ts`](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/app.routes.ts) (Feature routing), [`frontend/src/app/core/services/sesion.service.ts`](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/core/services/sesion.service.ts) (User session), [`frontend/src/app/modules/carpooling/pages`](https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/carpooling/pages) (Carpooling UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_spa["Angular application<br/>[app.component.ts]"]
  node_routing["Feature routing<br/>[app.routes.ts]"]
  node_session["User session<br/>[sesion.service.ts]"]
end

subgraph group_frontend["Frontend features"]
  node_carpool_ui["Carpooling UI"]
  node_carpool_service["Carpooling service"]
  node_cafeteria_ui["Cafeteria UI"]
  node_cafeteria_service["Cafeteria service"]
  node_lost_ui["Lost-property UI"]
  node_lost_service["Objects service<br/>[objetos.service.ts]"]
  node_reserve_ui["Reservations UI"]
  node_reserve_service["Reservation service<br/>[reserva.service.ts]"]
  node_ticket_ui["Tickets UI"]
  node_ticket_service["Ticket service<br/>[ticket.service.ts]"]
end

subgraph group_api["REST API"]
  node_api_app["Express API<br/>[app.ts]"]
  node_carpool_routes["Carpool routes"]
  node_carpool_controller["Carpool controller"]
  node_pedido_routes["Order routes<br/>[pedido.routes.ts]"]
  node_pedido_controller["Order controller"]
  node_lost_routes["Object routes<br/>[objeto.routes.ts]"]
  node_lost_controller["Object controller"]
  node_reserve_routes["Reservation routes<br/>[reserva.routes.ts]"]
  node_reserve_controller["Reservation controller"]
  node_ticket_routes["Ticket routes<br/>[ticket.routes.ts]"]
  node_ticket_controller["Ticket controller"]
end

subgraph group_domain["Domain data"]
  node_carpool_model["Carpool data model"]
  node_pedido_model["Order data model<br/>[pedido.model.ts]"]
  node_lost_model["Object data model<br/>[objeto.model.ts]"]
  node_reserve_model["Reservation model<br/>[reserva.model.ts]"]
  node_ticket_model["Ticket data model<br/>[ticket.model.ts]"]
end

node_user(("Campus user"))

node_user -->|"uses"| node_spa
node_spa -->|"hosts routes"| node_routing
node_routing -->|"routes to"| node_carpool_ui
node_routing -->|"routes to"| node_cafeteria_ui
node_routing -->|"routes to"| node_lost_ui
node_routing -->|"routes to"| node_reserve_ui
node_routing -->|"routes to"| node_ticket_ui
node_carpool_ui -->|"calls"| node_carpool_service
node_cafeteria_ui -->|"calls"| node_cafeteria_service
node_lost_ui -->|"calls"| node_lost_service
node_reserve_ui -->|"calls"| node_reserve_service
node_ticket_ui -->|"calls"| node_ticket_service
node_carpool_service -->|"HTTP to"| node_api_app
node_cafeteria_service -.->|"HTTP to"| node_api_app
node_lost_service -.->|"HTTP to"| node_api_app
node_reserve_service -.->|"HTTP to"| node_api_app
node_ticket_service -->|"HTTP to"| node_api_app
node_api_app -->|"mounts"| node_carpool_routes
node_api_app -->|"mounts"| node_pedido_routes
node_api_app -->|"mounts"| node_lost_routes
node_api_app -->|"mounts"| node_reserve_routes
node_api_app -->|"mounts"| node_ticket_routes
node_carpool_routes -->|"dispatches"| node_carpool_controller
node_pedido_routes -->|"dispatches"| node_pedido_controller
node_lost_routes -->|"dispatches"| node_lost_controller
node_reserve_routes -->|"dispatches"| node_reserve_controller
node_ticket_routes -->|"dispatches"| node_ticket_controller
node_carpool_controller -->|"reads/writes"| node_carpool_model
node_pedido_controller -->|"uses"| node_pedido_model
node_lost_controller -->|"uses"| node_lost_model
node_reserve_controller -->|"reads/writes"| node_reserve_model
node_ticket_controller -->|"reads/writes"| node_ticket_model
node_carpool_ui -->|"uses"| node_session
node_cafeteria_ui -->|"uses"| node_session
node_lost_ui -->|"uses"| node_session
node_reserve_ui -->|"uses"| node_session
node_ticket_ui -->|"uses"| node_session

click node_spa "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/app.component.ts"
click node_routing "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/app.routes.ts"
click node_session "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/core/services/sesion.service.ts"
click node_carpool_ui "https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/carpooling/pages"
click node_carpool_service "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/modules/carpooling/services/carpooling.service.ts"
click node_cafeteria_ui "https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/cafeteria/pages"
click node_cafeteria_service "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/modules/cafeteria/services/cafeteria.service.ts"
click node_lost_ui "https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/objetos-perdidos/pages"
click node_lost_service "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/modules/objetos-perdidos/services/objetos.service.ts"
click node_reserve_ui "https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/reservas/pages"
click node_reserve_service "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/modules/reservas/services/reserva.service.ts"
click node_ticket_ui "https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/tickets/pages"
click node_ticket_service "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/modules/tickets/services/ticket.service.ts"
click node_api_app "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/app.ts"
click node_carpool_routes "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/routes/carpooling.routes.ts"
click node_carpool_controller "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/controllers/carpooling.controller.ts"
click node_pedido_routes "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/routes/pedido.routes.ts"
click node_pedido_controller "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/controllers/pedido.controller.ts"
click node_lost_routes "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/routes/objeto.routes.ts"
click node_lost_controller "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/controllers/objeto.controller.ts"
click node_reserve_routes "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/routes/reserva.routes.ts"
click node_reserve_controller "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/controllers/reserva.controller.ts"
click node_ticket_routes "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/routes/ticket.routes.ts"
click node_ticket_controller "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/controllers/ticket.controller.ts"
click node_carpool_model "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/models/carpooling.model.ts"
click node_pedido_model "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/models/pedido.model.ts"
click node_lost_model "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/models/objeto.model.ts"
click node_reserve_model "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/models/reserva.model.ts"
click node_ticket_model "https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/models/ticket.model.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_spa,node_routing,node_session,node_user toneBlue
class node_carpool_ui,node_carpool_service,node_cafeteria_ui,node_cafeteria_service,node_lost_ui,node_lost_service,node_reserve_ui,node_reserve_service,node_ticket_ui,node_ticket_service toneAmber
class node_api_app,node_carpool_routes,node_carpool_controller,node_pedido_routes,node_pedido_controller,node_lost_routes,node_lost_controller,node_reserve_routes,node_reserve_controller,node_ticket_routes,node_ticket_controller toneMint
class node_carpool_model,node_pedido_model,node_lost_model,node_reserve_model,node_ticket_model toneRose
```

## Components

### Application shell

- [Angular application](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/app.component.ts): `frontend/src/app/app.component.ts`
- [Feature routing](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/app.routes.ts): `frontend/src/app/app.routes.ts`
- [User session](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/core/services/sesion.service.ts): `frontend/src/app/core/services/sesion.service.ts`

### Frontend features

- [Carpooling UI](https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/carpooling/pages): `frontend/src/app/modules/carpooling/pages`
- [Carpooling service](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/modules/carpooling/services/carpooling.service.ts): `frontend/src/app/modules/carpooling/services/carpooling.service.ts`
- [Cafeteria UI](https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/cafeteria/pages): `frontend/src/app/modules/cafeteria/pages`
- [Cafeteria service](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/modules/cafeteria/services/cafeteria.service.ts): `frontend/src/app/modules/cafeteria/services/cafeteria.service.ts`
- [Lost-property UI](https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/objetos-perdidos/pages): `frontend/src/app/modules/objetos-perdidos/pages`
- [Objects service](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/modules/objetos-perdidos/services/objetos.service.ts): `frontend/src/app/modules/objetos-perdidos/services/objetos.service.ts`
- [Reservations UI](https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/reservas/pages): `frontend/src/app/modules/reservas/pages`
- [Reservation service](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/modules/reservas/services/reserva.service.ts): `frontend/src/app/modules/reservas/services/reserva.service.ts`
- [Tickets UI](https://github.com/victorfloresdev/jsa-proy-smart-campus/tree/develop/frontend/src/app/modules/tickets/pages): `frontend/src/app/modules/tickets/pages`
- [Ticket service](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/frontend/src/app/modules/tickets/services/ticket.service.ts): `frontend/src/app/modules/tickets/services/ticket.service.ts`

### REST API

- [Express API](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/app.ts): `backend/src/app.ts`
- [Carpool routes](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/routes/carpooling.routes.ts): `backend/src/routes/carpooling.routes.ts`
- [Carpool controller](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/controllers/carpooling.controller.ts): `backend/src/controllers/carpooling.controller.ts`
- [Order routes](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/routes/pedido.routes.ts): `backend/src/routes/pedido.routes.ts`
- [Order controller](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/controllers/pedido.controller.ts): `backend/src/controllers/pedido.controller.ts`
- [Object routes](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/routes/objeto.routes.ts): `backend/src/routes/objeto.routes.ts`
- [Object controller](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/controllers/objeto.controller.ts): `backend/src/controllers/objeto.controller.ts`
- [Reservation routes](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/routes/reserva.routes.ts): `backend/src/routes/reserva.routes.ts`
- [Reservation controller](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/controllers/reserva.controller.ts): `backend/src/controllers/reserva.controller.ts`
- [Ticket routes](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/routes/ticket.routes.ts): `backend/src/routes/ticket.routes.ts`
- [Ticket controller](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/controllers/ticket.controller.ts): `backend/src/controllers/ticket.controller.ts`

### Domain data

- [Carpool data model](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/models/carpooling.model.ts): `backend/src/models/carpooling.model.ts`
- [Order data model](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/models/pedido.model.ts): `backend/src/models/pedido.model.ts`
- [Object data model](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/models/objeto.model.ts): `backend/src/models/objeto.model.ts`
- [Reservation model](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/models/reserva.model.ts): `backend/src/models/reserva.model.ts`
- [Ticket data model](https://github.com/victorfloresdev/jsa-proy-smart-campus/blob/develop/backend/src/models/ticket.model.ts): `backend/src/models/ticket.model.ts`

### Other components

- **Campus user**

## Connections

- Campus user → Angular application: uses
- Angular application → Feature routing: hosts routes (evidence: `frontend/src/app/app.component.ts`)
- Feature routing → Carpooling UI: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Feature routing → Cafeteria UI: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Feature routing → Lost-property UI: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Feature routing → Reservations UI: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Feature routing → Tickets UI: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Carpooling UI → Carpooling service: calls (evidence: `frontend/src/app/modules/carpooling/pages/carpooling-form/carpooling-form.component.ts`)
- Cafeteria UI → Cafeteria service: calls (evidence: `frontend/src/app/modules/cafeteria/pages/pedido-form/pedido-form.component.ts`)
- Lost-property UI → Objects service: calls (evidence: `frontend/src/app/modules/objetos-perdidos/pages/objeto-form/objeto-form.component.ts`)
- Reservations UI → Reservation service: calls (evidence: `frontend/src/app/modules/reservas/pages/reserva-form/reserva-form.component.ts`)
- Tickets UI → Ticket service: calls (evidence: `frontend/src/app/modules/tickets/pages/ticket-list/ticket-list.component.ts`)
- Carpooling service → Express API: HTTP to
- Cafeteria service → Express API: HTTP to
- Objects service → Express API: HTTP to
- Reservation service → Express API: HTTP to
- Ticket service → Express API: HTTP to (evidence: `frontend/src/app/modules/tickets/services/ticket.service.ts`)
- Express API → Carpool routes: mounts (evidence: `backend/src/app.ts`)
- Express API → Order routes: mounts (evidence: `backend/src/app.ts`)
- Express API → Object routes: mounts (evidence: `backend/src/app.ts`)
- Express API → Reservation routes: mounts (evidence: `backend/src/app.ts`)
- Express API → Ticket routes: mounts (evidence: `backend/src/app.ts`)
- Carpool routes → Carpool controller: dispatches (evidence: `backend/src/routes/carpooling.routes.ts`)
- Order routes → Order controller: dispatches (evidence: `backend/src/routes/pedido.routes.ts`)
- Object routes → Object controller: dispatches (evidence: `backend/src/routes/objeto.routes.ts`)
- Reservation routes → Reservation controller: dispatches (evidence: `backend/src/routes/reserva.routes.ts`)
- Ticket routes → Ticket controller: dispatches (evidence: `backend/src/routes/ticket.routes.ts`)
- Carpool controller → Carpool data model: reads/writes (evidence: `backend/src/controllers/carpooling.controller.ts`)
- Order controller → Order data model: uses (evidence: `backend/src/controllers/pedido.controller.ts`)
- Object controller → Object data model: uses (evidence: `backend/src/controllers/objeto.controller.ts`)
- Reservation controller → Reservation model: reads/writes (evidence: `backend/src/controllers/reserva.controller.ts`)
- Ticket controller → Ticket data model: reads/writes (evidence: `backend/src/controllers/ticket.controller.ts`)
- Carpooling UI → User session: uses (evidence: `frontend/src/app/modules/carpooling/pages/carpooling-form/carpooling-form.component.ts`)
- Cafeteria UI → User session: uses (evidence: `frontend/src/app/modules/cafeteria/pages/pedido-form/pedido-form.component.ts`)
- Lost-property UI → User session: uses (evidence: `frontend/src/app/modules/objetos-perdidos/pages/objeto-form/objeto-form.component.ts`)
- Reservations UI → User session: uses (evidence: `frontend/src/app/modules/reservas/pages/reserva-form/reserva-form.component.ts`)
- Tickets UI → User session: uses (evidence: `frontend/src/app/modules/tickets/pages/ticket-list/ticket-list.component.ts`)
