Arjuno Travel Web App is a system for managing travel booking operations in "Arjuno Travel Booking Management System". It consists of a backend API and a frontend interface for users to interact with.
Arjuno Travel Booking Management System is designed to facilitate the booking of travel packages for customers. The API provides various endpoints for registering new users, handling authentication, managing travel details, and processing payments for travel bookings.
- User Registration: Register new users with basic information such as name, email, and password.
- User Login: Authenticate users with their email and password to access protected endpoints.
- Travel Listing: Get a list of available travel packages with options to filter by price, origin, destination, and departure time.
- Travel Details: Retrieve detailed information about a specific travel package.
- Travel Booking: Process payment for a travel booking and update the booking status to "paid".
- User Profile Update: Allow users to update their profile information such as name, email, and password.
- Travel Management: Allow authorized users to add, update, and delete travel packages.
- Error Handling: Proper error handling for various scenarios such as validation errors and resource not found.
POST /api/register
: Register a new user with name, email, password, and role (admin or user).POST /api/login
: Authenticate user and get an access token for protected endpoints.POST /api/logout
: Logout the authenticated user.PUT /api/users
: Update the user profile with new information (for authenticated users only).GET /api/users
: Get a list of all users (for authorized users only).GET /api/users/{id}
: Get a specific user by ID (for authorized users only).
GET /api/travel
: Get a list of available travel packages with optional filters.- Query Parameters:
price
,origin
,destination
,departure_time
.
- Query Parameters:
GET /api/travel/{id}
: Get detailed information about a specific travel package.POST /api/travel
: Add a new travel package (for authenticated users only).PUT /api/travel/{id}
: Update a travel package (for authenticated users only).DELETE /api/travel/{id}
: Delete a travel package (for authenticated users only).
POST /api/bookings
: Book a travel package (for authenticated users only).GET /api/bookings
: Get a list of user bookings (for authenticated users only).DELETE /api/bookings/{id}
: Cancel a booked travel package (for authenticated users only).
POST /api/payment/{id}
: Process payment for a travel booking using a Stripe token (for authenticated users only).
Column | Type | Nullable | Key | Default | Extra |
---|---|---|---|---|---|
id | int(11) | No | Primary | None | Auto Increment |
name | varchar(255) | No | None | None | |
role | boolean | No | None | None | |
varchar(255) | No | Unique | None | ||
password | varchar(255) | No | None | None | |
created_at | timestamp | No | None | None | |
updated_at | timestamp | No | None | None |
Column | Type | Nullable | Key | Default | Extra |
---|---|---|---|---|---|
id | int(11) | No | Primary | None | Auto Increment |
price | decimal(10,2) | No | None | None | |
origin | varchar(255) | No | None | None | |
destination | varchar(255) | No | None | None | |
departure_time | datetime | No | None | None | |
user_id | int(11) | No | Foreign | None | |
is_available | boolean | No | None | 1 | |
created_at | timestamp | No | None | None | |
updated_at | timestamp | No | None | None |
Column | Type | Nullable | Key | Default | Extra |
---|---|---|---|---|---|
id | int(11) | No | Primary | None | Auto Increment |
user_id | int(11) | No | Foreign | None | |
travel_id | int(11) | No | Foreign | None | |
status | enum | No | None | booked | |
created_at | timestamp | No | None | None | |
updated_at | timestamp | No | None | None |
- Clone the repository:
git clone https://github.com/amrimuf/arjuno-travel
- Navigate to the project directory:
cd arjuno-travel
- Install PHP dependencies:
composer install
- Install Node.js dependencies:
npm install
- Configure the environment file:
cp .env.example .env
- Generate the application key:
php artisan key:generate
- Set up the database connection (and Stripe configuration) in the
.env
file. - Run XAMPP and start Apache and MySQL services.
- Run database migrations with seeding:
php artisan migrate --seed
- Compile assets with Tailwind CSS:
npm run dev
- Start the development server:
php artisan serve
- Access the frontend interface at
http:https://localhost:8000/
- Access the API documentation at
http:https://localhost:8000/api/documentation
- PHP 8.1.6
- Laravel 10.10
- Tailwind CSS
- Stripe 10.18
- MySQL
- Swagger
Arjuno Travel API is developed and maintained by Amri Mufti.
This project is open-source and available under the MIT License. Feel free to use, modify, and distribute the code as needed.