How chauminhtrung/rrms works
Project Type and Purpose
• This is a full-stack web application to manage rental accommodations. The aim is to provide a user-friendly interface for searching, booking, and managing rental rooms along with the administrative and operational functionalities behind the scenes.
• The README confirms it is a “hệ thống quản lý nhà trọ” (rental management system) and describes features such as secure personal information, efficient room booking, and ease of management.
High-Level Architecture Overview
a. Frontend (Client Side):
• Located in the “client” directory.
• Built with modern front-end tools such as React (seen from .jsx files and React components), Vite (vite.config.js), and styling using Bootstrap/MUI.
• Contains separate directories for public assets, components, pages (like Login, Home, Detail, admin, etc.), configurations, internationalization (i18n), and utilities.
• Provides the user interface and communicates with backend REST APIs.
b. Backend (Server Side):
• Located in the “server” directory and built with Java using Spring Boot.
• Implements a layered architecture:
• Controllers: REST endpoints handling incoming HTTP requests.
• Services: Business logic implementations.
• Repositories: Data layer accessing MySQL (as suggested by data.sql and repository classes).
• Models & DTOs: Representing domain and data transfer objects.
• Configurations: Security (JWT, Redis, CORS), third-party integrations (Stripe, VNPay, MoMo), and others.
• Contains extensive configuration for logging (Logstash with its own configuration files) and uses Maven for build automation.
c. Data Storage and External Tools:
• Database: MySQL is used (data.sql and ERD .mwb files) to store application data.
• Caching: Redis configuration files indicate use for caching and rate limiting.
• Integration with external payment providers (Stripe, VNPay, MoMo) and possibly messaging/email services.
• Deployment: Docker (Dockerfile and docker-compose) is set up for containerization. There’s also configuration for Vercel for the client side.
• Logging & Analytics: Logstash setup in the server folder, indicating monitoring/logging integration that might connect with Elasticsearch/Kibana.
Relationships and Interactions
• The flow begins with users interacting with the frontend (React client) which consumes REST API endpoints provided by the backend (Spring Boot controllers).
• The backend layer processes business logic via its service layer, then interacts with a MySQL database for persistence and Redis for caching and rate limiting.
• External services for payments, messaging, file uploads, and possibly third-party APIs are integrated within the backend configuration.
• Logging is centralized using Logstash, which collects logs from various server components.
Architectural Patterns and Technologies
• Layered / MVC Architecture: Clear separation between presentation (client), business logic (services, controllers), and data access (repositories).
• Microservice-like separation within the backend modules (multiple controllers for account, authentication, room management, etc.) but within a monolithic Spring Boot application layout.
• Use of RESTful APIs for communication between the client and server.
• Modern development tools: Vite for fast client-side builds and Maven for Java backend builds.
• Use of containerization (Docker) for deployment consistency.