Skip to content

A production-realistic, industrial-grade management system designed for mid-sized hotels. This project integrates Hotel Operations and Restaurant Management into a unified platform with a shared billing and identity backbone.

Notifications You must be signed in to change notification settings

TsinatKibru/HRMS

Repository files navigation

Hotel & Restaurant Management System (HRMS)

A production-realistic, industrial-grade management system designed for mid-sized hotels. This project integrates Hotel Operations and Restaurant Management into a unified platform with a shared billing and identity backbone.

πŸš€ Key Features

  • Unified Billing Engine: Centralized handling of charges for both Hotel Guests (Folios) and Walk-in Customers (Bills).
  • Operational Correctness: Strict state machines for Stays, Orders, and Room Status to prevent revenue leakage and operational errors.
  • "Command Center" UI: A premium, industrial-style interface designed for high-efficiency operations in fast-paced environments.
  • Role-Based Access Control (RBAC): Specialized distinct views and permissions for Receptionists, Managers, Waiters, Housekeeping, and Kitchen Staff.
  • Integrated Modules:
    • Hotel Operations: Room inventory tracking, check-in/out flows, and housekeeping management.
    • Restaurant Operations: Table management, POS (Point of Sale), and live KDS (Kitchen Display System).
    • Inventory: Real-time tracking of consumables across the entire property.

πŸ› οΈ Tech Stack

Backend

  • Framework: NestJS
  • Database: PostgreSQL
  • ORM: Prisma
  • Authentication: JWT & Passport

Frontend

  • Framework: Next.js (App Router)
  • Styling: Tailwind CSS
  • State Management: React Query & Zustand
  • UI Components: Radix UI & Lucide Icons

🏁 Getting Started

Follow these steps to set up the project locally.

Prerequisites

  • Node.js (v18 or higher)
  • Docker & Docker Compose

Installation

  1. Clone the Repository

    git clone <repository-url>
    cd HRMS
  2. Start Infrastructure Spin up the PostgreSQL database and pgAdmin using Docker.

    docker-compose up -d
  3. Backend Setup Navigate to the backend directory to install dependencies and initialize the database.

    cd backend
    npm install
    
    # Run database migrations and seed default data
    npx prisma migrate dev
    
    # Start the backend server
    npm run start:dev

    The API will be available at http://localhost:3000

  4. Frontend Setup In a new terminal, navigate to the frontend directory to launch the web client.

    cd frontend
    npm install
    
    # Start the development server
    npm run dev

    The application will be available at http://localhost:3001 (or next available port)

πŸ”‘ Default Accounts (Seeded)

Use these credentials to test different roles within the system:

Role Email Password
Admin admin1@hrms.com Pass@123
Manager manager1@hrms.com Pass@123
Receptionist receptionist1@hrms.com Pass@123
Waiter waiter1@hrms.com Pass@123
Cashier cashier1@hrms.com Pass@123
Kitchen Staff kitchen1@hrms.com Pass@123

πŸ“– Testing Manual (Walkthrough)

Follow this sequence to test the system's core flows:

1. Receptionist Login

Login as a receptionist to start the guest check-in process. Receptionist Login

2. Check-In

Process a new guest check-in. Check In

3. Room Grid

View the status of all rooms (Vacant, Occupied, Dirty). Room Grid

4. Active Stays

Review the list of currently active stays. Active Stays

5. Active Stays Detail

View details of a specific active stay. Active Stays Detail

6. Waiter Login

Login as a waiter to manage dining orders. Waiter Login

7. Table Map

View the restaurant table layout and status. Waiter Table Map

8. Room Service

Manage room service orders. Waiter Room Service

9. Send Order to Kitchen

Record and send an order to the kitchen. Waiter Order Record

10. Service Queue (Kitchen Track)

Track the status of orders sent to the kitchen. Waiter Service Queue

11. Kitchen Login

Login as kitchen staff to view incoming orders. Kitchen Login

12. Incoming Orders

View new orders arriving in the kitchen. Kitchen Incoming

13. Preparing Orders

Mark orders as "Preparing". Kitchen Preparing

14. Ready Orders

Mark orders as "Ready" for pickup. Kitchen Ready

15. Mark Served

Waiter marks the ready order as "Served" to the customer. Waiter Mark Served

16. Cashier Login

Login as a cashier to handle billing. Cashier Login

17. Bills for Served Orders

Generate bills for served restaurant orders. Cashier Bills

18. Folio View

Receptionist views the guest's folio (combined hotel and restaurant charges). Receptionist Folio View

19. Bill Process

Initiate the billing process for a guest. Receptionist Bill Process

20. Bill Process (Second Step)

Complete the billing details. Receptionist Bill Process Second

21. Payment Page

Process the payment. Payment Page

22. Room Checkout

Finalize the room checkout. Room Checkout

23. Guest List

View the history of guests. Guest List

24. Guest Detail History

View detailed history for a specific guest. Guest Detail History

25. Ready/Recent Used Room

Check the status of recently used rooms. Ready Recent Used Room

26. Inventory

Manage hotel inventory. Inventory

27. System Settings - General

Configure general system settings. System Settings General

28. System Settings - Floor & Room Category

Manage floors and room categories. System Settings Floor & Category

29. System Settings - Rooms

Manage individual room settings. System Settings Rooms

30. System Settings - Staff

Manage staff accounts and roles. System Settings Staff

πŸ“‚ Project Structure

HRMS/
β”œβ”€β”€ backend/                # NestJS API Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ restaurant/     # Restaurant domain logic
β”‚   β”‚   β”œβ”€β”€ hotel/          # Hotel domain logic
β”‚   β”‚   └── ...
β”‚   └── prisma/             # Database schema and seeds
β”‚
β”œβ”€β”€ frontend/               # Next.js Web Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/            # App Router pages
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚   β”‚   └── services/       # API client services
β”‚
β”œβ”€β”€ docker-compose.yml      # Infrastructure configuration
└── ...

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

πŸš€ Deployment

The project is optimized for deployment on Vercel. Since this is a monorepo, you will need to deploy the Frontend and Backend as two separate projects linked together.

1. Deploying the Backend (API)

The backend is configured to run as a Serverless Function on Vercel.

  1. Push your code to GitHub/GitLab/Bitbucket.
  2. Import the repository into Vercel.
  3. Project Name: hrms-backend (example).
  4. Root Directory: Edit and select backend.
  5. Environment Variables:
    • DATABASE_URL: Connection string to your PostgreSQL database (e.g., from Neon, Supabase, or Railway).
    • JWT_SECRET: A secure random string.
  6. Deploy. Vercel will automatically detect the NestJS app and use the api/index.ts entry point.

Note: Your backend URL will look like https://hrms-backend.vercel.app.

2. Deploying the Frontend (Web App)

  1. Import the same repository into Vercel again (create a new project).
  2. Project Name: hrms-frontend (example).
  3. Root Directory: Edit and select frontend.
  4. Framework Preset: Next.js (should be auto-detected).
  5. Environment Variables:
    • NEXT_PUBLIC_API_URL: The URL of your deployed backend (e.g., https://hrms-backend.vercel.app).
  6. Deploy.

Database Hosting

Since Vercel is serverless, you need an external PostgreSQL provider. Recommended options:

Ensure your DATABASE_URL is accessible from the public internet (or Vercel's IP range).

πŸ‘₯ Authors

πŸ“„ License

This project is currently private and unlicensed.

About

A production-realistic, industrial-grade management system designed for mid-sized hotels. This project integrates Hotel Operations and Restaurant Management into a unified platform with a shared billing and identity backbone.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages