How lucaslazarojoswig/tfg_luxelane works
Project Type and Purpose
• This appears to be a full-stack web application – likely a final degree project (TFG) – with a clear separation between a static frontend and a backend implemented in Java using Maven (and likely Spring Boot).
• The project includes static HTML pages (found in the “front” directory) alongside assets (CSS, JS, images, and videos) to support the user interface.
• The “tfg” directory contains the backend logic: data access objects (DAO), REST controllers, entity definitions, and repository implementations that interface with the database.
• SQL files (e.g., insertsCoches.sql, tfg_bbdd.sql) indicate the use of a relational database for persistent data storage.
• There is also an NGINX configuration document (NGINX_PabloGalvan_RubenPeraita.docx) that hints at deployment or load-balancing considerations using NGINX as a reverse proxy.
Analyzing the File Structure
• The backend (“tfg” folder) is organized as a Maven project with a typical Spring Boot layout. You see packages for the main application class, DAO implementations, entity models, enums, repositories, and REST controllers. This modular organization suggests an MVC or layered architecture where:
• REST controllers handle incoming HTTP requests.
• DAO and repository layers abstract database interactions.
• Entity classes represent business objects.
• SQL script files in the project root indicate initial data and schema scripts for database setup.
• Main Components:
• Frontend: The static assets (HTML, CSS, JS) that run in the browser.
• Backend API: Java application (Spring Boot) with REST controllers (e.g., CochesRestController, MotosRestController) that process client requests.
• Data Access Layer: DAOs and Repository classes that encapsulate persistent storage access.
• Database: The underlying relational database (indicated by SQL files) which stores data for vehicles, users, reservations, reviews, etc.
• Auxiliary Services: Although not explicitly mentioned, the presence of an NGINX document suggests that an NGINX server might be acting as a reverse proxy to route requests to the backend, serve static files, and handle load distribution.
• External Assets: Media files (images in “front/fotos”, videos in “videos”) that support the user interface.
• Relationships/Interactions:
• The browser (client) interacts with the frontend static pages, which then make API calls (AJAX, fetch) to the REST endpoints provided by the backend.
• The backend processes these requests, accesses the data access layer (DAOs/Repositories) to fetch or persist data in the relational database.
• The NGINX layer (if deployed) receives external traffic and routes it either to static content (from the “front” folder) or forwards API calls to the backend application.
• Architectural Patterns and Design Principles:
• Layered Architecture: Clear separation between presentation (frontend), application (backend controllers and services), data access (DAO and repository patterns), and persistence (database).
• RESTful API Design: The backend exposes various endpoints for different domain areas such as coches, motos, reservas, and usuarios.
• Modularity: The separation of concerns is visible in the distinct directories and packages.
• Technologies and Frameworks:
• Frontend: HTML5, CSS, JavaScript.
• Backend: Java (likely with Spring Boot), Maven for build automation.
• Database: Likely a relational database (specific RDBMS not directly mentioned but implied by SQL scripts).
• NGINX: For reverse proxying and serving static files (as documented in the NGINX doc).
Additional Detail and Clarity
• That dependency flows (from frontend to backend, and backend to database) are clearly marked, so it’s evident how requests propagate through the system.