How dpham123occ/frog_scheduler_latest works
Project Type and Purpose
• This project is a full‐stack web application that provides scheduling functionality, likely aimed at managing scheduling for “Superfrogs” (or similar entities) as well as handling customers, requests, and user authentication.
• The backend is implemented using Java (Spring Boot) while the frontend is built using Vue.js with Vite. Containerization is used, as shown by Dockerfiles in both the frontend and backend folders and an overall docker-compose file.
File Structure to Determine Architectural Layers
• Frontend (Vue.js):
• Contains the main index.html, Vue components (e.g., Login, Pricing, Request, SuperFrogDirector, SuperFrogStudent, etc.), views (step1.vue – step4.vue), router configuration, and styling.
• Likely communicates with the backend through REST APIs.
• Backend (Spring Boot):
• Organized in a standard Maven structure with separate packages for controllers, services, repositories, domain models, and utilities.
• Key modules include:
• Customer, Request, Superfrog, SpiritDirector, and User: Each module has its own Controller, Service, and Repository, following an MVC pattern.
• Security: Contains JWT-based authentication, custom entry points, CORS configuration, and authorization handlers.
• System: Initialization routines (DBDataInitializer), error handling (ExceptionHandlerAdvice), and status code definitions.
• Converters and DTOs: Convert objects to and from DTOs, ensuring proper separation between API and internal domain objects.
• A configuration file (application.yml) handles runtime settings.
• Infrastructure & Deployment:
• Docker and docker-compose are used to containerize both the frontend and the backend.
• There are Maven build scripts and various target directories which indicate compiled artifacts and test reports.
a. Main Components:
• Frontend Client (Vue.js):
• Notable UI modules such as Login, Request, Pricing, and the SuperFrogDirector and SuperFrogStudent dashboards.
• Backend API (Spring Boot Application):
▪ Business Logic Layer (Services): Highlight the CustomerService, RequestService, SuperfrogService, SpiritDirectorService, and SuperfrogUserService.
▪ Data Access Layer (Repositories): Show CustomerRepository, RequestRepository, SuperfrogRepository, and other related repositories.
▪ Security Module: Indicate the AuthController, AuthService, JWT provider, CORS configuration, and custom exception/denial handlers.
▪ Utility and Conversion Layer: Include the converters (for DTOs) showing how data is formatted for input/output.
• Database:
• Even though the specific DB isn’t detailed directly in the file tree, assume a relational database that the repositories talk to. Represent this as a “Database” component, connected to the backend.
• Containerization & Deployment:
• Docker containers that encapsulate the frontend and backend.
• Docker-compose orchestration if needed as a deployment layer.
b. Relationships and Data Flow:
• Interaction within the backend: UI calls Controller → Controller calls Service → Service calls Repository → Repository interacts with the Database.
c. Architectural Patterns & Design Principles:
• MVC structure on the backend by clearly separating Controllers, Services, and Repositories.
• Use of DTOs and converters that mediate between external API payloads and internal objects.
• Security design which integrates RESTful authentication using JWT and custom handlers.
• Use clear annotations for the layered architecture (Presentation, Business, Data).
d. Technologies and Frameworks:
• Frontend: Vue.js, Vite, JavaScript/HTML/CSS.
• Backend: Java, Spring Boot, Maven build system.
• Security: JWT-based authentication, Spring Security features.
• Containerization: Docker (with separate Dockerfiles), docker-compose for orchestration.
• Testing Frameworks: Indicate unit/integration tests present in the “src/test” directory of the backend.