Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lovejotsaini/billingapp-back-end-data

its a complete backend data of billing app using Nodejs and MongoDb
https://github.com/lovejotsaini/billingapp-back-end-data

Last synced: 1 day ago
JSON representation

its a complete backend data of billing app using Nodejs and MongoDb

Awesome Lists containing this project

README

        

# 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

## API's **base url - http://dct-billing-app.herokuapp.com/api**

### 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**