The Flight Booking Service is a web application designed to facilitate the booking and management of flight tickets. It utilizes a robust backend built with Node.js and Sequelize to handle complex transactions and ensure data consistency.
- Flight Search: Users can search for flights based on their preferred dates, destinations, and number of passengers.
- Seat Selection: Allows passengers to choose their seats during the booking process.
- Booking Management: Users can view, modify, or cancel their bookings.
- Real-time Updates: Flight statuses and seat availability are updated in real-time.
- Automated Notifications: Automated notifications for flight changes and reminders through cron jobs.
- Backend: Node.js, Express
- Database: MySQL, Sequelize ORM
- Scheduling: node-cron for handling scheduled tasks like notifications and reminders.
- Message Queue: RabbitMQ (amqplib) for asynchronous notification handling
- Node.js
- MySQL
- RabbitMQ
- npm
This service requires environment variables to be configured. Copy .env.example to .env and update the values:
cp .env.example .envPORT- Server port (default: 3001)DB_HOST- Database host addressDB_PORT- Database port (default: 3306)DB_USER- Database usernameDB_PASSWORD- Database passwordDB_NAME- Database name (Flights)DB_DIALECT- Database dialect (mysql)NODE_ENV- Environment (development/production)CORS_ORIGIN- Allowed CORS origins (default: *)FLIGHT_SERVICE- Flight service URL for integrationRECEPIENT_EMAIL- Default recipient email for notificationsRABBITMQ_URL- RabbitMQ connection URL (default: amqp://localhost:5672)RABBITMQ_QUEUE- Queue name for notifications (default: noti-queue)
The service provides a health check endpoint at /health for monitoring and orchestration purposes.