Updated changes in backend
This commit is contained in:
@@ -21,12 +21,10 @@ The system addresses critical administrative bottlenecks such as:
|
||||
## 2. Technology Stack
|
||||
|
||||
### Backend
|
||||
* **Core Framework:** Spring Boot 3.2.5 (Java 17)
|
||||
* **API Architecture:** RESTful Controllers
|
||||
* **Data Access Layer:** Spring Data JPA with Hibernate
|
||||
* **Database:** MySQL (local schema: `ems_db`)
|
||||
* **Security:** Spring Security (endpoints are permit-all at filter level, but validation and role checks occur inside controller services; password encryption via `BCryptPasswordEncoder`)
|
||||
* **Developer Tools:** Project Lombok, Spring Boot DevTools
|
||||
* **Core Backend Service:** Firebase (Firestore Database, Firebase Authentication)
|
||||
* **API Architecture:** Serverless client-side interceptor via `firebaseBackend.ts` which intercepts `/api/*` requests in the browser and processes them directly against Firestore collections.
|
||||
* **Database:** Cloud Firestore (Collections: `ems_users`, `ems_events`, `ems_notes`, `ems_classes`)
|
||||
* **Security:** Checked via frontend role verification and Firestore Security Rules.
|
||||
|
||||
### Frontend
|
||||
* **Core Framework:** React 19, TypeScript, Vite
|
||||
@@ -42,7 +40,7 @@ The system addresses critical administrative bottlenecks such as:
|
||||
|
||||
## 3. Database Schema & Architecture
|
||||
|
||||
The system contains four principal entities mapped via JPA.
|
||||
The system contains four principal Firestore collections.
|
||||
|
||||
### A. User Entity (`users`)
|
||||
Holds institutional account profiles, login credentials, permissions, and roles.
|
||||
@@ -133,37 +131,6 @@ Used for pinning warnings, reminders, or notifications on the main calendar.
|
||||
|
||||
## 5. Directory Layout & Architecture
|
||||
|
||||
### Backend Layout
|
||||
```text
|
||||
backend/src/main/java/com/ems/backend/
|
||||
├── BackendApplication.java # Boot Entry Point
|
||||
├── config/
|
||||
│ ├── DataInitializer.java # Verify and populate seed users on startup
|
||||
│ ├── DataSeeder.java # Verify and seed mock events on startup
|
||||
│ ├── SecurityConfig.java # CORS and filter rules configuration
|
||||
│ └── CustomUserDetailsService # Loads core user details for Spring Security
|
||||
├── controller/
|
||||
│ ├── AdminController.java # CRUD endpoints for Users (/api/admin/users)
|
||||
│ ├── AuthController.java # Login endpoints (/api/auth)
|
||||
│ ├── ClassController.java # Class mappings and promotions (/api/classes)
|
||||
│ ├── EventController.java # Propose, approve, batch-create events (/api/events)
|
||||
│ ├── HealthController.java # System and database connectivity check (/api/health)
|
||||
│ └── NoteController.java # Board notices and institutional logs (/api/notes)
|
||||
├── dto/
|
||||
│ └── LoginRequest.java # Login DTO container
|
||||
├── model/
|
||||
│ ├── BaseEntity.java # Audited fields ID superclass
|
||||
│ ├── ClassMapping.java # Class config model
|
||||
│ ├── Event.java # Core event proposal model
|
||||
│ ├── InstitutionalNote.java # Date-based board notices model
|
||||
│ └── User.java # Account profiles model
|
||||
└── repository/
|
||||
├── ClassRepository.java
|
||||
├── EventRepository.java # Custom JPA Query for timing conflict resolution
|
||||
├── InstitutionalNoteRepository.java
|
||||
└── UserRepository.java
|
||||
```
|
||||
|
||||
### Frontend Layout
|
||||
```text
|
||||
frontend/src/
|
||||
|
||||
Reference in New Issue
Block a user