DEV Community

Cover image for I've built a Full Airline Booking System with Kivy
Bek Brace
Bek Brace

Posted on

I've built a Full Airline Booking System with Kivy


Building a Modern Airline Booking System with Kivy and SQLAlchemy

Introduction

Hey everyone, I’m Amir, and today I’m introducing an exciting project we’ll be building together: a modern airline booking system using Kivy and SQLAlchemy.
Demo Video -->
This project will provide a user-friendly interface for booking flights, selecting seats, and managing reservations. In today’s demo, I’ll walk you through the application, and in the next video, we’ll start coding it step by step.

Overview of the Application

The application, which I’ve named Bastet Skyway Airline Booking System, is inspired by the ancient Egyptian goddess Bastet. In Egyptian mythology, Bastet is a protector of households, and as an Egyptian, I love integrating our heritage into my projects.

Features of the Airline Booking System

  • View Available Flights: Users can browse a list of flights.
  • Seat Selection: Choose seats from economy, business, or first class.
  • QR Code Generation: A QR code is generated for each booking.
  • Email Confirmation: The system sends a booking confirmation email.
  • Database Management: Built using SQLAlchemy for handling reservations.

Application Structure

The project consists of several key files:

  • main.py – The main entry point for running the app.
  • models.py – Defines the database schema and ORM models.
  • reset_db.py – A script to reset or wipe the database.
  • ticket_utilities.py – Handles QR code generation and email confirmations.
  • airline_booking.kv – The UI design written in Kivy’s KV language.
  • flights.db – The SQLite database storing flight information.

Demonstration

When you run the application, you’re greeted with a homepage featuring the project’s logo, title, and two main options:

  • View Available Flights
  • My Bookings

If you select View Available Flights, you will see a list of flights (hardcoded for this demo, but later can be linked to a real-time API). Each flight has details such as departure time, ticket prices, and seat availability. Users can choose their class (Economy, Business, or First Class) and select a specific seat.

Upon confirming a booking, users provide their name and email. Once confirmed, the system generates a ticket with:

  • Passenger name
  • Flight details (origin, destination, date, seat number, class, and flight number)
  • A QR Code for check-in
  • A confirmation email sent to the user

The system ensures that booked seats cannot be selected again. If a user tries to book an already reserved seat, they will need to choose a different one.

Email Confirmation

The application sends an HTML-formatted email containing the flight details and QR code. The email appears under Bastet Skyway Flight Booking Confirmation with a unique confirmation number.

What’s Next?

In the next video, we’ll dive into the coding process, implementing the UI, database, and backend logic. This project requires intermediate Python knowledge, but don’t worry if you’re new to Kivy – it’s very beginner-friendly!

Stay tuned, and let’s build something amazing together!


Top comments (0)