An advanced backend upgrade focusing on High Availability, Data Integrity, and DevOps Automation.
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.
- 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).
- Integrated Redis to cache frequently accessed data (e.g., Flight Search Results).
- Reduced database read operations and improved API response latency by ~40%.
- 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.
- Database: PostgreSQL (Managed by Neon.tech)
- ORM: Prisma
- Cache: Redis (Managed by Upstash)
- DevOps: GitHub Actions (CI), Render (CD)
-
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)
-
Install & Generate Prisma
cd server npm install npx prisma generate -
Configure Environment Create a
.envfile inserver/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"
-
Start Backend
npm run dev
- Push code to
mainbranch. - GitHub Action triggers:
build-checkjob runsnpm installandprisma generate. - If tests pass, Deploy Hook is sent to Render.
- Live site updates automatically at:
https://airline-backend-phase2.onrender.com