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.
- 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.
- CI/CD: GitHub Actions for auto-deployment to AWS EC2.
- Backend: Laravel 12
- Database: MySQL / MariaDB
- Authorization: Spatie Laravel-Permission
- Frontend: Tailwind CSS / Bootstrap
- Dev Tools: Composer, NPM, GitHub Actions, EC2
-
Clone the repository:
git clone https://github.com/Lprabodha/hotel-reservation cd hotel-reservation
-
Install dependencies:
composer install npm install
-
Setup environment:
cp .env.example .env php artisan key:generate
-
Configure database:
- Update
.env
with your database credentials.
- Update
-
Run migrations and seeders:
php artisan migrate --seed
-
Start the development server:
php artisan serve
-
Access the app:
- Visit: http://127.0.0.1:8000
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 |
Deployed to AWS EC2 via GitHub Actions.
-
Add these GitHub repository secrets:
SERVER_IP
SSH_PRIVATE_KEY
-
Configure deployment workflow:
- Edit
.github/workflows/deploy.yml
as needed for your environment.
- Edit
-
Deploy:
- Push to the
main
branch. Deployment is triggered automatically.
- Push to the
This project includes Unit Tests and Feature Tests to ensure stability and reliability.
-
Create a test database:
Ensure you have a separate database for testing in your
.env.testing
file:DB_CONNECTION=mysql DB_DATABASE=hotel_reservation_test DB_USERNAME=root DB_PASSWORD=
-
Run Migrations for Testing:
php artisan migrate --env=testing
-
Execute Tests:
php artisan test
Or if you prefer PestPHP syntax:
./vendor/bin/pest
# 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
We love contributions from the community!
- Fork the repository
- Create a feature branch:
git checkout -b feat/YourFeatureName
- Make your changes and commit:
git commit -m "Add your descriptive commit message"
- Push your branch:
git push origin feat/YourFeatureName
- 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.
This project is licensed under the MIT License.
- Tharindu Nuwan
- Amandi
- Chathumi
- Sadunika
- Lahiru Prabodha
Happy coding! 😊