Indigo Backend Application provides real-time updates on flight statuses and sends notifications to users about any changes.
- Node.js
- Express
- MongoDB
- Nodemailer
- D7 SMS API
- Firebase sdk
- RabbitMQ
- Nodejs.
- RabbitMQ server
- Npm / Yarn package manager
- Clone the Repository:
git clone https://github.com/Indigo-Task/indigo_backend.git
- Install Dependencies:
npm install
- Configure Firebase:
Add your configuration to a .env file in the root directory. Example .env file:
DATABASE = Your_DB_URI
PORT = PORT
MONGODB_PASSWORD = your_mongodb_passwd
NODE_ENV = develpoment or production
- Start the Development Server:
npm start
The application will be available at http://localhost:3000.
The Indigo App is designed to provide real-time flight information and notifications. Users can track flights, receive updates on flight status changes, and manage their notification preferences with ease.
- Real-Time Flight Updates: Get up-to-date information on flight status, including delays, cancellations, and gate changes.
- Notification System: Receive notifications via email, SMS, or push notifications.
- Flight Search: Search for flights by flight number, airline, or route.
- Comprehensive Flight Details: Access detailed information such as departure/arrival times, terminals, and gate information.
- Real-Time Updates: For real-time updates, the application uses long polling. When a user makes an API call, the server checks if the data has changed since the last request. If the data is unchanged, the server waits for updates before sending a response.
- Notifications:
Application uses a rabbitmq as the message broker, it sends the message through email or SMS (You have to choose) and Push notification to the end user.
To get notifications the user has to search the flights on the client app and click on the bell icon to start receiving notifications. Now whenever there is a change in the flight status the notification is sent to the user.
To get a notification subscribe to a particular flight.
For changing the flight status:
endpoint => "/api/v1/flights:id"
Example:
endpoint => http://localhost:3000/api/v1/flights/66a38342ea6bc3ddbced53aa
Request Body => {
"arrivalGate": "E3",
"departureGate": "C2"
}
Response: {
"status": "success",
"data": {
"updatedFlight": {
"_id": "66a38342ea6bc3ddbced53aa",
"flightId": "6E 2341",
"airline": "Indigo",
"status": "On Time",
"departureGate": "C2",
"arrivalGate": "E3",
"scheduledDeparture": "2024-07-28T14:00:00.000Z",
"scheduledArrival": "2024-07-26T18:00:00.000Z",
"actualDeparture": null,
"actualArrival": null,
"__v": 0
}
}
}