A full-stack web application to search, book, and manage flight tickets, built using ASP.NET Core Web API + MVC + SQL Server.
- ๐ Secure user authentication system
- ๐ฅ Role-based access control (User & Admin)
โ๏ธ Real-time flight booking system- ๐ Automatic ticket generation
- ๐ Admin dashboard for flight & booking management
- ๐ Dynamic seat availability tracking
- ๐งฉ Clean architecture (MVC + Web API separation)
- ASP.NET Core Web API (.NET 8)
- Entity Framework Core
- SQL Server
- ASP.NET Core MVC (Razor Views)
- Bootstrap 5
- HttpClient (API Integration)
- SQL Server
- MVC frontend communicates with Web API using HttpClient
- Web API handles business logic and database operations
- SQL Server stores user, flight, and booking data
Flow: User โ MVC โ Web API โ Database โ Response โ MVC โ UI
- Register & Login
- Search flights
- Filter flights (Source, Destination, Date)
- View flight details
- Book tickets
- View ticket confirmation
- View booking history
-
Login (role managed in database)
-
Manage flights:
- Add flights
- Edit flights
- Delete flights
-
View bookings for each flight
- Add new flights
- Edit flight details
- Delete flights
Flight includes:
- Flight Name
- Company
- Source โ Destination
- Departure & Arrival Time
- Business & Economy Pricing
- Seat Availability
- Select class (Economy / Business)
- Select number of seats
- Automatic price calculation
- Booking stored in database
- Ticket generated instantly
- Total Seats (fixed)
- Available Seats (dynamic)
Available Seats = Total Seats - Booked Seats
โ Automatically updates after booking โ Prevents overbooking
Users can view:
- Current bookings
- Past bookings
- Booking status
Search flights by:
- Flight Name
- Company
Filter flights by:
- Source
- Destination
- Date
- Responsive Bootstrap UI
- Role-based navigation
- Clean cards and tables
- Back navigation support
- Professional layout
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/Users/register | Register |
| POST | /api/Users/login | Login |
| GET | /api/Users/{id} | Get user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/Flights | Get all flights |
| POST | /api/Flights | Create flight |
| GET | /api/Flights/{id} | Get flight |
| PUT | /api/Flights/{id} | Update flight |
| DELETE | /api/Flights/{id} | Delete flight |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/Bookings | Create booking |
| GET | /api/Bookings | Get all bookings |
| GET | /api/Bookings/user/{userId} | User bookings |
| GET | /api/Bookings/flight/{flightId} | Flight bookings |
- UserId
- Name
- MobileNumber
- Password
- Role
- FlightId
- FlightName
- Company
- Source
- Destination
- DepartureTime
- ArrivalTime
- BusinessSeatsTotal
- EconomySeatsTotal
- BusinessSeatsAvailable
- EconomySeatsAvailable
- BusinessPrice
- EconomyPrice
- BookingId
- UserId
- FlightId
- ClassType
- SeatCount
- TotalPrice
- BookingDate
- Status
- Open
FlightBooking.API - Run project (F5)
API runs at:
https://localhost:7274
Swagger:
https://localhost:7274/swagger
- Open
FlightBooking.MVC - Run project (F5)
File:
Services/ApiService.cs
client.BaseAddress = new Uri("https://localhost:7274/api/");File: appsettings.json
"ConnectionStrings": {
"DefaultConnection": "Server=.;Database=FlightBookingDB;Trusted_Connection=True;"
}- Ensure API is running before MVC
- Check API Base URL
- Verify endpoints (
/api/...) - Check database connection
- Ensure migrations are applied
- JWT Authentication
- Online payment integration ๐ณ
- Email ticket confirmation ๐ง
- Flight cancellation & refund
- Advanced filtering (price, duration)
- Deployment on Azure
To build a scalable flight reservation system with real-time seat management, secure booking, and seamless user experience.
Dheetchana K Final Year CSE Student
โญ If you like this project, give it a star!







