How engineeringsebastian-s/pdyp works
A. Project Type and Purpose
This is a full-stack school-management application (“PDYP”) composed of
• A React/Vite frontend (“colegio-frontend”) for managing areas, employees, offices, classrooms, and reports.
• A Spring Boot backend (“colegio”) exposing REST APIs, persisting data via JPA repositories, and seeding initial data.
B. File-Structure Analysis (QuizTwo_v2 only)
Top-level folders
• colegio-frontend/ → React single-page app
• colegio/ → Spring Boot REST service
Frontend details
• package.json, vite.config.js
• src/api/*.js → HTTP clients for each entity
• src/pages/*.jsx → CRUD pages (AreasList, AreaForm, etc.)
• src/components/ → shared layout components
Backend details
• src/main/java/co/cambridge/colegio/
• config/ → WebCorsConfig, DataSeeder
• domain/ → JPA entities (Area, Empleado, Oficina, Salon, Profesor, Administrativo)
• repository/ → Spring Data JPA repos
• service/ → business services + impl
• web/ → REST controllers
– dto/, dto/report/ → request/response models
– error/ → exception handlers
– mapper/ → DTO ↔ entity mappers
Frontend (React SPA)
• Pages & components
• HTTP clients invoking REST endpoints
API Gateway / Backend (Spring Boot)
• Controllers (REST layer)
• DTO ↔ Entity mappers
• Service layer (business logic)
• Repository layer (data access)
• DataSeeder (initial data load)
Database
• Relational DB (e.g., H2/MySQL/PostgreSQL) storing domain tables
Cross-Cutting
• CORS configuration
• application.properties (DB & server configs)
D. Relationships & Data Flow
Responses flow back up: DB → Repository → Service → Controller → Frontend.
E. Architectural Patterns & Principles
Single-page application (SPA) frontend decoupled from backend.
F. Diagramming Guidelines for Full-Stack Apps
• UI → HTTP → Controllers → Services → Repos → DB
• Modules (e.g., AreaService, EmpleadoController).
• Config (CORS, DataSeeder).
• Controller layer
• DTO↔Mapper layer
• Service layer
• Repository layer
• Config (CORS, DataSeeder)
Technologies
• React, Vite, Axios/http.js
• Spring Boot, Spring Data JPA, H2/MySQL, Maven