Skip to content

LuxeTravel is a multi-API integration bus ticketing system that offers real-time seat booking and optional food add-ons. Built with Next.js, Node.js, and Prisma, it demonstrates how to manage independent APIs seamlessly within one platform.

Notifications You must be signed in to change notification settings

Moontaz/LuxeTravel-v1.0.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚍 LuxeTravel – Multi-API Integration Bus Ticketing System

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.

✨ Features

  • βœ… 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.

🎯 Project Goal

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.

πŸ”— Live Demo and API

Note: Bus data is available for September 22-24, 2024. Please select these dates when booking for testing purposes.

πŸ›  Tech Stack

Client-side Next.js TypeScript TailwindCSS
Server-side Node.js JavaScriptExpress.js Prisma JWT AdminJS Context API

AdminJS

πŸš€ Project Overview

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.

πŸ”§ Installation and Setup

1. Clone the repository:

git clone https://github.com/Moontaz/LuxeTravel-v1.0.0.git
cd LuxeTravel-v1.0.0

2. Client Setup (Next.js Frontend):

Navigate to the client directory:

cd client

Install dependencies:

npm install

Run the development server:

npm run dev

3. Server Setup (Node.js Backend for Bus & Food APIs):

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

4. Prisma Configuration (Backend Database):

Generate Prisma client:

npx prisma generate

Apply migrations (if any):

npx prisma migrate dev

5. Environment Variables:

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

πŸ’‘ How to Use

  1. Visit the LuxeTravel platform.
  2. Choose a travel date (e.g., September 22-24, 2024).
  3. Select a bus and book your seat in real-time.
  4. Add food to your booking if desired.
  5. Confirm your booking with secure JWT authentication.

πŸ™Œ Feedback

I’m excited to hear your thoughts and suggestions! Feel free to open an issue or reach out directly for collaboration opportunities.

About

LuxeTravel is a multi-API integration bus ticketing system that offers real-time seat booking and optional food add-ons. Built with Next.js, Node.js, and Prisma, it demonstrates how to manage independent APIs seamlessly within one platform.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published