14 Commits

Author SHA1 Message Date
cf79aa8923 Fixed planetposen-images repo url 2022-12-29 19:27:00 +01:00
a28b47413a Improvements to order, product, checkout & added shipping (#2)
* planet_id variable casing consistent with database field

Renames all clientId variables to planet_id

* Store stripe json response from latest payment & charge webhook

Also added db seed file for stripe payments

* Image support! Can now add, update & delete images from products

Images moved away from product schema to it's own table.
Accepts a images string and relates it to a product. Does not store the
images or verify the existance.

* Instead of deleting a product set field unlisted to true

Endpoints with current inventory checks for unlisted = false

* order_id & customer_no gets enhanced base64 function for generating id

* Implemented shipping for orders using Post tracking api

Added CRUD for making changes to a order's shippment.
Split shipping table into shipment_courier, shipment & shipment_event.

* Updated and add product & product_sku functions updated

* Cart increment funciton checks stock before updating

* Endpoint for getting product audit log using 91pluss trigger

Read more about usage here: https://wiki.postgresql.org/wiki/Audit_trigger_91plus

* On stripe charge successfull send email to user with planetposen-mail

* More product seed data, linting & formatting

* Log file at /var/log/planetposen_logs & rotate max 3 files 100MB each

This will prob throw a error if folder does not exist, run: `(sudo)
mkdir -p /var/log/planetposen_logs`.

* All endpoints now prefixed with /api/v1

* Linting
2022-12-29 19:25:39 +01:00
66bd6af861 Merge pull request #1 from KevinMidboe/feat/eslint
Eslint setup
2022-12-29 19:20:02 +01:00
df28d3d153 Removed unused files 2022-12-11 19:20:38 +01:00
a2a9c8c3c4 Resolved prettier & eslint issues 2022-12-11 19:20:27 +01:00
21dc1a5175 Setup eslint. Run after prettier in lint cmd 2022-12-11 19:19:37 +01:00
73a738b0ae Create README.md 2022-12-11 18:33:31 +01:00
38f4a03894 Typecsript global override adding planetId to express Request object 2022-12-11 18:21:38 +01:00
2c7c8ca928 Updated gitignore w/ common node project files 2022-12-11 18:21:16 +01:00
2dbbd7914d Cart, order, warehouse, product, customer & stripe payment files 2022-12-11 18:19:19 +01:00
b636f86151 Logger, utils and typescript interfaces, types and enums 2022-12-11 18:18:06 +01:00
57327e63d1 Webserver w/ api-routes, controllers, middleware & cart websocket server 2022-12-11 18:16:40 +01:00
099c3a59ac Database schema, seeds and scripts for seed, setup & teardown 2022-12-11 18:15:47 +01:00
5f42163dbe Initial commit: license, dependencies & config 2022-12-11 18:13:58 +01:00