BookIt is a full-stack experience booking platform that allows users to browse experiences, view available slots, apply promo codes, and confirm bookings. It's built with Next.js, Express.js, and Prisma, offering a seamless and responsive experience.
- 🏝️ Browse and explore curated experiences
- 🗓️ View available slots by date and time
- 💰 Apply promo codes for discounts
- 📦 Real-time slot availability updates
- 🔐 Secure booking flow
Frontend: Next.js, TypeScript, Tailwind CSS
Backend: Express.js, Prisma, Node.js
Database: PostgreSQL
Deployment: Vercel (Frontend) + Render / Railway (Backend)
git clone https://github.com/Mohfazam/BookIt.git
cd BookItcd backend
npm installCreate a .env file in the backend folder:
DATABASE_URL="postgresql://<username>:<password>@localhost:5432/bookit"Generate Prisma client and start the server:
npx prisma generate
npm run devcd ../frontend
npm install
npm run devThe frontend will run on http://localhost:3000
BookIt/
├── backend/
│ ├── prisma/
│ ├── src/
│ │ ├── routes/
│ │ └── index.ts
│ ├── package.json
│ └── .env
│
└── frontend/
├── src/
│ ├── app/
│ ├── components/
│ └── lib/
├── package.json
└── .env.local
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/public/experiences |
Fetch all experiences |
| GET | /api/public/experiences/:id |
Fetch single experience details |
| GET | /api/public/promos/:code |
Validate a promo code |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/book |
Create a booking |
- Each promo has a code (
SAVE10,FLAT100) - Can be percentage-based or flat value
- Automatically checks validity and status before applying
Mohammed Sarwar Khan
- Frontend: Vercel → https://bookit.vercel.app
- Backend: Vercel
| Method | Endpoint | Description | Access |
|---|---|---|---|
| GET | /api/experiences |
Fetch all experiences (title, image, description, price, etc.) | Public |
| GET | /api/experiences/:id |
Fetch details of a single experience (with available slots) | Public |
| POST | /api/bookings |
Create a new booking (with user details, selected slot, and promo code if applicable) | Public |
| POST | /api/promo/validate |
Validate a promo code (e.g., SAVE10, FLAT100) |
Public |
| Method | Endpoint | Description | Access |
|---|---|---|---|
| POST | /api/dev/experiences |
Add a new experience with title, image, description, price, location, etc. | Developer Only - ✅ |
| POST | /api/dev/slots |
Add available date and time slots for a specific experience | Developer Only |
| POST | /api/dev/promos |
Add or update promo codes (type: percentage or flat discount) | Developer Only |