Skip to content

Airport API Service: system for tracking flights from airports across the whole globe.

Notifications You must be signed in to change notification settings

u123dev/airport-api-service

Repository files navigation

Airport API Service Project

System for managing airplanes, flights, crew, tickets orders and airports using DRF.

It allows to easy book tickets for trips using airplanes.

This system is for tracking flights from airports across the whole globe.


Database Structure:

DB Schema

Features:

  • JWT Authentication

  • Admin panel: /admin/

  • Documentation at: /api/schema/swagger-ui/

  • Managing Orders and Tickets for flights

  • Creating & managing Airports with Cities, Countries

  • Creating & managing Airplanes with Airplane Types & with images

  • Creating & managing Crew with photo images

  • Creating Routes with Airports

  • Creating Flights with routes, crews, airplanes

  • Filtering Routes and Flights by source and destination & date ranges

  • Administrators have access to CRUD operations for all entities.

  • Users can create Orders with Tickets for Flights & take a list of filtering flights.


Installation using GitHub

System requirements:

  • Python 3.12+ (need to be installed)
  • Django 5.+ & Django Rest Framework 3.+ (will be install automatically )
  1. Clone GitHub repository:
https://github.com/u123dev/airport-api-service.git
  • You can get the link by clicking the Clone or download button in your repo
  1. Open the project folder in your IDE

or

cd airport-api-service
  1. Make virtual environment and install requirements in it:
py -m venv venv
venv\Scripts\activate (on Windows)
# or
source venv/bin/activate (on macOS)
pip install -r requirements.txt
  1. DATABASE:
  • a) You need to Install PostgreSQL

Create environment variables:

set POSTGRES_DB = <db name>
set POSTGRES_USER = <db username>
set POSTGRES_PASSWORD = <db user password>
set POSTGRES_HOST = <db host>
set POSTGRES_PORT = <db port>

or

  • b) You can use built-in SQlite by default
  1. Migrate & make database:
py manage.py migrate
  1. Load demo data from fixture:
py manage.py loaddata data.json
  1. After loading demo data you can use test user:
  1. Run project:
py manage.py runserver
  1. Access Airplane API Service in your browser: http://127.0.0.1:8000/api/airport/

Run with Docker

System requirements:

  • Docker Desktop 4.+

Run project:

docker-compose up --build

Getting access

  1. Test admin user:
  1. Register new user:
  • api/user/register/
  1. Obtain pair an access authentication & refresh tokens by sending a POST user credentials - email(as login) & password:
  • api/user/token/
  1. Header to access endpoints:
  • Authorization: Bearer < Access Token >

Documentation

Swagger via:

  • api/schema/swagger-ui/

Redoc via:

  • api/doc/redoc/

Demo

API

API

Contact

Feel free to contact: [email protected]

About

Airport API Service: system for tracking flights from airports across the whole globe.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published