Giter VIP home page Giter VIP logo

flysimple's Introduction

FlySimple - A flight tariff tracking website

This is an Express.js application that allows users to create accounts, login, book flights, and sign out. The application uses JWT for user authentication and password hashing for enhanced security.

Features

  • User registration and login with JWT authentication --> JWT
  • Password hashing for secure storage of user credentials using bcrypt --> bcrypt
  • Search and view available flights between source and destination

Prerequisites

  • Node.js v14.15.0 or higher
  • NPM v6.14.8 or higher
  • MongoDB v4.4 or higher

Installation

Clone the repo

git clone https://github.com/prithidevghosh/FlySimple.git

Install the required packages

cd Backend
npm install

Start the server locally

node index.js

Configuration

The application requires a MongoDB instance to be set up. You can configure the database connection by setting the following environment variables:

DATABASE_URI = "URI of your mongoDB instance"
JWT_SECRET_KEY ="your own JWT secret key",
SESSION_SECRET_KEY ="your own key to encrypt the session information"

You can set these environment variables in a .env file in the root directory of the application.

API Endpoints

Base URL
https://fly-simple.vercel.app
Endpoint Name Method Purpose
/api/user/create POST Create a new user
/api/user/create-session POST Create a session for user / Logging In User
/api/user/delete-session POST Deleting session for user / Signing Out User
/api/flights/find POST Find flights between two airports

Test the APIs using any tool like Postman

flysimple's People

Contributors

prithidevghosh avatar vijay-kumar-yadav avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.