How jve386/cescit_erptextil works
Project Overview
• This is a full-stack ERP system designed for a textile enterprise.
• It combines a Spring Boot-based backend (in Java) that provides RESTful APIs and a Quasar (Vue.js) frontend that acts as the user interface.
• The system integrates with a PostgreSQL (or MySQL) database and is deployable using Docker Compose.
Main Components to Highlight
a. Frontend (Quasar/Vue.js):
• Location: quasar-project directory.
• Components include various pages (e.g., AgregarStockPage, ConsultarStockPage, etc.), layouts (MainLayout), and reusable Vue components.
• Important libraries: Pinia for state management, vee-validate for validation, date-fns, echarts, vue-echarts, vue-i18n.
• Role: Provides a responsive, modern UI, interacts with the backend API for data operations.
b. Backend (Spring Boot):
• Location: src/main/java/com/tiendatextil.
• Organized using a layered architecture:
• Controllers: Handle HTTP requests for various entities (Almacen, Articulo, Categoria, Cliente, etc.).
• Services: Implement business logic.
• Repositories: Abstract data access (integrated with PostgreSQL/MySQL).
• DTOs and Models: Define data structures exchanged between controllers and services.
• Additional configurations: Security (JWT authentication), validation, and Flyway for database migrations.
c. Database:
• Technology: PostgreSQL (or MySQL as mentioned in the README).
d. Infrastructure / Deployment:
• Docker support: Docker Compose setup is available for easy deployment.
• Additional scripts: wait-for-it.sh for handling service dependencies at startup.
e. API Testing / Collections:
• Collections (in the collections folder) indicate that Postman (or similar) collections are used for testing API endpoints.
Relationships & Data Flow
• The frontend sends API requests (HTTP/HTTPS) to the backend REST controllers.
• The backend controllers call the appropriate service methods to process the business logic.
• The services interact with the repository layer to read/write data from the database.
• Authentication, authorization, and validation occur at various stages in the backend.
• Docker containers can be used to encapsulate the frontend, backend, and database components, with defined dependencies and network flows among them.
Architectural Patterns & Design Principles
• Layered Architecture: Clear separation into UI (frontend), API Controllers, Business Services, Data Repositories, and Database.
• MVC Pattern: Evident in the Quasar/Vue.js structure where components, layouts, and pages are separated.
• RESTful API Design: Controllers expose endpoints and interact via JSON.
• Microservices’ influence is minimal here; the design is more monolithic but well-layered.
• Use of JWT and Spring Security adds an authentication/authorization layer, which should be represented.
• Integration points (e.g., external services and Docker orchestration).