A modern, full-stack travel booking platform built with Next.js 14, TypeScript, and Firebase. Features hotel bookings with room selection, flight reservations, and car rentals - all with a beautiful, responsive UI inspired by Booking.com.
- Room Selection Table - Booking.com-style room picker with multiple room types
- Dynamic Pricing - Prices update based on nights and room selection
- Instant Booking - Skip approval, proceed directly to payment
- 7 Room Types - Standard, Superior, Deluxe, Twin, Family Suite, Executive, Presidential
- Flight Search - Filter by origin, destination, cabin class
- Ticket-style Cards - Beautiful horizontal flight cards
- Instant Confirmation - Book and pay immediately
- Multiple Categories - Economy, Compact, SUV, Luxury, Van
- Detailed Specs - Seats, transmission, fuel type, mileage
- Insurance Options - Clear display of included coverage
| Role | Capabilities |
|---|---|
| Traveler | Search, book, pay, view trips |
| Owner | List properties, manage bookings |
| Admin | Approve listings, manage users, view all bookings |
- Instant Book (Hotels, Flights, Cars) β Payment β Confirmed
- Request to Book (Private Properties) β Owner Approval β Payment β Confirmed
- Node.js 18+
- npm or yarn
- Firebase project
-
Clone the repository
git clone https://github.com/OMZaky/Main_Tripzy.git cd Main_Tripzy -
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile in the root directory:NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
-
Run the development server
npm run dev
-
Open in browser
http://localhost:3000
tripzy/
βββ app/ # Next.js App Router pages
β βββ page.tsx # Homepage
β βββ search/ # Search results page
β βββ stays/[id]/ # Hotel detail page
β βββ flights/[id]/ # Flight detail page
β βββ cars/[id]/ # Car detail page
β βββ checkout/[id]/ # Payment checkout
β βββ trips/ # User bookings
β βββ dashboard/ # Owner dashboard
β βββ admin/ # Admin portal
β βββ login/ # Authentication
βββ components/ # Reusable components
β βββ property/ # Property-specific components
β β βββ RoomTable.tsx # Room selection table
β βββ Navbar.tsx
β βββ Footer.tsx
β βββ Toast.tsx
βββ lib/ # Utilities and services
β βββ data/ # Data generators
β β βββ generators.ts # Hotel/Flight/Car generators
β β βββ constants.ts # Static data
β βββ firebase.ts # Firebase configuration
β βββ bookingService.ts # Booking CRUD operations
β βββ adminService.ts # Admin operations
β βββ mockData.ts # Generated mock data
βββ hooks/ # Custom React hooks
β βββ useAuthStore.ts # Zustand auth store
βββ types/ # TypeScript interfaces
β βββ index.ts # All type definitions
βββ public/ # Static assets
| Category | Technology |
|---|---|
| Framework | Next.js 14 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS |
| State | Zustand |
| Auth | Firebase Authentication |
| Database | Firebase Firestore |
| Icons | Lucide React |
- Go to Firebase Console
- Create a new project
- Enable Authentication with Google Sign-in
- Create a Firestore Database
- Copy your config to
.env.local
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
match /bookings/{bookingId} {
allow read, write: if request.auth != null;
}
}
}| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
Booking.com-style room selection with:
- Room type details (name, bed type, size)
- Capacity icons
- Per-night and total pricing
- Quantity dropdown (limited by availability)
- Sticky footer with selection summary
Sidebar booking form with:
- Date pickers
- Guest counter
- Price breakdown
- Instant Book button
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
OMZaky
- GitHub: @OMZaky
- Design inspiration from Booking.com
- Icons by Lucide
- UI components styled with Tailwind CSS