Welcome to LuxeTravel! This is a demonstration project showcasing the integration of multiple independent APIs in a unified web platform. This project combines real-time bus seat booking with optional food add-ons, offering a seamless user experience powered by Next.js, Node.js, and Prisma.
- β Real-time seat booking: Avoid double bookings with live seat availability.
- β Food add-ons: Enhance your journey with meal options during the booking process.
- β Secure authentication: JWT-based authentication ensures safe transactions.
This project demonstrates how to integrate multiple APIs from independent services into a cohesive platform. Each APIβone for bus ticketing and another for food add-onsβruns independently, but they interact seamlessly with the website. LuxeTravel aims to showcase the complexities and solutions involved in managing secure, real-time data flows between APIs while ensuring a smooth user experience.
- LuxeTravel Platform: travel.moongo.my.id
- Bus Data Public API: api-bus.moongo.my.id
Note: Bus data is available for September 22-24, 2024. Please select these dates when booking for testing purposes.
LuxeTravel integrates two independent services:
- Bus API: Real-time seat availability.
- Food API: Optional food add-ons for passengers.
Each service operates independently, but they are unified in the LuxeTravel platform to create a seamless user experience.
This project demonstrates:
- Management of multiple APIs independently.
- Implementation of secure JWT-based authentication.
- Client-side state management using Context API.
- Backend management with Prisma for CRUD operations and AdminJS for Dashboard UI.
git clone https://github.com/Moontaz/LuxeTravel-v1.0.0.git
cd LuxeTravel-v1.0.0
Navigate to the client directory:
cd client
Install dependencies:
npm install
Run the development server:
npm run dev
Navigate to the food-server or bus-server directory:
cd server1 #for Bus API
cd server2 #for Food API
Install dependencies:
npm install
Run the server:
node app.js
Generate Prisma client:
npx prisma generate
Apply migrations (if any):
npx prisma migrate dev
Create a .env
file in both client and server directories with the following keys:
- JWT_SECRET: Secret key for JWT authentication.
- DATABASE_URL: MySQL database connection string for Prisma.
Example .env
:
JWT_SECRET=your-secret-key
DATABASE_URL=mysql://user:password@localhost:3306/luxetravel
- Visit the LuxeTravel platform.
- Choose a travel date (e.g., September 22-24, 2024).
- Select a bus and book your seat in real-time.
- Add food to your booking if desired.
- Confirm your booking with secure JWT authentication.
Iβm excited to hear your thoughts and suggestions! Feel free to open an issue or reach out directly for collaboration opportunities.