Skip to content

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

 
 
 

Contributors

Languages