How group-5-software-process-quality/software-process-project works
1. Repository shape
- This is a single Spring Boot monolith named EventSphere / DatVe-Backend.
- The backend also serves the UI from src/main/resources/static, so there is no separate frontend app in this repository, only static HTML/CSS/JS pages.
2. Primary runtime boundary
- The system runs as one Java service on Spring Boot 3.5 / Java 21.
- Browser clients load the static admin pages, then call backend HTTP endpoints from the same application.
3. Core business domains
- The application is organized around four main domains:
- User management
- Event management
- Order management
- Admin/authentication and password recovery
- A separate statistics/dashboard area consumes data from the same backend.
4. Web/API layer
- controller/ contains the HTTP entry points:
- AdminController
- UserController
- EventController
- OrderController
- ForgotPasswordController
- These controllers are the boundary between the browser UI and the application services.
5. Application/service layer
- service/ contains interfaces and implementations for the business rules:
- UserService / UserServiceImpl
- EventService / EventServiceImpl
- OrderService / OrderServiceImpl
- AdminService / AdminServiceImpl
- This layer is where CRUD logic, login/password-reset logic, and dashboard/statistics aggregation are likely coordinated before hitting the database.
6. Persistence layer
- repository/ contains Spring Data JPA repositories for each entity:
- UserRepository
- EventRepository
- OrderRepository
- AdminRepository
- These repositories are the only direct data-access boundary to MySQL.
7. Domain model
- entity/ defines the persistent schema:
- User
- Admin
- Event
- Order
- OrderStatus
- These entities map the business objects stored in the database and used throughout services/controllers.
8. DTOs and API contracts
- dto/ contains request/response objects such as:
- LoginRequest, LoginResponse
- ResetPasswordRequest
- UserDTO, EventDTO, OrderDTO, AdminDTO
- The DTO layer separates API payloads from persistence entities, which is important for diagramming the request/response flow.
9. Security and recovery flow
- config/SecurityConfig.java and CorsConfig.java define request access rules and cross-origin behavior.
- security/MailService.java supports the forgot-password OTP flow, sending reset codes via Gmail.
- The reset-password path is its own functional subsystem, not just a simple CRUD action.
10. Frontend structure
- Static pages in resources/static/ include:
- login.html, forgot-password.html
- dashboard.html, users.html, events.html, orders.html, statistics.html
- Corresponding JavaScript files under static/js/ call the backend API and handle client-side auth/session behavior.
- statistics.js plus Chart.js are used for reporting visuals.
11. Data and infrastructure
- The application uses MySQL 8 as the primary database.
- Database/ contains SQL files split by table (admins, users, events, orders), which suggests a predefined schema/data bootstrap.
- src/main/resources/application.properties is the central place for datasource and mail configuration.
12. End-to-end flow
- A typical flow is: browser page → JS API call → controller → service → repository → MySQL → DTO/response back to browser.
- The forgot-password flow adds an external hop: service → Gmail via Spring Mail → OTP/reset confirmation back through the browser.
13. Testing and packaging
- There is at least a basic Spring Boot test class under src/test/java.
- Maven (pom.xml, mvnw) is the build and dependency boundary for the whole system.
14. Diagramming takeaway
- The key architecture boxes to show are: Browser UI, Spring Boot backend, Service layer, JPA repositories, MySQL, and Email provider.
- The main internal boundaries are controllers vs services vs repositories, with DTOs insulating the API and entities insulating persistence.
Main entry points: controller HTTP controllers · repository JPA repositories · js Client scripts · MailService.java Mail service
Components 21
Browser UI
Static admin pages and client-side scripts served by the backend
- Static pages · Login, dashboard, users, events, orders, and statistics pages served from resources/static
DatVe-Backend/src/main/resources/static - Client scripts · Front-end scripts that call backend APIs and manage auth/session behavior
DatVe-Backend/src/main/resources/static/js
Spring Boot Backend
Single Java application containing web, service, persistence, and security layers
- App entry · Spring Boot application entry point
DatVe-Backend/src/main/java/com/eventsphere/backend/DatVeBackendApplication.java - HTTP controllers · Admin, user, event, order, and password-recovery endpoints
DatVe-Backend/src/main/java/com/eventsphere/backend/controller - Admin API · Admin authentication and admin-facing operations
DatVe-Backend/src/main/java/com/eventsphere/backend/controller/AdminController.java - User API · User management endpoints
DatVe-Backend/src/main/java/com/eventsphere/backend/controller/UserController.java - Event API · Event management endpoints
DatVe-Backend/src/main/java/com/eventsphere/backend/controller/EventController.java - Order API · Order management endpoints
DatVe-Backend/src/main/java/com/eventsphere/backend/controller/OrderController.java - Reset API · Forgot-password and OTP reset endpoints
DatVe-Backend/src/main/java/com/eventsphere/backend/controller/ForgotPasswordController.java - Business services · Core application rules for CRUD, auth, and aggregation
DatVe-Backend/src/main/java/com/eventsphere/backend/service - Admin service · Admin login and admin-related logic
DatVe-Backend/src/main/java/com/eventsphere/backend/service/AdminServiceImpl.java - User service · User CRUD and user-facing business rules
DatVe-Backend/src/main/java/com/eventsphere/backend/service/UserServiceImpl.java - Event service · Event CRUD and event workflow logic
DatVe-Backend/src/main/java/com/eventsphere/backend/service/EventServiceImpl.java - Order service · Order lifecycle and status handling
DatVe-Backend/src/main/java/com/eventsphere/backend/service/OrderServiceImpl.java - JPA repositories · Spring Data repositories used as the database access boundary
DatVe-Backend/src/main/java/com/eventsphere/backend/repository - DTO contracts · Request and response models for login, reset, user, event, order, and admin payloads
DatVe-Backend/src/main/java/com/eventsphere/backend/dto - Entities · Persistent domain objects mapped to MySQL tables
DatVe-Backend/src/main/java/com/eventsphere/backend/entity - Config & security · CORS, security, and application runtime configuration
DatVe-Backend/src/main/java/com/eventsphere/backend/config - Mail service · SMTP mail sender used by the password reset flow
DatVe-Backend/src/main/java/com/eventsphere/backend/security/MailService.java
Data & External
Database and outbound email dependency
- MySQL · Primary relational datastore for admins, users, events, and orders
- Gmail SMTP · Outbound email provider for OTP and password reset messages
Connections 20
- Static pages → Client scripts: loads · Pages load client-side scripts
- Client scripts → HTTP controllers: calls · Browser scripts invoke backend HTTP endpoints
- App entry → Config & security: wires · Application startup applies configuration and security setup
- HTTP controllers → Admin service: delegates · Admin controller routes to admin service
- HTTP controllers → User service: delegates · User controller routes to user service
- HTTP controllers → Event service: delegates · Event controller routes to event service
- HTTP controllers → Order service: delegates · Order controller routes to order service
- HTTP controllers → Mail service: delegates · Password reset controller triggers email flow
- Admin service → JPA repositories: reads/writes · Admin service persists through repositories
- User service → JPA repositories: reads/writes · User service persists through repositories
- Event service → JPA repositories: reads/writes · Event service persists through repositories
- Order service → JPA repositories: reads/writes · Order service persists through repositories
- JPA repositories → Entities: maps · Repositories operate on JPA entities
- HTTP controllers → DTO contracts: exposes · Controllers accept and return DTOs
- Business services → DTO contracts: uses · Service layer coordinates application contracts
- Business services → Entities: uses · Business rules operate on domain entities
- JPA repositories → MySQL: stores · Repositories access the MySQL database
- Mail service → Gmail SMTP: sends · Mail service delivers reset codes via SMTP
- Reset API → Mail service: triggers · Forgot-password workflow sends OTP mail
- Client scripts → DTO contracts: serializes · Client payloads match backend request/response contracts