GithubHelp home page GithubHelp logo

dctacademy / billing-app Goto Github PK

View Code? Open in Web Editor NEW
8.0 6.0 9.0 503 KB

In this repo, the backend for a billing application has been setup. This is done to help the students who are learning front end development either React / Angular / Vue to build an application to test out their skills.

JavaScript 100.00%
backend-api backend-server node hackathon-project

billing-app's Introduction

Billing App

In this repo, the backend for a billing application has been setup. This is done to help the students who are learning front end development either React / Angular / Vue to build an application to test out their skills.

The modules are as follows

  1. User
  2. Customer
  3. Product
  4. Bill

User Resource

# action method url request response auth (headers)
1. register a user POST /users/register
  • username*
  • email*
  • password*
  • businessName
  • address
  • _id
  • username
  • email
  • password
  • businessName
  • address
  • createdAt
  • updatedAt
no
2. login a user POST /users/login
  • email*
  • password*
  • token
no
3. get user information GET /users/account -
  • _id
  • username
  • email
  • password
  • businessName
  • address
  • createdAt
  • updatedAt
{ Authorization : 'Bearer token'}

note - * indicates a required field


Customer Resource

# action method url request response auth (headers)
1. lists all customers GET /customers - empty array or array of objects
{ Authorization : 'Bearer token'}
2. create a customer POST /customers
  • name*
  • mobile*
  • email
  • _id
  • name
  • mobile
  • email
  • user
  • createdAt
  • updatedAt
{ Authorization : 'Bearer token'}
3. get a customer GET /customers/:id -
  • _id
  • name
  • mobile
  • email
  • user
  • createdAt
  • updatedAt
{ Authorization : 'Bearer token'}
4. update a customer PUT /customers/:id
  • name*
  • mobile*
  • email
  • _id
  • name
  • mobile
  • email
  • user
  • createdAt
  • updatedAt
{ Authorization : 'Bearer token'}
5. delete a customer DELETE /customers/:id -
  • _id
  • name
  • mobile
  • email
  • user
  • createdAt
  • updatedAt
{ Authorization : 'Bearer token'}

note - * indicates a required field


Product Resource

# action method url request response auth (headers)
1. lists all products GET /products - empty array or array of objects { Authorization : 'Bearer token'}
2. create a product POST /products
  • name*
  • price*
  • _id
  • name
  • price
  • user
  • createdAt
  • updatedAt
{ Authorization : 'Bearer token'}
3. get a product GET /products/:id -
  • _id
  • name
  • price
  • user
  • createdAt
  • updatedAt
{ Authorization : 'Bearer token'}
4. update a product PUT /products/:id
  • name*
  • price*
  • _id
  • name
  • price
  • user
  • createdAt
  • updatedAt
{ Authorization : 'Bearer token'}
5. delete a product DELETE /products/:id -
  • _id
  • name
  • price
  • user
  • createdAt
  • updatedAt
{ Authorization : 'Bearer token'}

note - * indicates a required field


Bill Resource

# action method url request response auth (headers)
1. List all bills GET /bills - empty array or array of objects { Authorization : 'Bearer token'}
2. create a bill POST /bills
  • date*
  • customer*
  • lineItems*
    • product*
    • quantity
  • _id
  • date
  • customer
  • lineItems
    • _id
    • product
    • price
    • quantity
    • subTotal
  • user
  • createdAt
  • updatedAt
  • total
{ Authorization : 'Bearer token'}
3. get a bill GET /bills/:id -
  • _id
  • date
  • customer
  • lineItems
    • _id
    • product
    • price
    • quantity
    • subTotal
  • user
  • createdAt
  • updatedAt
  • total
{ Authorization : 'Bearer token'}
4. delete a bill DELETE /bills/:id -
  • _id
  • date
  • customer
  • lineItems
    • _id
    • product
    • price
    • quantity
    • subTotal
  • user
  • createdAt
  • updatedAt
  • total
{ Authorization : 'Bearer token'}

note - * indicates a required field

billing-app's People

Contributors

aniruddha avatar dependabot[bot] avatar harishbn31 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  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.