# joaquin-pino/fingeso architecture

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

- Interactive diagram: https://gitdiagram.com/joaquin-pino/fingeso
- Repository: https://github.com/joaquin-pino/fingeso

## Overview

#### Purpose and Runtime Topology
PGT is a thesis-student management platform: professors and tesistas authenticate, view/manage thesis records, and submit/view progress deliveries. It is a split application:
- Vue 3/Vite SPA on port 5173: `front/src/main.js`, `front/src/App.vue`
- Spring Boot Java 21 REST backend on port 8080: `src/main/java/grupo3/fingeso/FingesoApplication.java`
- PostgreSQL persistence on port 5432: `src/main/resources/application.properties`

In development, Vite proxies `/api/*` to the backend: `front/vite.config.js`.

#### Frontend Entry, Navigation, and Session
The SPA boots from `front/src/main.js`, renders the application shell in `front/src/App.vue`, and selects pages through `front/src/router/index.js`. Principal screens cover login/registration and thesis list/detail workflows:
- `front/src/views/LoginView/LoginView.vue`
- `front/src/views/TesisListView/TesisListView.vue`
- `front/src/views/TesisDetailView/TesisDetailView.vue`

`front/src/composables/useAuth.js` owns client authentication state; `front/src/composables/useIdleTimer.js` indicates session-expiration behavior. Route-level authorization directs unauthorized users to `front/src/views/ForbiddenView/ForbiddenView.vue`.

#### Frontend API Boundary and Domain UI
Service modules form the browser-to-REST boundary, centralizing HTTP, JWT handling, and domain calls:
- `front/src/services/http.js`
- `front/src/services/authService.js`
- `front/src/services/tesisService.js`
- `front/src/services/entregaService.js`

Thesis detail composition includes progress-delivery display and upload confirmation flows:
- `front/src/components/EntregaList/EntregaList.vue`
- `front/src/components/modals/EntregaUploadModal/EntregaUploadModal.vue`
- `front/src/utils/fileValidation.js`

#### REST, Security, and Authentication
HTTP controllers expose the backend’s primary API surface:
- `src/main/java/grupo3/fingeso/controller/AuthController.java`
- `src/main/java/grupo3/fingeso/controller/TesisController.java`
- `src/main/java/grupo3/fingeso/controller/EntregaAvanceController.java`

Authentication issues JWT-based sessions through `AuthService`; requests are authenticated by a JWT filter and authorization rules in Spring Security:
- `src/main/java/grupo3/fingeso/service/AuthService.java`
- `src/main/java/grupo3/fingeso/security/JwtAuthenticationFilter.java`
- `src/main/java/grupo3/fingeso/config/SecurityConfig.java`

The key trust boundary is browser JWT → `/api` request → Spring Security principal/role checks. Both `PROFESOR` and `TESISTA` are intended to access thesis endpoints.

#### Thesis and Progress-Delivery Domain Flow
`TesisService` implements thesis lifecycle and assignment-oriented behavior; `EntregaAvanceService` handles advance submissions. State and audit history are first-class domain concepts:
- `src/main/java/grupo3/fingeso/service/TesisService.java`
- `src/main/java/grupo3/fingeso/service/EntregaAvanceService.java`
- `src/main/java/grupo3/fingeso/service/HistorialCambioService.java`

Core persisted entities model users by professor/tesista role, thesis status, deliveries, and changes:
- `src/main/java/grupo3/fingeso/model/Tesis.java`
- `src/main/java/grupo3/fingeso/model/EntregaAvance.java`
- `src/main/java/grupo3/fingeso/model/HistorialCambio.java`

A delivery submission can create a historical change and trigger notification behavior.

#### Persistence, Seeding, and External Notification
Spring Data repositories isolate database access from services:
- `src/main/java/grupo3/fingeso/repository/TesisRepository.java`
- `src/main/java/grupo3/fingeso/repository/EntregaAvanceRepository.java`
- `src/main/java/grupo3/fingeso/repository/HistorialCambioRepository.java`

PostgreSQL is the production/local persistence dependency. `DataSeeder` initializes sample users and theses for an empty database:
- `src/main/java/grupo3/fingeso/config/DataSeeder.java`

`NotificacionService` provides optional email notification on progress uploads; absent mail environment credentials cause logging rather than failure:
- `src/main/java/grupo3/fingeso/service/NotificacionService.java`

Main entry points: [`front/src/router/index.js`](https://github.com/joaquin-pino/fingeso/blob/main/front/src/router/index.js) (Routes and guards), [`src/main/java/grupo3/fingeso/controller/TesisController.java`](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/controller/TesisController.java) (REST controllers), [`src/main/java/grupo3/fingeso/service/EntregaAvanceService.java`](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/EntregaAvanceService.java) (Progress delivery service), [`front/src/services/http.js`](https://github.com/joaquin-pino/fingeso/blob/main/front/src/services/http.js) (HTTP and domain services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Vue SPA"]
  node_spa_bootstrap["SPA bootstrap<br/>Vue entry<br/>[main.js]"]
  node_app_shell["Application shell<br/>Vue root<br/>[App.vue]"]
  node_router["Routes and guards<br/>Vue Router<br/>[index.js]"]
  node_auth_state["Auth session<br/>composable<br/>[useAuth.js]"]
  node_idle_timer["Idle expiration<br/>composable<br/>[useIdleTimer.js]"]
  node_thesis_ui["Thesis workflows<br/>Vue views"]
  node_auth_ui["Login and registration<br/>Vue view<br/>[LoginView.vue]"]
  node_forbidden_ui["Forbidden screen<br/>Vue view<br/>[ForbiddenView.vue]"]
  node_delivery_ui["Delivery upload and list<br/>Vue components<br/>[EntregaList.vue]"]
  node_api_client{{"HTTP and domain services<br/>browser API boundary<br/>[http.js]"}}
end

subgraph group_api["Spring Boot API"]
  node_backend_app["Spring Boot application<br/>Java entry"]
  node_security{{"JWT security<br/>security filter and rules"}}
  node_controllers["REST controllers<br/>API controllers"]
  node_auth_service["Authentication service<br/>domain service<br/>[AuthService.java]"]
  node_thesis_service["Thesis lifecycle service<br/>domain service<br/>[TesisService.java]"]
  node_delivery_service["Progress delivery service<br/>domain service"]
  node_audit_service["Change history service<br/>domain service"]
  node_notification_service["Email notifications<br/>external integration"]
end

subgraph group_data["Persistence"]
  node_repositories["Spring Data repositories<br/>data access"]
  node_postgres[("PostgreSQL<br/>relational database")]
  node_seeder["Sample data seeder<br/>database initializer<br/>[DataSeeder.java]"]
end

node_spa_bootstrap -->|"mounts"| node_app_shell
node_app_shell -->|"renders routes"| node_router
node_router -->|"uses session"| node_auth_state
node_router -->|"enforces expiry"| node_idle_timer
node_router -->|"selects"| node_auth_ui
node_router -->|"selects"| node_thesis_ui
node_router -->|"redirects"| node_forbidden_ui
node_thesis_ui -->|"composes"| node_delivery_ui
node_auth_ui -->|"auth calls"| node_api_client
node_thesis_ui -->|"thesis calls"| node_api_client
node_delivery_ui -->|"upload calls"| node_api_client
node_api_client -->|"JWT /api requests"| node_controllers
node_backend_app -->|"configures"| node_security
node_security -->|"authenticated principal"| node_controllers
node_controllers -->|"authentication"| node_auth_service
node_controllers -->|"thesis operations"| node_thesis_service
node_controllers -->|"delivery operations"| node_delivery_service
node_thesis_service -->|"persists theses"| node_repositories
node_delivery_service -->|"persists deliveries"| node_repositories
node_delivery_service -->|"records change"| node_audit_service
node_audit_service -->|"persists history"| node_repositories
node_delivery_service -.->|"notifies"| node_notification_service
node_repositories -->|"reads and writes"| node_postgres
node_seeder -.->|"initializes empty database"| node_postgres

click node_spa_bootstrap "https://github.com/joaquin-pino/fingeso/blob/main/front/src/main.js"
click node_app_shell "https://github.com/joaquin-pino/fingeso/blob/main/front/src/App.vue"
click node_router "https://github.com/joaquin-pino/fingeso/blob/main/front/src/router/index.js"
click node_auth_state "https://github.com/joaquin-pino/fingeso/blob/main/front/src/composables/useAuth.js"
click node_idle_timer "https://github.com/joaquin-pino/fingeso/blob/main/front/src/composables/useIdleTimer.js"
click node_thesis_ui "https://github.com/joaquin-pino/fingeso/blob/main/front/src/views/TesisDetailView/TesisDetailView.vue"
click node_auth_ui "https://github.com/joaquin-pino/fingeso/blob/main/front/src/views/LoginView/LoginView.vue"
click node_forbidden_ui "https://github.com/joaquin-pino/fingeso/blob/main/front/src/views/ForbiddenView/ForbiddenView.vue"
click node_delivery_ui "https://github.com/joaquin-pino/fingeso/blob/main/front/src/components/EntregaList/EntregaList.vue"
click node_api_client "https://github.com/joaquin-pino/fingeso/blob/main/front/src/services/http.js"
click node_backend_app "https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/FingesoApplication.java"
click node_security "https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/security/JwtAuthenticationFilter.java"
click node_controllers "https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/controller/TesisController.java"
click node_auth_service "https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/AuthService.java"
click node_thesis_service "https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/TesisService.java"
click node_delivery_service "https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/EntregaAvanceService.java"
click node_audit_service "https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/HistorialCambioService.java"
click node_notification_service "https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/NotificacionService.java"
click node_repositories "https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/repository/TesisRepository.java"
click node_postgres "https://github.com/joaquin-pino/fingeso/blob/main/src/main/resources/application.properties"
click node_seeder "https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/config/DataSeeder.java"

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_bootstrap,node_app_shell,node_router,node_auth_state,node_idle_timer,node_thesis_ui,node_auth_ui,node_forbidden_ui,node_delivery_ui,node_api_client toneBlue
class node_backend_app,node_security,node_controllers,node_auth_service,node_thesis_service,node_delivery_service,node_audit_service,node_notification_service toneAmber
class node_repositories,node_postgres,node_seeder toneMint
```

## Components

### Vue SPA

- [SPA bootstrap](https://github.com/joaquin-pino/fingeso/blob/main/front/src/main.js): Vue entry · `front/src/main.js`
- [Application shell](https://github.com/joaquin-pino/fingeso/blob/main/front/src/App.vue): Vue root · `front/src/App.vue`
- [Routes and guards](https://github.com/joaquin-pino/fingeso/blob/main/front/src/router/index.js): Vue Router · Selects screens and redirects unauthorized users. · `front/src/router/index.js`
- [Auth session](https://github.com/joaquin-pino/fingeso/blob/main/front/src/composables/useAuth.js): composable · `front/src/composables/useAuth.js`
- [Idle expiration](https://github.com/joaquin-pino/fingeso/blob/main/front/src/composables/useIdleTimer.js): composable · `front/src/composables/useIdleTimer.js`
- [Thesis workflows](https://github.com/joaquin-pino/fingeso/blob/main/front/src/views/TesisDetailView/TesisDetailView.vue): Vue views · List and detail screens for thesis management. · `front/src/views/TesisDetailView/TesisDetailView.vue`
- [Login and registration](https://github.com/joaquin-pino/fingeso/blob/main/front/src/views/LoginView/LoginView.vue): Vue view · `front/src/views/LoginView/LoginView.vue`
- [Forbidden screen](https://github.com/joaquin-pino/fingeso/blob/main/front/src/views/ForbiddenView/ForbiddenView.vue): Vue view · `front/src/views/ForbiddenView/ForbiddenView.vue`
- [Delivery upload and list](https://github.com/joaquin-pino/fingeso/blob/main/front/src/components/EntregaList/EntregaList.vue): Vue components · Includes upload confirmation and client file validation. · `front/src/components/EntregaList/EntregaList.vue`
- [HTTP and domain services](https://github.com/joaquin-pino/fingeso/blob/main/front/src/services/http.js): browser API boundary · Centralizes HTTP, JWT handling, and auth/thesis/delivery calls. · `front/src/services/http.js`

### Spring Boot API

- [Spring Boot application](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/FingesoApplication.java): Java entry · `src/main/java/grupo3/fingeso/FingesoApplication.java`
- [JWT security](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/security/JwtAuthenticationFilter.java): security filter and rules · Authenticates JWT requests and enforces role access. · `src/main/java/grupo3/fingeso/security/JwtAuthenticationFilter.java`
- [REST controllers](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/controller/TesisController.java): API controllers · Auth, thesis, and progress-delivery endpoints under /api. · `src/main/java/grupo3/fingeso/controller/TesisController.java`
- [Authentication service](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/AuthService.java): domain service · Issues JWT-based sessions. · `src/main/java/grupo3/fingeso/service/AuthService.java`
- [Thesis lifecycle service](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/TesisService.java): domain service · Manages thesis lifecycle and assignments. · `src/main/java/grupo3/fingeso/service/TesisService.java`
- [Progress delivery service](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/EntregaAvanceService.java): domain service · Processes submissions and triggers audit/notification behavior. · `src/main/java/grupo3/fingeso/service/EntregaAvanceService.java`
- [Change history service](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/HistorialCambioService.java): domain service · `src/main/java/grupo3/fingeso/service/HistorialCambioService.java`
- [Email notifications](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/service/NotificacionService.java): external integration · Logs instead of failing when mail credentials are absent. · `src/main/java/grupo3/fingeso/service/NotificacionService.java`

### Persistence

- [Spring Data repositories](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/repository/TesisRepository.java): data access · Repository boundary for theses, deliveries, and history. · `src/main/java/grupo3/fingeso/repository/TesisRepository.java`
- [PostgreSQL](https://github.com/joaquin-pino/fingeso/blob/main/src/main/resources/application.properties): relational database · Production and local persistence on port 5432. · `src/main/resources/application.properties`
- [Sample data seeder](https://github.com/joaquin-pino/fingeso/blob/main/src/main/java/grupo3/fingeso/config/DataSeeder.java): database initializer · Seeds users and theses into an empty database. · `src/main/java/grupo3/fingeso/config/DataSeeder.java`

## Connections

- SPA bootstrap → Application shell: mounts
- Application shell → Routes and guards: renders routes
- Routes and guards → Auth session: uses session
- Routes and guards → Idle expiration: enforces expiry
- Routes and guards → Login and registration: selects
- Routes and guards → Thesis workflows: selects
- Routes and guards → Forbidden screen: redirects
- Thesis workflows → Delivery upload and list: composes
- Login and registration → HTTP and domain services: auth calls
- Thesis workflows → HTTP and domain services: thesis calls
- Delivery upload and list → HTTP and domain services: upload calls
- HTTP and domain services → REST controllers: JWT /api requests · Vite proxies requests to the backend in development.
- Spring Boot application → JWT security: configures
- JWT security → REST controllers: authenticated principal · Checks professor and tesista roles before API access.
- REST controllers → Authentication service: authentication
- REST controllers → Thesis lifecycle service: thesis operations
- REST controllers → Progress delivery service: delivery operations
- Thesis lifecycle service → Spring Data repositories: persists theses
- Progress delivery service → Spring Data repositories: persists deliveries
- Progress delivery service → Change history service: records change
- Change history service → Spring Data repositories: persists history
- Progress delivery service → Email notifications: notifies
- Spring Data repositories → PostgreSQL: reads and writes
- Sample data seeder → PostgreSQL: initializes empty database
