A comprehensive full-stack hotel room booking and management system built with modern web technologies. This application provides a complete solution for hotel room reservations, user management, and administrative operations.
| Application | Link | Description |
|---|---|---|
| π₯οΈ Admin Panel | π Launch Admin Panel |
Complete management dashboard for administrators. |
| π Frontend App | π Launch Frontend |
Beautiful user interface for room booking. |
- Features
- Technology Stack
- System Architecture
- Database Schema
- API Documentation
- Installation & Setup
- Usage
- Contributing
- License
- User Registration/Login with email verification
- JWT-based authentication with access and refresh tokens
- Password reset functionality with secure token system
- Role-based access control (Admin/User)
- Account status management (Active/Blocked/Verified)
- Room CRUD operations with image uploads
- Room categorization (Single, Couple, Family, Presidential)
- Room status tracking (Available, Unavailable, Booked)
- Featured rooms highlighting
- Advanced room filtering and search capabilities
- Room capacity and pricing management
- Date-based booking with validation
- Booking status management (Pending, Approved, Cancelled, etc.)
- Booking history for users
- Admin booking management panel
- Automatic room status updates
- Room reviews and ratings (1-5 stars)
- User review management
- Review editing and deletion
- Average rating calculations
- User profile management with avatar uploads
- Admin dashboard with comprehensive statistics
- User role management
- Account blocking/unblocking
- Real-time statistics (Users, Rooms, Bookings)
- Data visualization with charts and counters
- User and booking management
- Room inventory management
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - Authentication tokens
- Bcrypt.js - Password hashing
- Multer - File upload handling
- SendGrid - Email service
- Winston - Logging
- Morgan - HTTP request logging
- Helmet - Security headers
- CORS - Cross-origin resource sharing
- Express Rate Limit - API rate limiting
- Next.js 13 - React framework with SSR
- React 18 - UI library
- Redux Toolkit - State management
- Ant Design - UI component library
- Styled Components - CSS-in-JS styling
- Axios - HTTP client
- Day.js - Date manipulation
- React Icons - Icon components
- React 18 - UI library
- Redux Toolkit - State management
- Ant Design - UI component library
- Tailwind CSS - Utility-first CSS framework
- React Router Dom - Client-side routing
- React CountUp - Animated counters
- JWT Decode - Token decoding
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Admin Panel β β Backend β
β (Next.js) β β (React.js) β β (Node.js) β
β β β β β β
β β’ User Interfaceβ β β’ Admin Dashboardβ β β’ REST API β
β β’ Room Booking βββββΊβ β’ Management βββββΊβ β’ Authenticationβ
β β’ User Profile β β β’ Analytics β β β’ Business Logicβ
β β’ Reviews β β β’ CRUD Operationsβ β β’ File Upload β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β MongoDB β
β β
β β’ Users β
β β’ Rooms β
β β’ Bookings β
β β’ Reviews β
βββββββββββββββββββ
{
userName: String (unique),
fullName: String,
email: String (unique),
phone: String,
password: String (hashed),
avatar: String,
gender: Enum ['male', 'female'],
dob: Date,
address: String,
role: Enum ['admin', 'user'],
verified: Boolean,
status: Enum ['register', 'login', 'logout', 'blocked']
}{
room_name: String (unique),
room_slug: String,
room_type: Enum ['single', 'couple', 'family', 'presidential'],
room_price: Number,
room_size: Number,
room_capacity: Number,
allow_pets: Boolean,
provide_breakfast: Boolean,
featured_room: Boolean,
room_description: String,
extra_facilities: [String],
room_images: [{ url: String }],
room_status: Enum ['available', 'unavailable', 'booked'],
created_by: ObjectId (ref: Users)
}{
room_id: ObjectId (ref: Rooms),
booking_dates: [Date],
booking_status: Enum ['pending', 'cancel', 'approved', 'rejected', 'in-reviews', 'completed'],
booking_by: ObjectId (ref: Users),
reviews: ObjectId (ref: Reviews)
}{
user_id: ObjectId (ref: Users),
room_id: ObjectId (ref: Rooms),
booking_id: ObjectId (ref: Bookings),
rating: Number (1-5),
message: String
}POST /api/v1/auth/registration - User registration
POST /api/v1/auth/login - User login
POST /api/v1/auth/logout - User logout
POST /api/v1/auth/forgot-password - Request password reset
POST /api/v1/auth/reset-password/:token - Reset password
POST /api/v1/auth/change-password - Change password
POST /api/v1/auth/verify-email/:token - Verify email
GET /api/v1/auth/refresh-token - Refresh JWT token
GET /api/v1/all-rooms-list - Get all rooms
GET /api/v1/get-room-by-id-or-slug-name/:id - Get room details
GET /api/v1/featured-rooms-list - Get featured rooms
POST /api/v1/create-room - Create room (Admin)
PUT /api/v1/edit-room/:id - Edit room (Admin)
DELETE /api/v1/delete-room/:id - Delete room (Admin)
POST /api/v1/placed-booking-order/:id - Place booking order
GET /api/v1/get-user-booking-orders - Get user bookings
PUT /api/v1/cancel-booking-order/:id - Cancel booking
GET /api/v1/get-all-booking-orders - Get all bookings (Admin)
PUT /api/v1/updated-booking-order/:id - Update booking (Admin)
GET /api/v1/get-user - Get current user
GET /api/v1/get-user/:id - Get user by ID (Admin)
PUT /api/v1/update-user - Update user profile
PUT /api/v1/avatar-update - Update user avatar
DELETE /api/v1/delete-user - Delete current user
DELETE /api/v1/delete-user/:id - Delete user by ID (Admin)
GET /api/v1/all-users-list - Get all users (Admin)
PUT /api/v1/blocked-user/:id - Block user (Admin)
PUT /api/v1/unblocked-user/:id - Unblock user (Admin)
POST /api/v1/room-review-add/:id - Add room review
GET /api/v1/get-room-reviews-list/:room_id - Get room reviews
PUT /api/v1/edit-room-review/:review_id - Edit review
- Node.js (v14 or higher)
- MongoDB (local or cloud)
- npm or yarn package manager
git clone https://github.com/SamiurRahmanMukul/Hotel-Room-Booking-System.git
cd Hotel-Room-Booking-Systemcd backend
npm installCreate .env file in backend directory with your configuration values.
cd frontend
npm installCreate .env.local file in frontend directory with your API configuration.
cd admin-panel
npm installCreate .env file in admin-panel directory with your API configuration.
cd backend
npm run dev # Development mode
npm start # Production modecd frontend
npm run dev # Runs on http://localhost:3034cd admin-panel
npm start # Runs on http://localhost:3033- Register/Login: Create account or login with existing credentials
- Browse Rooms: View available rooms with filters and search
- Book Rooms: Select dates and book available rooms
- Manage Bookings: View, track, and cancel bookings
- Leave Reviews: Rate and review booked rooms
- Profile Management: Update personal information and avatar
- Dashboard: View system statistics and analytics
- User Management: Manage user accounts, roles, and status
- Room Management: Add, edit, delete, and manage room inventory
- Booking Management: Oversee all bookings and update statuses
- Review Moderation: Monitor and manage user reviews
- JWT Authentication with access and refresh tokens
- Password hashing using bcrypt
- Input validation and sanitization
- Rate limiting to prevent abuse
- CORS configuration for secure cross-origin requests
- Helmet for security headers
- File upload restrictions and validation
- Environment variable protection
All applications are fully responsive and optimized for:
- Desktop computers
- Tablets
- Mobile devices
- Various screen sizes and orientations
cd backend
npm test # Run tests
npm run coverage # Run tests with coverage# Backend
cd backend && npm run lint
# Frontend
cd frontend && npm run lint
# Admin Panel
cd admin-panel && npm run lint- Deploy to platforms like Heroku, Railway, or AWS
- Ensure MongoDB connection (MongoDB Atlas recommended)
- Set production environment variables
- Configure CORS for production domains
- Deploy to Vercel, Netlify, or similar platforms
- Update API URLs for production
- Configure environment variables
- Build and deploy to static hosting platforms
- Update API configurations for production
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the ISC License - see the LICENSE file for details.
- π Website: srmukul.com
- π§ Email: [email protected]
- π GitHub: @SamiurRahmanMukul
- πΌ LinkedIn: @SamiurRahmanMukul
- Express.js team for the robust web framework
- MongoDB team for the flexible database solution
- React and Next.js teams for the powerful frontend frameworks
- Ant Design team for the comprehensive UI component library
- All open-source contributors who made this project possible
β If you found this project helpful, please give it a star! β
