Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartTravel

Project Overview

SmartTravel is a modern travel booking platform built to provide a seamless and fast user experience. It allows users to search and book flights, buses, and trains across multiple operators using an intuitive, clean interface.

Features

  • Flexible Route Search: Type a few letters (e.g., "a" to "u") to instantly see all matching routes like Ahmedabad to Udaipur.
  • Multi-Operator Booking: Search options across different modes of transport (Flights, Trains, Buses).
  • Secure Authentication: Registration, login, and secure sessions using JWT & Bcrypt.
  • Admin Dashboard: Role-based access allowing admins to create, edit, and delete routes, as well as upload images to Cloudinary.
  • Modern & Responsive UI: Clean, human-built aesthetic optimized for ease of use.
  • Fully Containerized: One-command setup using Docker and Docker Compose.

Screenshots

Homepage

Homepage

Route selection

Route selection

Payment page

Payment page

Confirmation

Confirmation

Tech Stack

  • Frontend: React, Vite, React Router, CSS
  • Backend: Node.js, Express.js
  • Database: PostgreSQL
  • Authentication: JSON Web Tokens (JWT), Bcrypt.js
  • Media Hosting: Cloudinary (Integrated with Multer)
  • Containerization: Docker, Docker Compose, Nginx

Run Locally with Docker (Recommended)

The easiest way to run the application is using Docker Compose, which automatically sets up the database, backend, and frontend.

  1. Clone the repository:

    git clone https://github.com/your-username/SmartTravel.git
    cd SmartTravel
  2. Configure Environment Variables: Copy the example environment file and fill in your details (like a secure Postgres password, your admin email, and Cloudinary keys):

    cp .env.example .env

    (Note: The ADMIN_EMAIL you set here is the email address that will be granted Admin Dashboard access when you register/login).

  3. Start the containers:

    docker-compose up -d --build
  4. Access the Application:

Manual Setup (Without Docker)

If you prefer to run the application directly on your machine:

  1. Setup the Database: Ensure PostgreSQL is installed and running locally. Create a database named smarttravel and run the script in backend/db/schema.sql to generate the required tables.

  2. Setup the Backend:

    cd backend
    npm install

    Create a .env file in the root matching the .env.example file. Then start the server:

    npm run server
  3. Setup the Frontend: Open a new terminal:

    cd frontend
    npm install
    npm run dev

    The frontend will boot up on http://localhost:5173.

Folder Structure

SmartTravel/
├── backend/                  # Node.js Express server
│   ├── db/                   # PostgreSQL connection & schema
│   ├── uploads/              # Local temp storage for multer
│   ├── server.js             # API entry point & routes
│   └── Dockerfile            
├── frontend/                 # React web client
│   ├── src/                  
│   │   ├── api/              # Axios API clients
│   │   ├── pages/            # React pages (Home, Search, Admin, etc.)
│   │   ├── App.jsx           # React Router setup
│   │   └── index.css         # Global UI styling
│   ├── vite.config.js        # Bundler configuration
│   └── Dockerfile            # Multi-stage build with Nginx
├── docker-compose.yml        # Docker orchestration configuration
├── .env.example              # Template for required environment variables
└── README.md                 # Project documentation

About

A smart travel booking platform frontend with modular multi-step booking workflows, responsive UI, and backend-ready architecture for future integration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages