# fran-laz/proyecto-sceci-postulacion architecture

> Architecture diagram of the GitHub repository fran-laz/proyecto-sceci-postulacion, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fran-laz/proyecto-sceci-postulacion
- Repository: https://github.com/fran-laz/proyecto-sceci-postulacion

## Overview

1. This repository is split into two clear applications:
   - `study-match`: a Spring Boot backend.
   - `frontend-study-match`: a Vite + React frontend.
   Together they form a classic client/server architecture with the frontend consuming backend APIs.

2. The backend is the core application. It exposes REST controllers for the main domain areas:
   - authentication
   - study groups
   - subjects/materias
   - projects
   - requests/solicitudes
   The package structure is organized in the usual layered style: controllers → services → repositories → models.

3. Security is a first-class boundary in the backend. The presence of `JwtAuthenticationFilter`, `JwtUtil`, and `SecurityConfig` indicates JWT-based authentication with filter-driven request protection. This means some endpoints are public, while others require a valid token sent from the frontend.

4. The backend domain model is centered on academic collaboration. The main entities are:
   - `Usuario`
   - `Perfil`
   - `Carrera`
   - `Materia`
   - `GrupoMateria`
   - `GrupoEstudio`
   - `Proyecto`
   - `Solicitud`
   These names suggest the system manages user profiles, academic programs, study subjects, study groups, and participation/request workflows.

5. Data access is repository-based. Each main entity has a repository interface, which implies persistence is handled through Spring Data-style data stores. The `application.properties` file likely contains the database and runtime configuration, making persistence an infrastructure concern isolated from controllers and services.

6. Service classes hold the business logic and orchestration:
   - `UsuarioService`
   - `MateriaService`
   - `GrupoEstudioService`
   - `ProyectoService`
   - `SolicitudService`
   Controllers depend on these services rather than repositories directly, keeping HTTP concerns separated from domain rules.

7. DTOs are used throughout the backend for API contracts. Separate request/response DTOs exist for auth, group studies, projects, and solicitudes. This means the API does not expose entities directly, which is an important architectural boundary between persistence models and external JSON payloads.

8. The frontend is a small single-page application with route-based screens:
   - `Inicio`
   - `Login`
   - `Registro`
   - `Dashboard`
   The presence of `ProtectedRoute.jsx` shows that authenticated access is enforced on the client as well, likely gating the dashboard or private features based on login state/token presence.

9. The frontend role is presentation and session handling, not domain logic. It likely sends credentials to the backend auth endpoint, stores the returned JWT, and uses that token for subsequent API requests. The routing structure suggests a public entry flow into login/registration and then a protected area for the app’s main functionality.

10. Build and deployment tooling is intentionally separated per app:
   - Frontend: Vite, ESLint, npm lockfiles.
   - Backend: Maven Wrapper, `pom.xml`, Spring Boot, Dockerfile.
   This indicates the backend can be built and containerized independently, while the frontend is developed and served as a separate web client.

11. Operationally, there are API testing artifacts in the backend (`postman` and `.postman` folders), which suggests the REST contract is intended to be exercised directly and verified outside the UI. That reinforces the backend as the stable service boundary.

12. For an architecture diagram, the key flow is:
   browser/user → React routes/components → authenticated API calls → Spring Security/JWT filter → controller → service → repository → database,
   with DTOs translating at the API boundary and protected routes enforcing the same access model on the client side.

Main entry points: [`study-match/src/main/java/com/flazarte/study_match/controllers/AuthController.java`](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/controllers/AuthController.java) (AuthController), [`study-match/src/main/java/com/flazarte/study_match/controllers`](https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/controllers) (Domain APIs), [`study-match/src/main/java/com/flazarte/study_match/services`](https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/services) (Services), [`frontend-study-match/src/App.jsx`](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/frontend-study-match/src/App.jsx) (Router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_frontend_main(("Main<br/>entrypoint<br/>[main.jsx]"))
  node_frontend_app["Router<br/>spa shell<br/>[App.jsx]"]
  node_frontend_protected{{"ProtectedRoute<br/>route guard<br/>[ProtectedRoute.jsx]"}}
  node_frontend_pages["Pages<br/>screens"]
end

subgraph group_backend["Backend"]
  node_backend_app(("App<br/>spring boot"))
  node_backend_config["Config"]
  node_backend_security_config{{"SecurityConfig<br/>security config"}}
  node_backend_jwt_filter{{"JwtFilter<br/>security filter"}}
  node_backend_jwt_util["JwtUtil<br/>token utility<br/>[JwtUtil.java]"]
  node_backend_auth_controller["AuthController<br/>rest controller"]
  node_backend_domain_controllers["Domain APIs<br/>rest controllers"]
  node_backend_services["Services<br/>business layer"]
  node_backend_dtos["DTOs<br/>api contracts"]
  node_backend_models[("Models<br/>domain entities")]
  node_backend_repositories["Repositories<br/>data access"]
  node_backend_database[("Database<br/>persistence store")]
  node_backend_postman["Postman<br/>api testing"]
end

node_frontend_main -->|"mounts"| node_frontend_app
node_frontend_app -->|"routes to"| node_frontend_pages
node_frontend_app -->|"guards"| node_frontend_protected
node_frontend_pages -->|"login/register"| node_backend_auth_controller
node_frontend_pages -->|"api requests"| node_backend_domain_controllers
node_frontend_protected -.->|"token check"| node_backend_auth_controller
node_backend_app -->|"loads"| node_backend_config
node_backend_app -->|"starts with"| node_backend_security_config
node_backend_security_config -->|"registers"| node_backend_jwt_filter
node_backend_jwt_filter -->|"validates"| node_backend_jwt_util
node_backend_jwt_filter -->|"protects"| node_backend_auth_controller
node_backend_auth_controller -->|"exchanges"| node_backend_dtos
node_backend_domain_controllers -->|"exchanges"| node_backend_dtos
node_backend_auth_controller -->|"delegates"| node_backend_services
node_backend_domain_controllers -->|"delegates"| node_backend_services
node_backend_services -->|"operates on"| node_backend_models
node_backend_services -->|"persists via"| node_backend_repositories
node_backend_repositories -->|"reads/writes"| node_backend_database
node_backend_models -.->|"mapped by"| node_backend_repositories
node_backend_postman -.->|"tests"| node_backend_auth_controller
node_backend_postman -.->|"tests"| node_backend_domain_controllers

click node_frontend_main "https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/frontend-study-match/src/main.jsx"
click node_frontend_app "https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/frontend-study-match/src/App.jsx"
click node_frontend_protected "https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/frontend-study-match/src/components/ProtectedRoute.jsx"
click node_frontend_pages "https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/frontend-study-match/src/pages"
click node_backend_app "https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/StudyMatchApplication.java"
click node_backend_config "https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/resources/application.properties"
click node_backend_security_config "https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/config/SecurityConfig.java"
click node_backend_jwt_filter "https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/config/JwtAuthenticationFilter.java"
click node_backend_jwt_util "https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/config/JwtUtil.java"
click node_backend_auth_controller "https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/controllers/AuthController.java"
click node_backend_domain_controllers "https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/controllers"
click node_backend_services "https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/services"
click node_backend_dtos "https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/dtos"
click node_backend_models "https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/models"
click node_backend_repositories "https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/repositories"
click node_backend_postman "https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/postman"

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_frontend_main,node_frontend_app,node_frontend_protected,node_frontend_pages toneBlue
class node_backend_app,node_backend_config,node_backend_security_config,node_backend_jwt_filter,node_backend_jwt_util,node_backend_auth_controller,node_backend_domain_controllers,node_backend_services,node_backend_dtos,node_backend_models,node_backend_repositories,node_backend_database,node_backend_postman toneAmber
```

## Components

### Frontend

Vite + React client

- [Main](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/frontend-study-match/src/main.jsx): entrypoint · Bootstraps the React app · `frontend-study-match/src/main.jsx`
- [Router](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/frontend-study-match/src/App.jsx): spa shell · Top-level client routing and app composition · `frontend-study-match/src/App.jsx`
- [ProtectedRoute](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/frontend-study-match/src/components/ProtectedRoute.jsx): route guard · Client-side auth gate for private screens · `frontend-study-match/src/components/ProtectedRoute.jsx`
- [Pages](https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/frontend-study-match/src/pages): screens · Inicio, Login, Registro, Dashboard · `frontend-study-match/src/pages`

### Backend

Spring Boot API

- [App](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/StudyMatchApplication.java): spring boot · Backend application entrypoint · `study-match/src/main/java/com/flazarte/study_match/StudyMatchApplication.java`
- [Config](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/resources/application.properties): runtime config · Application properties and runtime setup · `study-match/src/main/resources/application.properties`
- [SecurityConfig](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/config/SecurityConfig.java): security config · HTTP security and protected endpoint rules · `study-match/src/main/java/com/flazarte/study_match/config/SecurityConfig.java`
- [JwtFilter](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/config/JwtAuthenticationFilter.java): security filter · JWT-bearing request filter · `study-match/src/main/java/com/flazarte/study_match/config/JwtAuthenticationFilter.java`
- [JwtUtil](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/config/JwtUtil.java): token utility · JWT creation and validation helper · `study-match/src/main/java/com/flazarte/study_match/config/JwtUtil.java`
- [AuthController](https://github.com/fran-laz/proyecto-sceci-postulacion/blob/main/study-match/src/main/java/com/flazarte/study_match/controllers/AuthController.java): rest controller · Login and registration endpoints · `study-match/src/main/java/com/flazarte/study_match/controllers/AuthController.java`
- [Domain APIs](https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/controllers): rest controllers · Study group, subject, project, and request endpoints · `study-match/src/main/java/com/flazarte/study_match/controllers`
- [Services](https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/services): business layer · Business rules and orchestration · `study-match/src/main/java/com/flazarte/study_match/services`
- [DTOs](https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/dtos): api contracts · Request and response payloads · `study-match/src/main/java/com/flazarte/study_match/dtos`
- [Models](https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/models): domain entities · Usuario, Perfil, Carrera, Materia, GrupoMateria, GrupoEstudio, Proyecto, Solicitud · `study-match/src/main/java/com/flazarte/study_match/models`
- [Repositories](https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/src/main/java/com/flazarte/study_match/repositories): data access · Persistence interfaces for domain entities · `study-match/src/main/java/com/flazarte/study_match/repositories`
- **Database**: persistence store · Underlying data store accessed through repositories
- [Postman](https://github.com/fran-laz/proyecto-sceci-postulacion/tree/main/study-match/postman): api testing · REST contract collections and globals · `study-match/postman`

## Connections

- Main → Router: mounts · React entrypoint renders the app shell
- Router → Pages: routes to · App composes the public and private screens
- Router → ProtectedRoute: guards · Route protection is applied at the client boundary
- Pages → AuthController: login/register · Public screens call authentication endpoints
- Pages → Domain APIs: api requests · Protected screens consume the main REST API
- ProtectedRoute → AuthController: token check · Private navigation depends on authenticated session state
- App → Config: loads · Application bootstrap uses runtime configuration
- App → SecurityConfig: starts with · Security rules are part of backend startup
- SecurityConfig → JwtFilter: registers · Security config inserts the JWT filter into the chain
- JwtFilter → JwtUtil: validates · Filter relies on JWT parsing and verification
- JwtFilter → AuthController: protects · Authenticated requests are routed through the security boundary
- AuthController → DTOs: exchanges · Auth endpoints use request/response DTOs
- Domain APIs → DTOs: exchanges · REST controllers map JSON through DTOs
- AuthController → Services: delegates · Controllers hand off business work to services
- Domain APIs → Services: delegates · Domain controllers call the service layer
- Services → Models: operates on · Services coordinate domain entities
- Services → Repositories: persists via · Business logic uses repositories for storage
- Repositories → Database: reads/writes · Repository interfaces back onto the persistent store
- Models → Repositories: mapped by · Entities are the persistence shape used by repositories
- Postman → AuthController: tests · Collections exercise the public auth contract
- Postman → Domain APIs: tests · Collections exercise the main REST resources
