Skip to content

Full-stack hotel management & booking system for Aurora Hotel: room reservation, customer CRM, service add-ons, promotions, and reporting.

Notifications You must be signed in to change notification settings

giasinguyen/aurora-hotel-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

430 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aurora Hotel

✨ Aurora Hotel Management System ✨

A modern, full-featured hotel management platform powered by AI

FeaturesTech StackGetting StartedAPITeam


📖 About

Aurora Hotel Management System is an enterprise-grade hotel management solution developed as a capstone project for the Web Programming (WWW) course at Industrial University of Ho Chi Minh City (IUH).

🤖 AI-Powered 🔐 Secure 🌍 Multi-language 📱 Responsive
RAG Chatbot with Google Gemini RBAC with 70+ permissions Vietnamese & English Modern UI/UX

🚀 Features

🏨 Hotel Operations

  • Multi-branch Management — Centralized control for multiple locations
  • Room Management — Categories, types, amenities & real-time status
  • Booking System — Complete workflow from reservation to checkout
  • Service Booking — Spa, dining, airport transfer & more

💼 Business Tools

  • Revenue Dashboard — Real-time analytics & insights
  • Staff Scheduling — Shift management & attendance tracking
  • Promotions Engine — Flexible discount & coupon system
  • Report Generation — Export to PDF/Excel

🔐 Security & Access

  • Role-Based Access Control — Admin, Manager, Staff, Customer, Guest
  • 70+ Granular Permissions — Fine-tuned access control
  • JWT Authentication — Secure token-based auth
  • OAuth2 Integration — Social login support

🤖 AI Features

  • RAG Chatbot — Intelligent Q&A powered by Google Gemini
  • Semantic Search — Vector similarity search with pgvector
  • Document Intelligence — Auto-parse & understand documents
  • Streaming Responses — Real-time AI interactions

🧠 AI Architecture

╔══════════════════════════════════════════════════════════════════╗
║                      RAG CHATBOT PIPELINE                        ║
╠══════════════════════════════════════════════════════════════════╣
║                                                                  ║
║   📄 Documents      🔄 Processing       🧮 Embeddings            ║
║   ┌─────────┐      ┌─────────────┐     ┌──────────────┐         ║
║   │  PDF    │ ───▶ │ Apache Tika │ ──▶ │ Google       │         ║
║   │  DOCX   │      │ Langchain4j │     │ Gemini AI    │         ║
║   │  TXT    │      └─────────────┘     └──────┬───────┘         ║
║   └─────────┘                                 │                  ║
║                                               ▼                  ║
║                        ┌──────────────────────────────┐         ║
║                        │     🗄️ pgvector Database     │         ║
║                        │   Vector Similarity Search   │         ║
║                        └──────────────┬───────────────┘         ║
║                                       │                          ║
║   💬 User Query ──▶ Semantic Match ──▶ Context + LLM ──▶ 🎯     ║
║                                                                  ║
╚══════════════════════════════════════════════════════════════════╝

🛠 Tech Stack

🖥️ Backend 🎨 Frontend 🗄️ Data & AI 🔧 DevOps

Framework

  • Java 21 LTS
  • Spring Boot 3.5.5
  • Spring Security 6.x
  • Spring Data JPA

Libraries

  • Langchain4j 1.7.1
  • MapStruct 1.6.3
  • Lombok 1.18.36
  • Nimbus JWT 9.40

Framework

  • React 19.1.1
  • TypeScript 5.9.3
  • Vite 7.1.7

UI/UX

  • TailwindCSS 4.1.14
  • Framer Motion 12.x
  • Radix UI
  • Recharts 3.5.1

State

  • Redux Toolkit 2.9.0
  • React Router 7.9.4

Database

  • PostgreSQL 16
  • pgvector 0.1.6
  • Redis 7.2

AI/ML

  • Google Gemini AI
  • RAG Architecture
  • Vector Embeddings
  • Apache Tika

Infrastructure

  • Docker
  • Railway
  • Nginx

Services

  • Cloudinary
  • VNPay
  • Mailjet

Tools

  • Postman
  • pgAdmin 4

📐 Architecture

┌─────────────────────────────────────────────────────────────────────────┐
│                            🌐 CLIENT TIER                               │
│    ┌────────────┐    ┌────────────┐    ┌────────────┐                  │
│    │  Browser   │    │   Mobile   │    │  Postman   │                  │
│    │  (React)   │    │  (Future)  │    │  (Testing) │                  │
│    └─────┬──────┘    └─────┬──────┘    └─────┬──────┘                  │
└──────────┼─────────────────┼─────────────────┼──────────────────────────┘
           │                 │                 │
           └────────────────┬┴─────────────────┘
                            │ REST API / HTTPS
┌───────────────────────────┼─────────────────────────────────────────────┐
│                           ▼         🛡️ SECURITY                        │
│  ┌────────────────────────────────────────────────────────────────┐    │
│  │   JWT Filter  →  CORS  →  Rate Limiter  →  Permission AOP     │    │
│  └────────────────────────────────────────────────────────────────┘    │
│                                                                         │
│  ┌────────────────────────────────────────────────────────────────┐    │
│  │                    📡 API LAYER (31 Controllers)               │    │
│  │   Auth • User • Branch • Room • Booking • Payment • RAG ...   │    │
│  └────────────────────────────────────────────────────────────────┘    │
│                                                                         │
│  ┌────────────────────────────────────────────────────────────────┐    │
│  │                    ⚙️ SERVICE LAYER                            │    │
│  │          Business Logic • Validation • Transactions            │    │
│  └────────────────────────────────────────────────────────────────┘    │
│                                                                         │
│  ┌────────────────────────────────────────────────────────────────┐    │
│  │                    💾 REPOSITORY LAYER                         │    │
│  │       JPA Repositories • Custom Queries • Specifications       │    │
│  └────────────────────────────────────────────────────────────────┘    │
│                         ☕ SPRING BOOT APPLICATION                      │
└─────────────────────────────────────────────────────────────────────────┘
           │                    │                    │
           ▼                    ▼                    ▼
   ┌───────────────┐   ┌───────────────┐   ┌───────────────┐
   │  PostgreSQL   │   │     Redis     │   │  Cloudinary   │
   │  + pgvector   │   │  Cache/Queue  │   │    Storage    │
   └───────────────┘   └───────────────┘   └───────────────┘

📊 Data Model Overview

👤 Users & Auth

  • User
  • Role
  • Permission
  • SessionMeta
  • InvalidatedToken

🏨 Hotel Core

  • Branch
  • Room
  • RoomType
  • RoomCategory
  • Amenity / Facility

📅 Operations

  • Booking
  • BookingRoom
  • Payment
  • Service
  • ServiceBooking

📰 Content & Staff

  • News
  • Promotion
  • Document
  • WorkShift
  • ShiftCheckIn

29 Entity Classes31 REST Controllers70+ Permissions


🚀 Getting Started

Prerequisites

Tool Version Required
Java JDK 21+
Node.js 20+
Docker Latest Recommended
PostgreSQL 16+ If no Docker
Redis 7+ If no Docker

⚡ Quick Start with Docker

# Clone the repository
git clone https://github.com/giasinguyen/aurora-hotel-management-system.git
cd aurora-hotel-management-system

# Start infrastructure services
cd aurora-backend && docker-compose up -d

# Services available at:
# • PostgreSQL: localhost:5432
# • Redis: localhost:6379  
# • pgAdmin: localhost:5050

🔧 Backend Setup

cd aurora-backend

# Create environment file
cp .env.example .env

# Configure your .env file (see below)

# Run the application
./mvnw spring-boot:run
📋 Environment Variables
# Database
DB_URL=jdbc:postgresql://localhost:5432/aurora_hotel
DB_USERNAME=admin
DB_PASSWORD=admin

# JWT (generate a 64+ char secret)
JWT_SIGNER_KEY=your-super-secret-key-minimum-64-characters-for-hs512
JWT_VALID_DURATION=3600
JWT_REFRESHABLE_DURATION=86400

# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=admin

# Google Gemini AI
GEMINI_API_KEY=your-gemini-api-key

# Cloudinary
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret

# VNPay
VNPAY_TMN_CODE=your-tmn-code
VNPAY_HASH_SECRET=your-hash-secret

🎨 Frontend Setup

cd aurora-frontend

# Install dependencies
npm install

# Create environment file
cp .env.example .env.local

# Configure .env.local
echo "VITE_API_BASE_URL=http://localhost:8080" > .env.local

# Start development server
npm run dev

📦 Production Build

# Backend
cd aurora-backend
./mvnw clean package -DskipTests
java -jar target/*.jar

# Frontend  
cd aurora-frontend
npm run build && npm run preview

📚 API Reference

🔐 Authentication

Method Endpoint Description
POST /api/v1/auth/token Login & get JWT token
POST /api/v1/auth/refresh Refresh access token
POST /api/v1/auth/logout Logout & invalidate token
POST /api/v1/auth/introspect Validate token

👥 Users

Method Endpoint Description
GET /api/v1/users List all users
GET /api/v1/users/{id} Get user by ID
POST /api/v1/users Create new user
PUT /api/v1/users/{id} Update user
DELETE /api/v1/users/{id} Delete user

🏨 Hotel

Method Endpoint Description
GET /api/v1/branches List branches
GET /api/v1/rooms List rooms
GET /api/v1/room-types List room types
GET /api/v1/amenities List amenities

📅 Bookings

Method Endpoint Description
POST /api/v1/bookings Create booking
GET /api/v1/bookings/{id} Get booking details
PUT /api/v1/bookings/{id}/confirm Confirm booking
PUT /api/v1/bookings/{id}/check-in Check-in
PUT /api/v1/bookings/{id}/check-out Check-out

🤖 AI Chatbot

Method Endpoint Description
POST /api/v1/rag/chat Chat with AI
POST /api/v1/rag/chat-stream Streaming chat
POST /api/v1/rag/documents Upload document
📬 Postman Collections

Import these files for API testing:

  • postman/Aurora Hotel Management System.postman_collection.json
  • postman/Aurora_Hotel_Authentication_Tests.postman_collection.json

📁 Project Structure

📦 aurora-hotel-management-system
├── 📂 aurora-backend/                 # Spring Boot API
│   ├── 📂 src/main/java/.../
│   │   ├── 📂 config/                 # App configurations
│   │   ├── 📂 controller/             # REST endpoints (31)
│   │   ├── 📂 dto/                    # Data transfer objects
│   │   ├── 📂 entity/                 # JPA entities (29)
│   │   ├── 📂 repository/             # Data access layer
│   │   ├── 📂 service/                # Business logic
│   │   └── 📂 security/               # JWT & auth
│   ├── 📂 postman/                    # API collections
│   ├── 📄 docker-compose.yml
│   └── 📄 pom.xml
│
├── 📂 aurora-frontend/                # React SPA
│   ├── 📂 src/
│   │   ├── 📂 components/             # UI components
│   │   ├── 📂 pages/                  # Page views (17 modules)
│   │   ├── 📂 features/               # Redux slices
│   │   ├── 📂 services/               # API clients
│   │   ├── 📂 hooks/                  # Custom hooks
│   │   └── 📂 locales/                # i18n files
│   ├── 📄 package.json
│   └── 📄 vite.config.ts
│
├── 📂 docs/                           # Documentation
│   ├── 📄 class-diagram.puml
│   ├── 📄 database-diagram.puml
│   └── 📄 database-schema.sql
│
└── 📄 README.md

👥 Team


Nguyễn Trần Gia Sĩ

🎯 Team Lead
Backend Developer

Nguyễn Văn Minh

🎨 Frontend
UI/UX Developer

Nguyễn Trung Nguyên

⚙️ Backend
API Developer

Nguyễn Duy Khải

🎨 Frontend
UI Developer

📚 Documentation

Document Description
Frontend Guide React setup, components & styling
Backend Guide Spring Boot setup & API reference
System Diagrams Architecture & database diagrams

📄 License

This project was developed for educational purposes as part of the
Web Programming (WWW) course at
Industrial University of Ho Chi Minh City (IUH)

© 2024-2025 Aurora Development Team


🙏 Acknowledgments

Industrial University of Ho Chi Minh City — Faculty of Information Technology
Course Instructors — Web Programming (WWW)
Open Source Community — Spring, React, PostgreSQL & all contributors


💫 If you found this helpful, please give us a ⭐


Built with ❤️ by The Challengers Team

Report BugRequest Feature

About

Full-stack hotel management & booking system for Aurora Hotel: room reservation, customer CRM, service add-ons, promotions, and reporting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •