Git Product home page Git Product logo

week-10-alyuza's Introduction

Week 10 Assignment

Hi I'am Alyuza Satrio Prayogo, this is my week 10 assignment. The assignment is built using Node.js and Express.js, utilizing MongoDB for database operations and an OpenAPI specification for defining the API endpoints.

Functionality:

User Registration & Login: The application allows users to register with two distinct roles: 'maker' and 'approver'. Users can choose their role during registration for login.

Transfer List Retrieval: Users, once logged in, can retrieve a list of all transfers.

Transfer Creation: Authenticated users, particularly those with the 'maker' & 'approver' role, can create new transfer requests.

Transfer Approval/Rejection: Users with the 'approver' role have the ability to review the pending transfers and either approve or reject them.

Tools & Ingredients

  • Node.js & Express.js
  • Swagger UI
  • Postman
  • MongoDB

Features

  • Authentication
    • Register
    • Login to get JsonWebToken for authorization
  • Transfer
    • Create a transfer (Role: all users)
    • List all transfer history (Role: all users)
    • Update transfer status [Approve / Reject] (Role: Approver)

Available Account

{
    "username" : "yuza.user",
    "password" : "yuza1234",
    "role" : "maker"
}
{
  "username": "yuza.approver",
  "password": "yuza1234"
  "role": "approver"
}

API Endpoints

Name HTTP Method Endpoint
Register User POST /auth/register
Login User POST /auth/login
List All Transfer GET /transfers/
Create Transfer POST /transfers/money
Update Transfer Status by ID PATCH /transfers/{transferId}

MongoDB User List

mongoDB

MongoDB Transfer List

mongoDB

Swagger UI

swagger UI

OpenAPI Documentation & Router

openAPI documentation

Deployment

Deployment link here https://courageous-hen-houndstooth.cyclic.cloud/api-docs

Contact Person

Linkedin Badge Youtube Badge Instagram Badge

week-10-alyuza's People

Contributors

alyuza avatar

Watchers

Alvian Zachry Faturrahman 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.