Skip to content

Abdul-Rakib/Bookit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BOOKIT - Experience Booking Platform

A full-stack web application for discovering and booking unique experiences. Built with React 19, Node.js, Express 5, and MongoDB.


🌐 Live Demo

Deployed Link: bookit.gammerce.in

Test Credentials

Email: test@gmail.com
Password: 123456

πŸ“Έ Screenshots

Homepage

Dashboard Browse and search experiences with responsive design

Experience Details

IDE Detailed view with image gallery, time slots, and booking summary

Authentication

AUTH Secure login with email/password and Google OAuth 2.0


✨ Features

User Features

  • Browse and search experiences
  • User authentication (Email/Password & Google OAuth)
  • Mobile OTP verification
  • Apply promo codes for discounts

Technical Features

  • Fully responsive design (mobile-first)
  • Lazy loading images with skeleton loaders
  • JWT-based authentication
  • πŸ“¦ AWS S3 integration for file storage
  • 🎯 RESTful API architecture

πŸ› οΈ Tech Stack

Category Technology
Frontend React 19, Vite, Tailwind CSS
Backend Node.js, Express 5
Database MongoDB, Mongoose
Authentication JWT, Google OAuth 2.0, bcrypt
File Storage AWS S3

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18 or higher)
  • npm or yarn
  • MongoDB (local or MongoDB Atlas account)
  • Git

πŸš€ Installation & Setup

1. Clone the Repository

git clone https://github.com/Abdul-Rakib/Bookit.git
cd Bookit

2. Backend Setup

# Navigate to backend directory
cd backend

# Install dependencies
npm install

# Create .env file
touch .env

3. Configure Environment Variables

Create a .env file in the backend directory with the following variables:

# Server Configuration
PORT=5000
NODE_ENV=development

# Database
MONGO_URI=mongodb://localhost:27017/bookit
# Or use MongoDB Atlas:
# MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/bookit

# JWT Secret (generate a strong random string)
JWT_SECRET=your_jwt_secret_key_here

# Google OAuth 2.0
GOOGLE_CLIENT_ID=your_google_client_id_here

# CORS Origins (comma-separated)
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000

# SMS API (Optional - for OTP verification)
ONEAPI_SMS_API_KEY=your_sms_api_key_here

# AWS S3 Configuration (Optional - if using file uploads)
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=ap-south-1
AWS_S3_BUCKET=your_bucket_name

4. Frontend Setup

# Navigate to frontend directory (from project root)
cd frontend

# Install dependencies
npm install

5. Configure Frontend API URL

The frontend is configured to use a proxy in vite.config.js. If you need to change the backend URL, update the proxy configuration:

// frontend/vite.config.js
export default defineConfig({
  server: {
    proxy: {
      '/api': 'http://localhost:5000'  // Update if your backend runs on a different port
    }
  }
})

🎯 Running the Application

Development Mode

Option 1: Run Backend and Frontend Separately

Terminal 1 - Backend:

cd backend
npm run dev
# Server will run on http://localhost:5000

Terminal 2 - Frontend:

cd frontend
npm run dev
# App will run on http://localhost:5173

Option 2: Run Backend in Production Mode

cd backend
npm start

Production Build

# Build frontend
cd frontend
npm run build

# The built files will be in frontend/dist
# Backend will serve these static files in production mode

# Run backend in production
cd ../backend
NODE_ENV=production npm start

πŸ“ Project Structure

BOOKIT/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ controllers/       # Request handlers
β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   β”œβ”€β”€ booking.js
β”‚   β”‚   β”œβ”€β”€ experience.js
β”‚   β”‚   └── user.js
β”‚   β”œβ”€β”€ data/             # Sample/seed data
β”‚   β”‚   └── sampleData.js
β”‚   β”œβ”€β”€ middlewares/      # Custom middleware
β”‚   β”‚   └── auth.js
β”‚   β”œβ”€β”€ models/           # Mongoose schemas
β”‚   β”‚   β”œβ”€β”€ booking.js
β”‚   β”‚   β”œβ”€β”€ experience.js
β”‚   β”‚   β”œβ”€β”€ otp.js
β”‚   β”‚   β”œβ”€β”€ promoCode.js
β”‚   β”‚   └── user.js
β”‚   β”œβ”€β”€ routes/           # API routes
β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   β”œβ”€β”€ booking.js
β”‚   β”‚   β”œβ”€β”€ experience.js
β”‚   β”‚   β”œβ”€β”€ promo.js
β”‚   β”‚   └── user.js
β”‚   β”œβ”€β”€ utils/            # Utility functions
β”‚   β”‚   β”œβ”€β”€ s3Utils.js
β”‚   β”‚   └── smsUtils.js
β”‚   β”œβ”€β”€ .env              # Environment variables
β”‚   β”œβ”€β”€ package.json
β”‚   └── server.js         # Entry point
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ public/           # Static assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/       # Images, fonts, etc.
β”‚   β”‚   β”œβ”€β”€ components/   # Reusable components
β”‚   β”‚   β”‚   β”œβ”€β”€ navbar/
β”‚   β”‚   β”‚   └── profile/
β”‚   β”‚   β”œβ”€β”€ context/      # React Context
β”‚   β”‚   β”‚   └── globalContext.jsx
β”‚   β”‚   β”œβ”€β”€ hooks/        # Custom hooks
β”‚   β”‚   β”‚   β”œβ”€β”€ useAuth.jsx
β”‚   β”‚   β”‚   └── useLogin.jsx
β”‚   β”‚   β”œβ”€β”€ pages/        # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ Auth/
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”‚   β”œβ”€β”€ experiences/
β”‚   β”‚   β”‚   └── footer/
β”‚   β”‚   β”œβ”€β”€ routes/       # Route protection
β”‚   β”‚   β”‚   └── ProtectedRoutes.jsx
β”‚   β”‚   β”œβ”€β”€ services/     # API services
β”‚   β”‚   β”‚   └── api.js
β”‚   β”‚   β”œβ”€β”€ utils/        # Utility functions
β”‚   β”‚   β”œβ”€β”€ App.jsx       # Main app component
β”‚   β”‚   β”œβ”€β”€ main.jsx      # Entry point
β”‚   β”‚   └── index.css     # Global styles
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.js
β”‚
β”œβ”€β”€ screenshots/          # Application screenshots
└── README.md

πŸ”‘ Key API Endpoints

  • POST /api/auth/google - Google OAuth login
  • POST /api/auth/send-otp - Send OTP for phone verification
  • POST /api/auth/verify-otp - Verify OTP
  • POST /api/auth/logout - User logout
  • GET /experiences - Get all experiences (with search/filter)
  • GET /experiences/:id - Get single experience details
  • POST /bookings - Create a new booking
  • GET /bookings/user/:userId - Get user's bookings
  • POST /promo/validate - Validate promo code

πŸ§ͺ Testing

Test the Application

  1. Start both backend and frontend servers
  2. Open browser to http://localhost:5173
  3. Use test credentials or sign up with Google
  4. Browse experiences and make a test booking

License

ISC


Author

Abdul Rakib

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages