Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INDIGO BACKEND

ABOUT

Indigo Backend Application provides real-time updates on flight statuses and sends notifications to users about any changes.

TOOLS AND TECH STACK

  1. Node.js
  2. Express
  3. MongoDB
  4. Nodemailer
  5. D7 SMS API
  6. Firebase sdk
  7. RabbitMQ

REQUIREMENTS

  1. Nodejs.
  2. RabbitMQ server
  3. Npm / Yarn package manager

Installation

  1. Clone the Repository:
git clone https://github.com/Indigo-Task/indigo_backend.git
  1. Install Dependencies:
npm install
  1. 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
  1. Start the Development Server:
npm start

The application will be available at http://localhost:3000.

DESCRIPTION

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.

Key Features

  1. Real-Time Flight Updates: Get up-to-date information on flight status, including delays, cancellations, and gate changes.
  2. Notification System: Receive notifications via email, SMS, or push notifications.
  3. Flight Search: Search for flights by flight number, airline, or route.
  4. Comprehensive Flight Details: Access detailed information such as departure/arrival times, terminals, and gate information.

USAGE

  1. 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.
  2. 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.

Example

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
        }
    }
}

API ENDPOINT

Run In Postman

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages