https://github.com/lprabodha/hotel-reservation
Hotel Reservation system
https://github.com/lprabodha/hotel-reservation
hotel-management hotel-reservation laravel php role-based-access
Last synced: 11 months ago
JSON representation
Hotel Reservation system
- Host: GitHub
- URL: https://github.com/lprabodha/hotel-reservation
- Owner: Lprabodha
- Created: 2025-04-20T13:51:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-15T12:24:16.000Z (12 months ago)
- Last Synced: 2025-06-15T13:45:21.490Z (12 months ago)
- Topics: hotel-management, hotel-reservation, laravel, php, role-based-access
- Language: CSS
- Homepage: https://click2checkin.duckdns.org/
- Size: 18 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐จ Hotel Reservation System



A web-based hotel reservation platform built with **Laravel**. Supports multi-hotel management for customers, hotel managers, clerks, and travel companies to handle room bookings, check-ins, check-outs, billing, and reporting.
---
## ๐ Features
- **Multi-hotel support**: Manage multiple hotels, each with its own rooms and staff.
- **Flexible Booking**: Customers & travel companies can book single or multiple rooms per reservation.
- **Check-in / Check-out**: Intuitive flows for front desk operations.
- **Billing & Payments**: Automatic billing, payment tracking, and no-show auto-billing.
- **Reporting**: Daily reports and analytics.
- **Role-based Access**: Super Admin, Hotel Manager, Clerk, Customer, Travel Company.
- **Secure Authentication**: Robust login system using Spatie Laravel Permission.
- **Responsive UI**: Built with [Bootstrap](https://getbootstrap.com/).
- **CI/CD**: GitHub Actions for auto-deployment to AWS EC2.
---
## ๐ ๏ธ Tech Stack
- **Backend**: Laravel 12
- **Database**: MySQL / MariaDB
- **Authorization**: Spatie Laravel-Permission
- **Frontend**: Tailwind CSS / Bootstrap
- **Dev Tools**: Composer, NPM, GitHub Actions, EC2
---
## โ๏ธ Installation & Local Setup
1. **Clone the repository:**
```bash
git clone https://github.com/Lprabodha/hotel-reservation
cd hotel-reservation
```
2. **Install dependencies:**
```bash
composer install
npm install
```
3. **Setup environment:**
```bash
cp .env.example .env
php artisan key:generate
```
4. **Configure database:**
- Update `.env` with your database credentials.
5. **Run migrations and seeders:**
```bash
php artisan migrate --seed
```
6. **Start the development server:**
```bash
php artisan serve
```
7. **Access the app:**
- Visit: [http://127.0.0.1:8000](http://127.0.0.1:8000)
---
## ๐งโ๐ป User Roles
| Role | Permissions |
|----------------|------------------------------------------------|
| Super Admin | Full system access, manage all hotels & users |
| Hotel Manager | Manage assigned hotel, rooms, reports |
| Hotel Clerk | Handle bookings, check-ins/outs |
| Travel Company | Book rooms in bulk at negotiated rates |
| Customer | Book/manage personal reservations |
---
## ๐ Deployment (CI/CD)
Deployed to AWS EC2 via GitHub Actions.
### Setup
1. **Add these GitHub repository secrets:**
- `SERVER_IP`
- `SSH_PRIVATE_KEY`
2. **Configure deployment workflow:**
- Edit `.github/workflows/deploy.yml` as needed for your environment.
3. **Deploy:**
- Push to the `main` branch. Deployment is triggered automatically.
---
## ๐งช Running Unit & Feature Tests
This project includes Unit Tests and Feature Tests to ensure stability and reliability.
### How to Run Tests
1. **Create a test database:**
Ensure you have a separate database for testing in your `.env.testing` file:
```makefile
DB_CONNECTION=mysql
DB_DATABASE=hotel_reservation_test
DB_USERNAME=root
DB_PASSWORD=
```
2. **Run Migrations for Testing:**
```bash
php artisan migrate --env=testing
```
3. **Execute Tests:**
```bash
php artisan test
```
Or if you prefer PestPHP syntax:
```bash
./vendor/bin/pest
```
#### Example Test Commands
```bash
# Run all tests
php artisan test
# Run only Feature tests
php artisan test --testsuite=Feature
# Run specific test file
php artisan test tests/Feature/Admin/ReservationControllerTest.php
```
## ๐ค Contributing
We love contributions from the community!
### How to Contribute
1. **Fork the repository**
2. **Create a feature branch:**
```bash
git checkout -b feat/YourFeatureName
```
3. **Make your changes and commit:**
```bash
git commit -m "Add your descriptive commit message"
```
4. **Push your branch:**
```bash
git push origin feat/YourFeatureName
```
5. **Open a Pull Request** and describe your changes
Please ensure code quality and add relevant tests. For major features, open an issue for discussion first.
---
## ๐ License
This project is licensed under the [MIT License](LICENSE).
---
## ๐จโ๐ป Authors
- Tharindu Nuwan
- Amandi
- Chathumi
- Sadunika
- Lahiru Prabodha
---
Happy coding! ๐
---