How aditya-karn234/air-altura works
Air Altura is a full-stack airline booking system. A traveler searches flights, selects a flight and cabin, creates a seat-reserving booking, pays within a 10-minute window, and can review or cancel bookings; successful payment triggers a confirmation email. The frontend routes and search widget, booking controller/service, and flight search/controller excerpts support key steps. The README documents gateway-wide API routing, expiry, idempotency, seat restoration, and notifications. Many service routes and integrations are unsampled, so their links are shown only where documented.
Main entry points: App.jsx React app routes · api.js Frontend API client · booking-service.js Booking orchestration · SearchPage.jsx Flight search UI
Components 31
Traveler experience
- React app routes
Air-Altura-Frontend/src/App.jsx - Flight search UI
Air-Altura-Frontend/src/pages/SearchPage.jsx - Search form
Air-Altura-Frontend/src/components/SearchWidget.jsx - Results and details
Air-Altura-Frontend/src/pages/ResultsPage.jsx - Booking and payment
Air-Altura-Frontend/src/pages/BookingPage.jsx - Booking history
Air-Altura-Frontend/src/pages/BookingsPage.jsx - Sign-in and account
Air-Altura-Frontend/src/pages/AuthPage.jsx - Frontend API client
Air-Altura-Frontend/src/api.js
API gateway
- Public API gateway
API-Gateway/src/index.js - Auth routes
API-Gateway/src/routes/v1/auth-router.js - Registration and login
API-Gateway/src/controllers/auth-controller.js - JWT authentication
API-Gateway/src/middlewares/auth-middleware.js - User records
API-Gateway/src/models/user.js
Flight inventory
- Flight API
Flights-Service/src/routes/v1/flight-routes.js - Flight handlers
Flights-Service/src/controllers/flight-controller.js - Search and seat logic
Flights-Service/src/services/flight-service.js - Flight data access
Flights-Service/src/repositories/flight-repository.js - Flight inventory database
Flights-Service/src/models/flight.js
Booking lifecycle
- Booking endpoints
Booking-service/src/routes/v1/booking.js - Booking handlers
Booking-service/src/controllers/booking-controller.js - Booking orchestration
Booking-service/src/services/booking-service.js - Booking data access
Booking-service/src/repositories/booking-repository.js - Booking database
Booking-service/src/models/booking.js - Payment idempotency
Booking-service/src/middlewares/idempotency.js - Booking expiry janitor
Booking-service/src/utils/common/cron-jobs.js
Async notifications
- RabbitMQ events
- Seat restoration consumer
Flights-Service/src/subscribers/seat-restoration.js - Confirmation email consumer
Notifications-Service/src/subscribers/booking-confirmed.js
Other components
- Traveler
- Redis
- Email delivery
Connections 41
- Traveler → React app routes: uses
README.md - React app routes → Flight search UI: routes to
Air-Altura-Frontend/src/App.jsx - React app routes → Results and details: routes to
Air-Altura-Frontend/src/App.jsx - React app routes → Booking and payment: routes to
Air-Altura-Frontend/src/App.jsx - React app routes → Booking history: routes to
Air-Altura-Frontend/src/App.jsx - React app routes → Sign-in and account: routes to
Air-Altura-Frontend/src/App.jsx - Flight search UI → Search form: renders
Air-Altura-Frontend/src/pages/SearchPage.jsx - Flight search UI → Results and details: navigates to
Air-Altura-Frontend/src/pages/SearchPage.jsx - Flight search UI → Frontend API client: requests flights
- Results and details → Frontend API client: requests flights
- Booking and payment → Frontend API client: sends booking
- Booking history → Frontend API client: requests bookings
- Sign-in and account → Frontend API client: sends credentials
Air-Altura-Frontend/src/pages/AuthPage.jsx - Frontend API client → Public API gateway: sends API traffic
README.md - Public API gateway → Auth routes: mounts routes
- Auth routes → Registration and login: dispatches
API-Gateway/src/routes/v1/auth-router.js - Auth routes → JWT authentication: authenticates logout
API-Gateway/src/routes/v1/auth-router.js - Registration and login → User records: reads and writes
API-Gateway/src/controllers/auth-controller.js - Registration and login → Redis: blacklists token
API-Gateway/src/controllers/auth-controller.js - Public API gateway → Booking endpoints: forwards booking API
README.md - Public API gateway → Flight API: forwards flight API
README.md - Flight API → Flight handlers: dispatches
Flights-Service/src/routes/v1/flight-routes.js - Flight handlers → Search and seat logic: calls
Flights-Service/src/controllers/flight-controller.js - Search and seat logic → Flight data access: queries
Flights-Service/src/services/flight-service.js - Flight data access → Flight inventory database: reads and writes
Flights-Service/src/repositories/flight-repository.js - Search and seat logic → Redis: caches searches
Flights-Service/src/services/flight-service.js - Booking endpoints → Booking handlers: dispatches
- Booking handlers → Booking orchestration: calls
Booking-service/src/controllers/booking-controller.js - Booking orchestration → Booking data access: accesses bookings
Booking-service/src/services/booking-service.js - Booking data access → Booking database: reads and writes
Booking-service/src/repositories/booking-repository.js - Booking orchestration → Flight API: reserves seats by HTTP
Booking-service/src/services/booking-service.js - Booking handlers → Payment idempotency: protects payment
- Payment idempotency → Redis: claims payment key
README.md - Booking expiry janitor → Booking database: expires bookings
- Booking orchestration → RabbitMQ events: publishes restoration
Booking-service/src/services/booking-service.js - Booking expiry janitor → RabbitMQ events: publishes restoration
README.md - RabbitMQ events → Seat restoration consumer: delivers event
README.md - Seat restoration consumer → Search and seat logic: restores seats
README.md - Booking orchestration → RabbitMQ events: publishes confirmation
- RabbitMQ events → Confirmation email consumer: delivers event
README.md - Confirmation email consumer → Email delivery: sends email
README.md