Here's comprehensive content for your README.md file:
RoomEase Backend is a Spring Boot-based REST API for managing hostel room maintenance and facilities. The application provides a comprehensive ticket management system for students to report and track various hostel issues including AC problems, cleaning requests, electrical issues, and plumbing problems.
The application follows a layered architecture pattern with clear separation of concerns:
graph TB
A["Client"] --> B["Controller Layer"]
B --> C["Service Layer"]
C --> D["Repository Layer"]
D --> E["PostgreSQL Database"]
B --> F["Firebase Authentication"]
style A fill:#f9f,stroke:#333
style B fill:#bbf,stroke:#333
style C fill:#bfb,stroke:#333
style D fill:#ffb,stroke:#333
style E fill:#fbb,stroke:#333
style F fill:#fbf,stroke:#333
-
Controller Layer - REST API endpoints for client interactions 1
-
Service Layer - Business logic and data processing 2
-
Repository Layer - Data access and persistence operations 3
-
Model Layer - Entity definitions and data structures 4
-
DTO Layer - Data Transfer Objects for API communication 5
-
Configuration Layer - Application and security configurations 6
- PostgreSQL - Relational database for data persistence 9
- Spring Data JPA - Data access abstraction 10
- Firebase Admin SDK - Authentication and user management 11
- JUnit Platform - Testing framework 14
The system supports three types of users with role-based access:
- Students - Create and track maintenance tickets
- Admins - Manage overall system operations
- Hostel Managers - Oversee hostel-specific operations 15
User information includes: 16
Comprehensive maintenance ticket system supporting multiple categories:
- Cleaning Tickets - Room cleaning requests
- Electrical Tickets - Electrical issue reporting
- Plumbing Tickets - Plumbing problem reports
- AC Tickets - Air conditioning maintenance 17
Each ticket tracks: 18
Firebase-based authentication with token verification: 19
Entry tracking and management for warden duties: 20
POST /auth/verifyToken- Verify Firebase authentication tokens
POST /createUser- Create new userPOST /io- Update user details
POST /api/tasks/create- Create maintenance ticketPUT /api/tasks/close/{firebaseUid}/{category}- Close a ticket 21
PUT /entry- Record warden entry details
The application uses PostgreSQL with JPA entities following an inheritance strategy for tickets: 22
Main Tables:
users- User information and credentialstickets- Base ticket information with inheritance for specialized ticket types
The application is configured for deployment on Render with Firebase credential management: 23
src/main/java/com/example/roomeasebackend/
├── config/ # Application configurations
├── controller/ # REST API endpoints
├── dtos/ # Data Transfer Objects
├── model/ # JPA entities
├── repository/ # Data access layer
└── service/ # Business logic layer
- Java 23 or higher
- PostgreSQL database
- Firebase project with service account credentials
- Gradle
- Set up PostgreSQL database
- Configure Firebase service account key
- Place
serviceAccountKey.jsonin resources folder or configure for Render deployment
# Build the project
./gradlew build
# Run the application
./gradlew bootRun- The application uses UUID for primary keys across all entities
- Firebase UID is used as the unique identifier for user authentication
- Ticket system uses JPA inheritance strategy for different ticket types
- SSL certificate support included for secure database connections 24
This README provides a comprehensive overview of your backend architecture, tech stack, and features. You can customize sections based on additional details or specific requirements for your project documentation.