How poncx22/proyectoaula works
1. What this repo is
- GastroTec is a Spring Boot application built with Maven.
- It follows a classic server-rendered MVC structure rather than a SPA or API-first design.
2. Main runtime boundary
- The application starts in GastroTecApplication.
- Incoming HTTP requests are handled by Spring MVC controllers under Controller/.
- Responses are rendered with Thymeleaf templates in src/main/resources/templates.
3. Layered architecture
- The code is organized into three main backend layers:
- Controller: web request handling
- Service: business logic
- Repository: persistence access
- This separation is important for the architecture diagram: UI requests do not go straight to repositories.
4. User-facing modules
- The visible modules are centered on CRUD-style management for:
- Cliente
- Producto
- Proveedor
- Trabajador
- There is also a HomeController for the landing page.
5. Domain model
- The Model/ package contains the business entities:
- Persona
- Cliente
- Trabajador
- Producto
- Proveedor
- Pedido
- PedidoDetalle
- Factura
- Suministra
- Persona looks like a shared base concept for people-related entities such as clients and workers.
- Pedido, PedidoDetalle, and Factura suggest sales/order flow, even though they are not matched by visible controllers/repositories in this tree.
6. Persistence boundary
- Repositories exist for:
- ClienteRepository
- ProductoRepository
- ProveedorRepository
- TrabajadorRepository
- This implies persistence is currently focused on the four main CRUD modules.
- The architecture likely uses Spring Data-style repository abstractions, backed by a relational database configured in application.properties.
7. Request/data flow
- A typical flow is:
- Browser submits a request
- Controller receives it
- Service applies logic and validation
- Repository reads/writes the database
- Controller returns a Thymeleaf view populated with model data
- This is the core flow to represent in the diagram.
8. Views and presentation
- Templates include:
- listing pages like clientes.html, productos.html, proveedores.html, trabajadores.html
- form pages like formCliente.html, formProducto.html, formProveedor.html, formTrabajador.html
- Shared UI fragments live in templates/fragments/header.html and footer.html, indicating a common page layout.
9. Static assets
- Static presentation assets are under resources/static/
- The repo includes:
- css/estilos.css
- imgs/
- So the UI is mostly server-side HTML with shared styling and images, not a heavy client-side app.
10. Configuration and environment
- application.properties is the main runtime configuration file.
- It likely controls datasource, JPA, and view-related settings, which are essential external configuration points in the diagram.
- There is no obvious external service integration in the tree; the app appears self-contained around database-backed CRUD.
11. Testing
- GastroTecApplicationTests is present, indicating at least basic Spring Boot test scaffolding.
- No separate test architecture is visible beyond the standard Spring Boot test module.
12. What to emphasize in an architecture diagram
- Show a browser/UI layer talking to Spring MVC controllers
- Show service layer between controllers and repositories
- Show repositories talking to the database
- Show Thymeleaf templates + static CSS/images as the server-side presentation layer
- Optionally show Pedido/Factura as domain entities present in the model, even if they are not yet fully wired through controllers and repositories
Main entry points: GastroTecApplication.java GastroTec app · header.html Fragments · formCliente.html Forms · ClienteController.java Cliente controller
Components 31
Runtime
Application bootstrap and execution entrypoint
- GastroTec app · Main application bootstrap
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/GastroTecApplication.java
Web layer
Spring MVC controllers handling browser requests
- Home controller · Landing page handler
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Controller/HomeController.java - Cliente controller · Customer CRUD endpoints
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Controller/ClienteController.java - Producto controller · Product CRUD endpoints
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Controller/ProductoController.java - Proveedor controller · Supplier CRUD endpoints
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Controller/ProveedorController.java - Trabajador controller · Worker CRUD endpoints
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Controller/TrabajadorController.java
Service layer
Business logic and orchestration
- Cliente service · Customer business logic
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Service/ClienteService.java - Producto service · Product business logic
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Service/ProductoService.java - Proveedor service · Supplier business logic
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Service/ProveedorService.java - Trabajador service · Worker business logic
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Service/TrabajadorService.java
Persistence
Repository boundary and database access
- Cliente repo · Customer persistence access
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Repository/ClienteRepository.java - Producto repo · Product persistence access
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Repository/ProductoRepository.java - Proveedor repo · Supplier persistence access
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Repository/ProveedorRepository.java - Trabajador repo · Worker persistence access
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Repository/TrabajadorRepository.java
Domain model
Core business entities
- Persona · Shared base concept for people
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Model/Persona.java - Cliente · Customer entity
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Model/Cliente.java - Producto · Product entity
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Model/Producto.java - Proveedor · Supplier entity
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Model/Proveedor.java - Trabajador · Worker entity
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Model/Trabajador.java - Pedido · Order entity
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Model/Pedido.java - Factura · Invoice entity
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Model/Factura.java - Suministra · Supplier-product association
ProyectoAula_SEM4-main/GastroTec/src/main/java/com/ProAuSem4/GastroTec/Model/Suministra.java
Presentation
Thymeleaf templates and static assets
- Home page · Landing page template
ProyectoAula_SEM4-main/GastroTec/src/main/resources/templates/index.html - Clientes view · Customer list page
ProyectoAula_SEM4-main/GastroTec/src/main/resources/templates/clientes.html - Productos view · Product list page
ProyectoAula_SEM4-main/GastroTec/src/main/resources/templates/productos.html - Proveedores view · Supplier list page
ProyectoAula_SEM4-main/GastroTec/src/main/resources/templates/proveedores.html - Trabajadores view · Worker list page
ProyectoAula_SEM4-main/GastroTec/src/main/resources/templates/trabajadores.html - Fragments · Shared header and footer layout
ProyectoAula_SEM4-main/GastroTec/src/main/resources/templates/fragments/header.html - Forms · Create and edit templates
ProyectoAula_SEM4-main/GastroTec/src/main/resources/templates/formCliente.html - Styles · CSS and images for server-rendered UI
ProyectoAula_SEM4-main/GastroTec/src/main/resources/static/css/estilos.css
Config
Runtime configuration and external settings
- Config · Datasource and runtime settings
ProyectoAula_SEM4-main/GastroTec/src/main/resources/application.properties
Connections 40
- GastroTec app → Home controller: starts · Bootstraps the MVC application
- GastroTec app → Cliente controller: registers · Wires web controllers into the runtime
- GastroTec app → Producto controller: registers · Wires web controllers into the runtime
- GastroTec app → Proveedor controller: registers · Wires web controllers into the runtime
- GastroTec app → Trabajador controller: registers · Wires web controllers into the runtime
- Home controller → Home page: renders · Returns the landing page view
- Cliente controller → Cliente service: uses · Delegates customer requests
- Producto controller → Producto service: uses · Delegates product requests
- Proveedor controller → Proveedor service: uses · Delegates supplier requests
- Trabajador controller → Trabajador service: uses · Delegates worker requests
- Cliente service → Cliente repo: reads/writes · Persists customer data
- Producto service → Producto repo: reads/writes · Persists product data
- Proveedor service → Proveedor repo: reads/writes · Persists supplier data
- Trabajador service → Trabajador repo: reads/writes · Persists worker data
- Cliente controller → Clientes view: renders · Serves the customers listing page
- Producto controller → Productos view: renders · Serves the products listing page
- Proveedor controller → Proveedores view: renders · Serves the suppliers listing page
- Trabajador controller → Trabajadores view: renders · Serves the workers listing page
- Cliente controller → Forms: renders · Uses form templates for customer CRUD
- Producto controller → Forms: renders · Uses form templates for product CRUD
- Proveedor controller → Forms: renders · Uses form templates for supplier CRUD
- Trabajador controller → Forms: renders · Uses form templates for worker CRUD
- Home page → Fragments: includes · Shared page chrome
- Clientes view → Fragments: includes · Shared page chrome
- Productos view → Fragments: includes · Shared page chrome
- Proveedores view → Fragments: includes · Shared page chrome
- Trabajadores view → Fragments: includes · Shared page chrome
- Fragments → Styles: uses · Common styling and images
- Forms → Styles: uses · Common styling and images
- Cliente → Persona: extends · Customer is a kind of person
- Trabajador → Persona: extends · Worker is a kind of person
- Cliente repo → Cliente: persists · Repository manages customer entities
- Producto repo → Producto: persists · Repository manages product entities
- Proveedor repo → Proveedor: persists · Repository manages supplier entities
- Trabajador repo → Trabajador: persists · Repository manages worker entities
- Suministra → Proveedor: links · Associates supplier data
- Suministra → Producto: links · Associates product data
- Pedido → Factura: feeds · Order flow leads into invoicing
- Pedido → Cliente: references · Orders are tied to customers
- GastroTec app → Config: loads · Uses application runtime configuration