Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiaragrouwstra/js-invoices
https://github.com/kiaragrouwstra/js-invoices
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/kiaragrouwstra/js-invoices
- Owner: KiaraGrouwstra
- Created: 2018-09-14T17:34:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-14T17:35:11.000Z (over 6 years ago)
- Last Synced: 2024-10-15T13:31:01.713Z (3 months ago)
- Language: TypeScript
- Size: 72.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deliverables
* At the bottom of the page you should show a dynamically calculated invoice total. This total should take into account the quantity and price of each product and the invoice discount
* From the invoice form, make it possible to add a new Customer that is not already in the system. It should be possible to add a name, .
* From the invoice form, make it possible to add a new Product. It should be possible to add a name and price.# Dependencies
- sqlite3
- node
- npm# Getting Started
###### Install npm dependencies
`npm install`###### Run the node server
`node app.js`###### Viewing the application in your browser
`http://localhost:8000`###### Watch changes
`webpack --watch`# Schema
## Customers
- id (integer)
- name (string)
- address (string)
- phone (string)## Products
- id (integer)
- name (string)
- price (decimal)## Invoices
- id (integer)
- customer_id (integer)
- discount (decimal)
- total (decimal)## InvoiceItems
- id (integer)
- invoice_id (integer)
- product_id (integer)
- quantity (decimal)# Resources
## Customers
```
GET|POST /api/customers
GET|PUT|DELETE /api/customers/{id}
```## Products
```
GET|POST /api/products
GET|PUT|DELETE /api/products/{id}
```
## Invoices
```
GET|POST /api/invoices
GET|PUT|DELETE /api/invoices/{id}
```## InvoiceItems
```
GET|POST /api/invoices/{id}/items
GET|PUT|DELETE /api/invoices/{invoice_id}/items/{id}
```