An open API service indexing awesome lists of open source software.

https://github.com/mansoorcode/flight_booking_app


https://github.com/mansoorcode/flight_booking_app

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# โœˆ๏ธ FlyMate โ€“ Flight Booking App

A modern full-stack flight booking web application built using **React (Vite)** for frontend, **TailwindCSS** for styling, and **LocalStorage** for persistent booking/session data. This project simulates a booking system with features for both **users** and **admins**, including flight search, booking, payment simulation, session management, and more.

---

## ๐Ÿš€ Features

### ๐Ÿ‘ค User Panel

- ๐Ÿ” Search flights with source, destination, date, and filters
- ๐Ÿ“„ View detailed flight information and booking UI
- ๐Ÿงพ Fill in passenger details and simulate payment
- โœ… Booking confirmation modal with delay and redirect
- ๐Ÿ“‘ View all your bookings on the "My Bookings" page
- โณ Auto logout after 5 minutes of inactivity

### ๐Ÿ› ๏ธ Admin Panel

- โž• Add new flights to the system
- ๐Ÿ“‹ View list of bookings made by users
- ๐Ÿงฎ Flight and booking management using LocalStorage

---

## ๐Ÿงฐ Tech Stack

| Technology | Use Case |
| -------------------------- | -------------------------------------------------- |
| React (Vite) | Frontend framework |
| TailwindCSS | Styling |
| React Router | Page routing |
| Formik + Yup | Form validation |
| LocalStorage | Data persistence |
| UUID | Unique booking IDs |
| Custom Hooks + Context API | State sharing (e.g. selected flight, user session) |

---

## ๐Ÿ“‚ Project Structure

```
src/
โ”‚
โ”œโ”€โ”€ components/ # Shared components (modals, table, etc.)
โ”œโ”€โ”€ context/ # Context API for selected flight and auth
โ”œโ”€โ”€ layout/ # User and Admin layout components
โ”œโ”€โ”€ pages/ # Page views (Home, Booking, Payment, etc.)
โ”œโ”€โ”€ routes/ # Routes (Protected routes, App routes, Role base routes)
โ”œโ”€โ”€ types/ # TypeScript type definitions
โ”œโ”€โ”€ utils/ # Helper functions
โ””โ”€โ”€ App.tsx # Routing logic
```

---

## ๐Ÿงช How to Run Locally

```bash
# 1. Clone the repo
git clone https://github.com/ManSOorcode/Flight_Booking_App.git
cd flymate-booking-app

# 2. Install dependencies
npm install

# 3. Start development server
npm run dev
```

> Visit `http://localhost:5173` to use the app.

---

## ๐Ÿ“ Notes

- Admin can add flights via the Admin Panel UI.
- All flight and booking data is stored in `localStorage`, so a browser refresh does not lose state.
- Payment gateway is simulated (no real API calls).
- Session timeout will auto-logout the user after 5 minutes of inactivity.

---

## ๐Ÿ“ธ Screenshots

You can add screenshots of:
- User Home Page
- Booking Page UI
- Payment Modal
- Admin Dashboard
- My Bookings Page

---

## ๐Ÿ“Œ Future Enhancements (Ideas)

- Add IndexedDB support for more complex data persistence
- Implement real payment integration (e.g. Stripe)
- Enable authentication with JWT
- Add filters for flights (price, airline, layovers)
- Backend support using Express + MongoDB

---

## ๐Ÿ‘จโ€๐Ÿ’ป Author

> **[Mansoor Khan]** โ€“ Frontend Developer
> [GitHub](https://github.com/ManSOorcode) | [LinkedIn](https://www.linkedin.com/in/mansoor-khan-890311116)

## ๐Ÿ“ธ Screenshots of Project

### ๐Ÿ” Auth Pages




**Login Page**

**Signup Page**

---

### ๐Ÿ› ๏ธ Admin Pages

**Admin Dashboard**

**Manage Flights**

**View Bookings**

---

### ๐Ÿง‘โ€๐Ÿ’ผ User Pages

**User Home Page**

**Booking Page**

**My Booking Page**