How jorghee/project-management works
Project Type and Purpose
• This is a full-stack web application called “Project Management.”
• Frontend: register-ui (React + Vite) as a single-page application for user interaction.
• Backend: projectmanagement-api (Spring Boot) exposing REST endpoints to manage projects, tasks, clients, etc.
• Purpose: allow CRUD operations on various project management entities (clients, tasks, priorities, time/utility factors, etc.) via a web interface.
File Structure Analysis
• Top level:
• projectmanagement-api/
• register-ui/
• projectmanagement-api (Java/Spring Boot):
• config, controller, service, repository, model, dto, mapper, exception layers → classic layered MVC + service + repository pattern.
• pom.xml, application.properties → Maven build & configuration.
• register-ui (React/Vite):
• src/pages → route-based pages for each entity.
• src/components/common → reusable UI components.
• src/api/apiService.js → HTTP client to call backend.
• src/context → NotificationContext for app-wide alerts.
Key Architectural Insights from README
• RESTful API with endpoints under /api/* for each resource.
• Standard HTTP methods (GET, POST, PUT, DELETE).
• Response model: JSON payloads matching DTOs in backend.
Main Components and Interactions (to include
a. Frontend SPA (register-ui)
• Technologies: React, Vite, pnpm, Axios/fetch in apiService.js, Context API.
• Pages/components call apiService → send HTTP requests.
b. API Layer (projectmanagement-api)
• Controllers (*Controller.java) receive HTTP requests.
• Service layer (*Service.java) contains business logic.
• Repository layer (*Repository.java) interacts with relational DB via Spring Data JPA.
• Mapper layer converts between Entities (model) and DTOs.
c. Database
• A relational DB (e.g., PostgreSQL/MySQL) configured in application.properties.
d. External Services (if any)
• CORS configuration allows cross-origin calls from frontend.
• No other external microservices in this project.
Relationships & Data Flows
• Browser/User → Frontend (React SPA)
• Frontend → HTTP request → Backend Controller
• Controller → Service → Repository → Database
• Database → Repository → Service → Controller → Frontend
• Frontend uses Context to dispatch notifications on success/failure.
Architectural Patterns & Principles
• Layered Architecture (Presentation → API Controller → Service → Repository → Database).
• DTO Pattern with dedicated Mapper classes.
• RESTful API design.
• Single-Page App on frontend with route‐based code organization.
[React SPA] —————→ [Spring Boot API] —————→ [Relational DB]
• Controllers (controllers/*Controller.java)
• Services (service/*.java)
• Repositories (repository/*.java)