Skip to content

BookIt is a comprehensive travel experience booking platform that allows users to discover, book, and manage exciting travel experiences. From adventure activities to cultural tours, BookIt provides a seamless booking experience with real-time availability, promo code support, and secure user authentication.

Notifications You must be signed in to change notification settings

brijeshpatel49/BookIt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BookIt Logo

🎫 BookIt

Your Gateway to Unforgettable Experiences

🌐 Live Demo

Visit Live Site

Experience BookIt in action! Click above to visit the live deployment.

TypeScript React Node.js MongoDB Express.js

A modern, full-stack travel experience booking platform built with React, TypeScript, Node.js, and MongoDB

Features β€’ Demo β€’ Installation β€’ Tech Stack β€’ API Documentation β€’ Future Plans


πŸ“– About BookIt

BookIt is a comprehensive travel experience booking platform that allows users to discover, book, and manage exciting travel experiences. From adventure activities to cultural tours, BookIt provides a seamless booking experience with real-time availability, promo code support, and secure user authentication.

✨ Key Highlights

  • πŸ” Secure Authentication - Bcrypt-encrypted passwords with JWT-ready architecture
  • 🎟️ Real-time Booking - Live slot availability with atomic transactions
  • πŸ’° Promo Code System - Flexible discount codes (percentage & fixed amount)
  • πŸ“± Responsive Design - Mobile-first approach with Tailwind CSS
  • πŸ”” Toast Notifications - Real-time user feedback for all actions
  • πŸ“Š Booking Management - View, track, and cancel bookings easily
  • ⚑ Fast & Efficient - Optimized MongoDB queries with proper indexing
  • 🎨 Modern UI/UX - Clean, intuitive interface with smooth animations

πŸš€ Features

For Users

🏠 Browse Experiences

  • View all available travel experiences
  • Filter by category, location, and price
  • See detailed information including highlights and inclusions
  • Real-time availability status

πŸ“… Smart Booking System

  • Select from available time slots
  • Adjust quantity based on availability
  • Apply promo codes for discounts
  • Instant booking confirmation with unique reference number

πŸ‘€ User Account Management

  • Secure registration and login
  • Auto-filled checkout forms for logged-in users
  • View booking history
  • Cancel bookings with automatic slot restoration

πŸ’³ Checkout Experience

  • Clear price breakdown (subtotal, taxes, discounts)
  • Promo code validation with instant feedback
  • Secure payment flow
  • Booking confirmation page

🎫 Promo Code Management

  • Create percentage or fixed-amount discounts

🎬 Demo

Screenshots

Home Page - Browse Experiences

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  🎫 BookIt                    🏠 Home  πŸ“‹ My Bookings   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”‚
β”‚  β”‚ [Image]  β”‚  β”‚ [Image]  β”‚  β”‚ [Image]  β”‚             β”‚
β”‚  β”‚ Scuba    β”‚  β”‚ Paraglideβ”‚  β”‚ Trekking β”‚             β”‚
β”‚  β”‚ β‚Ή2,500   β”‚  β”‚ β‚Ή3,000   β”‚  β”‚ β‚Ή1,500   β”‚             β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚
β”‚                                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Experience Details with Booking

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  ← Details                                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  [Experience Image]                                      β”‚
β”‚                                                          β”‚
β”‚  Scuba Diving Adventure                                 β”‚
β”‚  πŸ“ Goa, India                                          β”‚
β”‚                                                          β”‚
β”‚  Select Time Slot:                                      β”‚
β”‚  β—‹ Dec 25 - 10:00 AM  β—‹ Dec 25 - 2:00 PM              β”‚
β”‚  ● Dec 26 - 10:00 AM  β—‹ Dec 26 - 2:00 PM              β”‚
β”‚                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                    β”‚
β”‚  β”‚ Subtotal: β‚Ή2,500β”‚                                    β”‚
β”‚  β”‚ Taxes:    β‚Ή148  β”‚                                    β”‚
β”‚  β”‚ Total:    β‚Ή2,648β”‚                                    β”‚
β”‚  β”‚                 β”‚                                    β”‚
β”‚  β”‚  [Confirm]      β”‚                                    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Live Demo

Demo Account:

Available Promo Codes:

  • SAVE10 - 10% off
  • SAVE20 - 20% off
  • FLAT50 - β‚Ή50 off
  • FLAT100 - β‚Ή100 off

πŸ› οΈ Tech Stack

Frontend

  • React 18 - UI library
  • TypeScript - Type safety
  • Vite - Build tool & dev server
  • React Router v6 - Client-side routing
  • Tailwind CSS - Utility-first styling
  • React Hot Toast - Toast notifications

Backend

  • Node.js - Runtime environment
  • Express.js - Web framework
  • TypeScript - Type safety
  • MongoDB - NoSQL database
  • Mongoose - ODM for MongoDB
  • Bcrypt - Password hashing
  • CORS - Cross-origin resource sharing

Development Tools

  • ts-node-dev - TypeScript development
  • ESLint - Code linting
  • Prettier - Code formatting
  • Git - Version control

πŸ“¦ Installation

Prerequisites

Before you begin, ensure you have the following installed:

Step 1: Clone the Repository

git clone https://github.com/yourusername/bookit.git
cd bookit

Step 2: Backend Setup

# Navigate to server directory
cd server

# Install dependencies
npm install

# Create .env file
cat > .env << EOL
PORT=5000
MONGODB_URI=mongodb://localhost:27017/bookit
CORS_ORIGIN=http://localhost:3000
EOL

# Seed the database with sample data
npm run seed

# Start the backend server
npm run dev

The backend server will start on http://localhost:5000

Step 3: Frontend Setup

Open a new terminal window:

# Navigate to client directory (from BOOKIT Again folder)
cd client

# Install dependencies
npm install

# Create .env file
cat > .env << EOL
VITE_API_URL=http://localhost:5000/api
EOL

# Start the frontend development server
npm run dev

The frontend will start on http://localhost:3000

Step 4: Access the Application

Open your browser and navigate to:


🎯 Quick Start Guide

1. Login with Demo Account (Fastest Way)

  • Click "Login" in the navigation bar
  • Use demo credentials:
  • Click "Sign In"

OR Register a New Account

  • Click "Register" in the navigation bar
  • Fill in your name, email, and password
  • Click "Register" to create your account

2. Browse Experiences

  • View all available experiences on the home page
  • Click on any experience card to see details

3. Book an Experience

  • Select a time slot from available options
  • Adjust quantity if needed
  • Apply a promo code (optional)
  • Click "Confirm" to proceed to checkout
  • Fill in your details (auto-filled if logged in)
  • Click "Pay and Confirm" to complete booking

4. Manage Your Bookings

  • Click "My Bookings" in the navigation
  • View all your bookings (confirmed and cancelled)
  • Click "View Details" to see the experience
  • Click "Cancel Booking" to cancel (if confirmed)

πŸ“š API Documentation

Base URL

http://localhost:5000/api

Authentication Endpoints

Register User

POST /auth/register
Content-Type: application/json

{
  "name": "John Doe",
  "email": "john@example.com",
  "password": "password123"
}

Login User

POST /auth/login
Content-Type: application/json

{
  "email": "john@example.com",
  "password": "password123"
}

Experience Endpoints

Get All Experiences

GET /experiences

Get Experience by ID

GET /experiences/:id

Booking Endpoints

Create Booking

POST /bookings
Content-Type: application/json

{
  "experienceId": "507f1f77bcf86cd799439011",
  "slotId": "507f1f77bcf86cd799439012",
  "userName": "John Doe",
  "userEmail": "john@example.com",
  "promoCode": "SAVE10"
}

Get User Bookings

GET /bookings?email=john@example.com

Cancel Booking

PATCH /bookings/:id/cancel

Promo Code Endpoints

Validate Promo Code

POST /promo/validate
Content-Type: application/json

{
  "code": "SAVE10",
  "originalPrice": 2500
}

πŸ—‚οΈ Project Structure

BOOKIT Again/
β”œβ”€β”€ client/                    # Frontend React application
β”‚   β”œβ”€β”€ public/               # Static assets
β”‚   β”‚   └── logo.png         # Application logo
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # Reusable React components
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ExperienceCard.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SlotSelector.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ CheckoutForm.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PriceBreakdown.tsx
β”‚   β”‚   β”‚   └── LoadingSpinner.tsx
β”‚   β”‚   β”œβ”€β”€ pages/           # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ HomePage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ExperienceDetailPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ CheckoutPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ResultPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LoginPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterPage.tsx
β”‚   β”‚   β”‚   └── MyBookingsPage.tsx
β”‚   β”‚   β”œβ”€β”€ lib/             # Utility functions
β”‚   β”‚   β”‚   └── api.ts       # API client
β”‚   β”‚   β”œβ”€β”€ types/           # TypeScript type definitions
β”‚   β”‚   β”‚   └── index.ts
β”‚   β”‚   β”œβ”€β”€ App.tsx          # Main app component
β”‚   β”‚   β”œβ”€β”€ main.tsx         # Entry point
β”‚   β”‚   └── index.css        # Global styles
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ vite.config.ts
β”‚   β”œβ”€β”€ tailwind.config.js
β”‚   └── tsconfig.json
β”‚
β”œβ”€β”€ server/                   # Backend Node.js application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/          # Configuration files
β”‚   β”‚   β”‚   └── database.ts  # MongoDB connection
β”‚   β”‚   β”œβ”€β”€ controllers/     # Request handlers
β”‚   β”‚   β”‚   β”œβ”€β”€ authController.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ experiencesController.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ bookingsController.ts
β”‚   β”‚   β”‚   └── promoController.ts
β”‚   β”‚   β”œβ”€β”€ models/          # Mongoose schemas
β”‚   β”‚   β”‚   β”œβ”€β”€ User.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ Experience.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ Booking.ts
β”‚   β”‚   β”‚   └── PromoCode.ts
β”‚   β”‚   β”œβ”€β”€ routes/          # API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ experiences.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ bookings.ts
β”‚   β”‚   β”‚   └── promo.ts
β”‚   β”‚   β”œβ”€β”€ scripts/         # Utility scripts
β”‚   β”‚   β”‚   └── seed.ts      # Database seeding
β”‚   β”‚   └── server.ts        # Express server setup
β”‚   β”œβ”€β”€ package.json
β”‚   └── tsconfig.json
β”‚
β”œβ”€β”€ README.md                 # This file
β”œβ”€β”€ PRODUCTION_READY.md      # Production deployment guide
└── SETUP_COMPLETE.md        # Setup documentation

πŸ”§ Configuration

Environment Variables

Backend (.env)

# Server Configuration
PORT=5000

# Database
MONGODB_URI=mongodb://localhost:27017/bookit

# CORS
CORS_ORIGIN=http://localhost:3000

Frontend (.env)

# API Configuration
VITE_API_URL=http://localhost:5000/api

πŸ§ͺ Testing

Manual Testing Checklist

  • User registration with validation
  • User login with correct/incorrect credentials
  • Browse experiences and view details
  • Select time slots and adjust quantity
  • Apply valid/invalid promo codes
  • Complete booking flow
  • View bookings in My Bookings page
  • Cancel confirmed bookings
  • Logout functionality
  • Responsive design on mobile devices
  • Toast notifications for all actions
  • Error handling for network failures

Running Tests

# Backend tests (when implemented)
cd server
npm test

# Frontend tests (when implemented)
cd client
npm test

πŸš€ Deployment

Deployment Platforms

  • Frontend: Vercel
  • Backend: Render
  • Database: MongoDB Atlas

Environment Setup for Production

  1. Update MONGODB_URI to your production database
  2. Update CORS_ORIGIN to your production frontend URL
  3. Update VITE_API_URL to your production backend URL
  4. Set NODE_ENV=production

πŸ” Security Features

  • βœ… Password Hashing - Bcrypt with 10 salt rounds
  • βœ… Input Validation - Server-side validation for all inputs
  • βœ… SQL Injection Protection - MongoDB with Mongoose ODM
  • βœ… XSS Protection - React's built-in XSS protection
  • βœ… CORS Configuration - Configurable allowed origins
  • βœ… Error Handling - No sensitive data exposed in errors
  • βœ… Atomic Transactions - Prevent race conditions in bookings

🎨 Design System

Color Palette

  • Primary: #FACC15 (Yellow-400) - Main brand color
  • Primary Dark: #EAB308 (Yellow-500) - Hover states
  • Background: #F9FAFB (Gray-50) - Page background
  • Text: #1F2937 (Gray-800) - Primary text
  • Border: #E5E7EB (Gray-200) - Borders and dividers

Typography

  • Font Family: Inter, system-ui, sans-serif
  • Headings: Bold, 24-32px
  • Body: Regular, 14-16px
  • Small: Regular, 12-14px

🌟 Future Plans

Phase 1: Enhanced Features

  • Payment Integration - Stripe/Razorpay for real payments
  • Email Notifications - Booking confirmations and reminders
  • SMS Notifications - Booking updates via SMS
  • Reviews & Ratings - User reviews for experiences
  • Wishlist - Save favorite experiences
  • Advanced Search - Filter by date, price range, category
  • Multi-language Support - i18n implementation

Phase 2: Admin Dashboard

  • Admin Panel - Comprehensive admin dashboard
  • Analytics - Booking statistics and revenue reports
  • User Management - View and manage users
  • Experience Management - CRUD operations for experiences
  • Promo Code Analytics - Track promo code usage
  • Booking Management - View and manage all bookings

Phase 3: AI & Personalization

  • AI Recommendations - Personalized experience suggestions
  • Chatbot - AI-powered customer support
  • Predictive Analytics - Forecast demand and trends

🀝 Contributing

We welcome contributions! Here's how you can help:

How to Contribute

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/AmazingFeature
  3. Commit your changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Contribution Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting PR

πŸ‘₯ Authors

Your Name


πŸ™ Acknowledgments

  • React Team - For the amazing React library
  • MongoDB - For the flexible NoSQL database
  • Tailwind CSS - For the utility-first CSS framework
  • Vite - For the lightning-fast build tool
  • Open Source Community - For inspiration and support

⭐ Star this repo if you find it helpful!

Made with ❀️ by Brijesh Patel

Back to Top

About

BookIt is a comprehensive travel experience booking platform that allows users to discover, book, and manage exciting travel experiences. From adventure activities to cultural tours, BookIt provides a seamless booking experience with real-time availability, promo code support, and secure user authentication.

Resources

Stars

Watchers

Forks

Languages