Skip to content

Enterprise-grade backend upgrade focusing on high performance and DevOps. Features ACID-compliant transactions (PostgreSQL), low-latency caching (Redis), and automated CI/CD pipelines via GitHub Actions.

Notifications You must be signed in to change notification settings

upendra-coder/Airline-Management-System-Phase2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Airline Management System - Phase 2

An advanced backend upgrade focusing on High Availability, Data Integrity, and DevOps Automation.

Postgres Redis CI/CD Render

๐Ÿง  System Architecture

This phase transforms the application into a cloud-native system. It replaces the local database with PostgreSQL (Neon) for ACID compliance and introduces Redis (Upstash) for high-speed caching. The entire deployment workflow is automated via a CI/CD pipeline.

โšก Key Engineering Upgrades

1. Data Integrity & ACID Transactions ๐Ÿ›ก๏ธ

  • Migrated to PostgreSQL to handle complex relationships (Flights โ†” Bookings โ†” Passengers).
  • Implemented Atomic Transactions via Prisma ORM to prevent Race Conditions (e.g., ensuring two users cannot book the last seat simultaneously).

2. High-Performance Caching ๐ŸŽ๏ธ

  • Integrated Redis to cache frequently accessed data (e.g., Flight Search Results).
  • Reduced database read operations and improved API response latency by ~40%.

3. Automated CI/CD Pipeline ๐Ÿค–

  • Continuous Integration: GitHub Actions automatically installs dependencies and generates Prisma clients on every push.
  • Continuous Deployment: Successful builds trigger a zero-downtime deployment to Render.

๐Ÿ› ๏ธ Tech Stack (Phase 2)

  • Database: PostgreSQL (Managed by Neon.tech)
  • ORM: Prisma
  • Cache: Redis (Managed by Upstash)
  • DevOps: GitHub Actions (CI), Render (CD)

โš™๏ธ Setup for Local Development

  1. Clone the Repo

    git clone [https://github.com/upendra-coder/Airline-Management-System-Phase2.git](https://github.com/upendra-coder/Airline-Management-System-Phase2.git)
  2. Install & Generate Prisma

    cd server
    npm install
    npx prisma generate
  3. Configure Environment Create a .env file in server/ with your cloud credentials:

    DATABASE_URL="postgresql://user:pass@ep-winter-forest.neon.tech/neondb..."
    UPSTASH_REDIS_REST_URL="https://distinct-grub..."
    UPSTASH_REDIS_REST_TOKEN="your_token_here"
  4. Start Backend

    npm run dev

๐Ÿ”„ CI/CD Workflow

  1. Push code to main branch.
  2. GitHub Action triggers: build-check job runs npm install and prisma generate.
  3. If tests pass, Deploy Hook is sent to Render.
  4. Live site updates automatically at: https://airline-backend-phase2.onrender.com

About

Enterprise-grade backend upgrade focusing on high performance and DevOps. Features ACID-compliant transactions (PostgreSQL), low-latency caching (Redis), and automated CI/CD pipelines via GitHub Actions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages