A booking backend built with Laravel, providing a RESTful API for managing properties, rooms, bookings, payments, reviews, offers, rewards, and user interactions.
The project also includes a Filament-based administration dashboard for managing the application's resources and operations.
- Email OTP-based authentication
- API authentication using Laravel Sanctum
- User authentication and authorization
- Role and permission management
- User profile management
- Favorite properties
- Saved and managed AI-generated trip plans
- Payment method management
- Transaction history
- Reward points and points history
- Property and room management
- Room availability checking
- Hotel/property search
- Booking management
- Policy-based booking cancellation according to property cancellation rules
- Booking expiration handling
- Booking payment management
- Database transactions and locking to prevent double bookings
- Stripe payment integration
- Idempotent payment processing using idempotency keys
- Partial and remaining booking payments
- Automatic stripe refund amount calculation
- Reward points conversion and handling during refunds
- Invoice generation for payments and cancellations
- Invoices attached to email notifications
- Secure payment webhook handling
- Currency Conversions using groq ai
- Offers and discount management
- Offer validation based on booking conditions
- Rewards points earning and redemption
- Reward points conversion during payments and refunds
- Reviews and ratings
- Review categories and tags
- Review approval and rejection workflow
- Review editing restrictions
- AI-powered review summaries using Groq AI
- Automatic review summary regeneration based on review changes
- AI-powered property search using Groq AI
- AI travel assistant using Groq AI
- AI-powered travel planner that generates personalized trip plans based on users' interests , travel style , destination and travel dates using Groq AI
- Conversation history storage to support follow-up interactions and refinement of generated trip plans
- AI-powered review summaries using Groq AI
- User Email notifications for booking, payment, review, offer, and arrival events
- Booking confirmation and cancellation notifications
- Booking expiration notifications
- Booking payment and balance due reminders
- Payment success and failure notifications
- Booking arrival reminders
- Real-time event broadcasting using Pusher and Laravel Echo
- Offer notifications
- Review approval, rejection, reminder, and update notifications
- Admin notifications for booking, payment, and review events
- Queued jobs for background processing
- Scheduled tasks
- Event-driven application workflows
- Redis-compatible caching using Memurai
- Database query and performance optimization
- Database transactions and locking to prevent double bookings
- Filament admin dashboard
- Property management
- Room management
- Booking management
- Payment management
- Review management
- Offer management
- User management
- Country and city management
- Amenity management
- Room type management
- Travel category management
- Review tag and category management
- Property type management
- RESTful API
- Request validation
- Authorization policies
- Pagination and filtering
- Search functionality
- PHP
- Laravel
- MySQL
- Filament
- Laravel Sanctum
- Spatie Laravel Permission
- Stripe
- Pusher
- Memurai (Redis-compatible)
- Groq AI
- Blade
- Vite
app/
├── Console/ # Artisan commands and scheduled tasks
├── Enums/ # Application enums
├── Events/ # Application events
├── Filament/ # Filament resources, pages, and widgets
├── Http/
│ ├── Controllers/ # API and web controllers
│ ├── Middleware/ # HTTP middleware
│ ├── Requests/ # Form request validation
│ └── Resources/ # API resources
├── Jobs/ # Queued background jobs
├── Listeners/ # Event listeners
├── Livewire/ # Livewire components
├── Models/ # Eloquent models
├── Notifications/ # Application notifications
├── Observers/ # Model observers
├── Policies/ # Authorization policies
└── Services/ # Business logic and integrations
bootstrap/ # Framework bootstrapping
config/ # Application configuration
database/
├── factories/ # Model factories
├── migrations/ # Database migrations
└── seeders/ # Database seeders
lang/ # Localization files
public/ # Public assets and application entry point
resources/
├── css/ # CSS assets
├── js/ # JavaScript assets
└── views/
├── filament/ # Filament-related views
└── invoices/ # Invoice templates
routes/
├── api.php # API routes
├── channels.php # Broadcast channel authorization
├── console.php # Console routes
└── web.php # Web routes
storage/ # Logs, cache, and generated files
tests/ # Automated tests
Make sure you have the following installed:
- PHP 8.2+
- Composer
- Node.js and npm
- MySQL
- Redis
git clone https://github.com/sara55m/Booking-App.git
cd Booking-Appcomposer installnpm installCreate your environment file:
cp .env.example .envOn Windows:
copy .env.example .envGenerate the application key:
php artisan key:generateConfigure your database and other required services in the .env file.
Run the database migrations:
php artisan migrateSeed the database:
php artisan db:seedCreate the public storage link:
php artisan storage:linkBuild the frontend assets:
npm run buildStart the Laravel development server:
php artisan serveThe application will be available at:
http://127.0.0.1:8000
Start the queue worker:
php artisan queue:workStart the Laravel scheduler:
php artisan schedule:workThe application uses Stripe for booking payments and refund processing.
Stripe credentials and webhook secrets must be configured through environment variables.
The application uses Groq AI for AI-powered features including:
- Property search
- Travel assistant
- Personalized travel planning
- Property review summaries
Groq API credentials must be configured through environment variables.
The project includes a Filament administration dashboard for managing:
- Countries
- Cities
- Amenities
- Travel Categories
- Property Types
- Properties
- Room Types
- Rooms
- Bookings
- Reviews
- Review Tags and Categories
- Offers
- Users
- User Reward Points History
- Payments
The API is tested and documented using Postman.
The API provides endpoints for:
- Authentication
- Properties and rooms
- Bookings
- Payments and refunds
- Reviews and ratings
- Offers
- Favorites
- Reward points
- User profile and account management
- AI-powered features
The full API collection is included in this repository:
📁 docs\Booking.postman_collection.json
- Open Postman and click Import.
- Select the file
docs/booking-api.postman_collection.json. - Set the
base_urlcollection variable:- Live demo:
https://booking-app-sara55m.wasmer.app - Local:
http://localhost:8000
- Live demo:
- Run the Login request. It saves the token automatically, so all other requests are authenticated.
The collection covers authentication, properties, availability, bookings, payments, offers, reviews, and the AI endpoints, with example responses in English and Arabic.
- Admin dashboard: https://booking-app-sara55m.wasmer.app/admin
Super Admin Credentials: email: admin@example.com password: 123456
Payments run in Stripe test mode. Use the test card 4242 4242 4242 4242 with any future expiry date and any CVC. No real money is charged.
Automated tests will be added using PHPUnit, including unit and feature tests for the application's core functionality and business logic.
Never commit the .env file or expose sensitive credentials, including:
- Database credentials
- API keys
- Stripe secrets
- Webhook secrets
- AI API keys
- Mail credentials
Use .env.example to document the required environment variables without exposing sensitive values.
🚧 This project is currently live with future features in consideration.
Sara Mohamed
Junior Backend PHP/Laravel Developer
GitHub: https://github.com/sara55m
This project is currently intended for portfolio and educational purposes.