How diegotorresmijarra/tfg-jaimelozano-diegotorres works
Project Type and Its Purpose
• This project is a full-stack application designed for managing online stores (Bio-Online). It contains a back-end built with Spring Boot (Java/Maven), a front-end built with Angular and Ionic, and it uses PostgreSQL and MongoDB for data persistence. The README also clearly explains that the application supports secure data handling, JWT security, and real-time notifications (e.g., web sockets) for tasks such as order updates, while also being containerized with Docker.
File Structure
• There are two top-level application folders: “backApp” and “frontApp.”
• The backApp folder follows a standard Spring Boot project structure with layers such as controllers (REST endpoints), services, repositories, models, DTOs, mappers, and configuration classes (security, CORS, Swagger, WebSocket). It also includes unit test folders.
• The frontApp folder contains an Angular/Ionic project (pages, components, services, models, guards, pipes) that interfaces with the back-end API.
• There are Dockerfiles and docker-compose files—one for back-end/database development, and another for production deployment. This indicates containerization of both the application and its databases.
• Additional directories like “database” and “documentacion” provide scripts and manuals/documentation that support deployment and maintenance.
Main Components
a. Front-end Client:
• Client Users: Representing web and mobile users.
• Angular/Ionic Application: Highlight the components (header, footer, views/pages, services, interceptors, routing).
b. Back-end Server:
• API Gateway/Controller Layer: Handling incoming HTTP requests, REST endpoints grouped in modules (addresses, auth, orders, products, restaurants, evaluations, etc.).
• Service & Business Logic Layer: Handling the core business logic (e.g., authentication, data processing, order management).
• Data Access Layer: Repositories, mappers, and integration with databases.
• Security & WebSocket Modules: JWT security, filters, and web socket handlers for live notifications.
• Configuration & Infrastructure: Swagger configuration, CORS, environment variables, and Docker integration.
c. Databases:
• PostgreSQL: Used for primary relational data (likely for orders, products, users, etc.).
• MongoDB: Also referenced in some service layers (possibly for non-relational data, like logging, caching, or common repository implementations).
d. External/Supporting Services:
• Docker Containers: Representing deployment units for back-end, front-end, and databases.
• External API/CI/CD Integrations: Including GitFlow for branching management and deployment automation.
Relationships and Interactions
• The Front-end interacts with the Back-end via RESTful API calls (secured using JWT tokens), as shown by the controllers and service endpoints.
• The Back-end communicates with both PostgreSQL and MongoDB databases for data operations.
• WebSockets in the back-end allow real-time communication (for instance, notifications of order status) with the front-end.
• Docker Compose orchestrates these services in a containerized environment, where Dockerfiles indicate isolated containers for each major component.
• Additionally, external security (authentication and authorization) is embedded into the interactions for safe data exchange.
Architectural Patterns/Design Principles
• Three-layer architecture: UI (Front-end), Business Logic (Back-end with well-structured RESTful controllers, services, and repositories), and Data Access (databases).
• Separation of concerns: The back-end is divided into modules (auth, addresses, orders, offers, etc.), each managing its request/response cycle, error handling, and data mapping.
• Containerization and orchestration: The use of Dockerfiles and docker-compose for development and production environments.