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
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.
- π 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
- View all available travel experiences
- Filter by category, location, and price
- See detailed information including highlights and inclusions
- Real-time availability status
- Select from available time slots
- Adjust quantity based on availability
- Apply promo codes for discounts
- Instant booking confirmation with unique reference number
- Secure registration and login
- Auto-filled checkout forms for logged-in users
- View booking history
- Cancel bookings with automatic slot restoration
- Clear price breakdown (subtotal, taxes, discounts)
- Promo code validation with instant feedback
- Secure payment flow
- Booking confirmation page
- Create percentage or fixed-amount discounts
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] β β
β βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Demo Account:
- Email: demo@gmail.com
- Password: demo123
Available Promo Codes:
SAVE10- 10% offSAVE20- 20% offFLAT50- βΉ50 offFLAT100- βΉ100 off
- 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
- 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
- ts-node-dev - TypeScript development
- ESLint - Code linting
- Prettier - Code formatting
- Git - Version control
Before you begin, ensure you have the following installed:
- Node.js (v16 or higher) - Download
- MongoDB (v5 or higher) - Download
- npm or yarn - Comes with Node.js
- Git - Download
git clone https://github.com/yourusername/bookit.git
cd bookit# 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 devThe backend server will start on http://localhost:5000
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 devThe frontend will start on http://localhost:3000
Open your browser and navigate to:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000/api
- Health Check: http://localhost:5000/health
- Click "Login" in the navigation bar
- Use demo credentials:
- Email: demo@gmail.com
- Password: demo123
- 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
- View all available experiences on the home page
- Click on any experience card to see details
- 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
- 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)
http://localhost:5000/api
POST /auth/register
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com",
"password": "password123"
}POST /auth/login
Content-Type: application/json
{
"email": "john@example.com",
"password": "password123"
}GET /experiencesGET /experiences/:idPOST /bookings
Content-Type: application/json
{
"experienceId": "507f1f77bcf86cd799439011",
"slotId": "507f1f77bcf86cd799439012",
"userName": "John Doe",
"userEmail": "john@example.com",
"promoCode": "SAVE10"
}GET /bookings?email=john@example.comPATCH /bookings/:id/cancelPOST /promo/validate
Content-Type: application/json
{
"code": "SAVE10",
"originalPrice": 2500
}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
# Server Configuration
PORT=5000
# Database
MONGODB_URI=mongodb://localhost:27017/bookit
# CORS
CORS_ORIGIN=http://localhost:3000# API Configuration
VITE_API_URL=http://localhost:5000/api- 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
# Backend tests (when implemented)
cd server
npm test
# Frontend tests (when implemented)
cd client
npm test- Frontend: Vercel
- Backend: Render
- Database: MongoDB Atlas
- Update
MONGODB_URIto your production database - Update
CORS_ORIGINto your production frontend URL - Update
VITE_API_URLto your production backend URL - Set
NODE_ENV=production
- β 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
- 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
- Font Family: Inter, system-ui, sans-serif
- Headings: Bold, 24-32px
- Body: Regular, 14-16px
- Small: Regular, 12-14px
- 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
- 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
- AI Recommendations - Personalized experience suggestions
- Chatbot - AI-powered customer support
- Predictive Analytics - Forecast demand and trends
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- 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
Your Name
- GitHub: @brijeshpatel49
- LinkedIn: Brijesh Patel
- Email: brijeshp3349@gmail.com
- 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