background
Home / Portfolio / Angkasa E-Ticket API
PORTFOLIO

Angkasa E-Ticket API

Angkasa E-Ticket is Platform for purchasing plane ticket online. This API is used to retrieve the list of available flights, book the flight, transaction, check-in and many more.

#NodeJS  #ExpressJS  #OAuth2  

Angkasa E-Ticket API

Angkasa E-Ticket is Platform for purchasing plane ticket online. This API is used to retrieve the list of available flights, book the flight, transaction, check-in and many more.

Capstone Project - Backend JavaScript - Binar Academy Kampus Merdeka Batch 3

This project is one of Capstone Project from Binar Academy Kampus Merdeka.

About finishing the last challenge, the next challenge is to create a platform for purchasing plane ticket online. This platform is called Angkasa E-Ticket.

Source code : Backend / Frontend

Live Demo : Angkasa E-Ticket

Live Demo API Documentation : Angkasa E-Ticket API Documentation

Features

  • User Sign In & Sign Up
  • User Sign In with Google
  • Role, Assign Role to User
  • Airports, Integration search Airports with Port API
  • Airline
  • Benefits
  • Airplane
  • Flight, Flight Reschedule
  • Seat Class
  • Notification (in-app notification, email notification)
  • Transaction / Booking

Tech Stack

Installation

Clone the backend and frontend repository.

1git clone https://github.com/raprmdn/angkasa-api.git
bash

1git clone https://github.com/Frans701/angkasa-front-end.git
bash

Install the dependencies

1yarn install
bash

Copy the .env.example file to .env

1cp .env.example .env
bash

Configure the .env file

1NODE_ENV= 2 3PORT= 4 5DB_DATABASE= 6DB_USERNAME= 7DB_PASSWORD= 8DB_HOST= 9DB_DIALECT= 10DB_PORT= 11 12GOOGLE_CLIENT_ID= 13GOOGLE_CLIENT_SECRET= 14GOOGLE_REDIRECT_URI= 15GOOGLE_REFRESH_TOKEN= 16GOOGLE_EMAIL= 17 18JWT_SECRET_KEY= 19 20SENTRY_DSN=
dotenv

To get the GOOGLE_REFRESH_TOKEN, go to Google OAuth Playground and select the https://mail.google.com/ scope.

Click OAuth 2.0 Configuration icon in the top right corner and select Use your own OAuth credentials. Paste the Client ID and Client Secret that you copied before.

Then, click the Authorize APIs button and login with your Google account. After that, click the Exchange authorization code for tokens button. Copy the Refresh Token and paste it to the GOOGLE_REFRESH_TOKEN in .env file.

Make sure set the GOOGLE_EMAIL is the same email that you use to log in to Google OAuth Playground, so that the email that you use to log in to Google OAuth Playground is the same email that you use to send email.

To get the SENTRY_DSN, go to Sentry and create a new project. Copy the DSN and paste it to the SENTRY_DSN in .env file.

Create the database

1sequelize db:create
bash

Run the migration

1sequelize db:migrate
bash

Run the seed

1sequelize db:seed:all
bash

Run the server

1yarn dev
bash

API Documentation

You can see the API documentation in Angkasa E-Ticket API Documentation

In case, if the server is down, you can access the API Documentation locally in /documentation path.