Giter VIP home page Giter VIP logo

bloodonate's Introduction

BlooDonate

Installation

git clone https://github.com/kaziMashry/BlooDonate.git
npm install
npm start

Setup

  • Add .env file
  • Add these variables into .env file:
    • URI(mongoDb uri)
    • PORT
    • JWT_EXPIRE_MINUTE
    • JWT_SECRET

What is BlooDonate repository?

BlooDonate repository contains the BE code. Basically here I created some API by which one can regiseter as a blood donor by signing in. On the other hand, one can find-

  1. all the blood donors of a certain area(of any blood group),
  2. all the blood doner of a particular blood group(of any area),
  3. all the blood donor of a certain area with a particular blood group

Technology used

  • Node Js
  • Express Js
  • MongoDB
  • Mongoose
  • JWT

Authentication

There is not much use of authentication in this app. Only one route is protected/authorized. I have developed a custom authentication system with JWT token. Here you'll be given a JWT token and all your requests will be take place based on that token. As soon as you logged out from the application, the token will be blacklisted and no one can use that ever again.

API list

  1. /user/signin (POST)
    This route is to signin as an user.
    reqBody = {
        "name": <name>,
        "email": <email>,
        "password": <password>
    }
  2. /user/login (GET)
    This route is to login as an user.
    reqBody = {
        "email": <email>,
        "password": <password>
    }
  3. /user/logout (POST)
    This route is to logout as an user.
  4. /donor/register (POST)
    This route is to register as a blood donor. This is the only protected route where user needs to be logged in to call this API.
    reqBody = {
        "mobile": <mobile number>,
        "bloodGroup": <blood group>,
        "area": [<list of areas where (s)he is able to donate blood>]
    }
  5. /donor/donorArea (GET)
    This route will bring all the donor of a particular area
    reqBody = {
        "area": <name of the area where blood is required>
    }
  6. /donor/donorBloodGroup (GET)
    This route will list all the donor of a particular blood group of all regions
    reqBody = {
        "bloodGroup": <required blood group>
    }
  7. /donor/donorBloodGroupArea (GET)
    This route will list all the donor of a particular blood group of a particular area
    reqBody = {
        "area": <name of the area where blood is required>,
        "bloodGroup": <required blood group>
    }

Resume: [https://drive.google.com/file/d/16hc-Pd4QrOeXGg8khFc2sq3RYKZD833D/view]

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.