mirror of
https://github.com/KevinMidboe/planetposen-backend.git
synced 2025-10-29 00:10:12 +00:00
a28b47413a922b5e7d473d8d8268c5c56d587e57
* 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
planetposen backend
Backend api of planetposen webshop. View frontend at: kevinmidboe/planetposen-frontend
Also uses the following supplementary go apps:
- image proxy : kevinmidboe/planetposen-images
- email sender : kevinmidboe/planetposen-mail
Install
Download project:
git clone https://github.com/kevinmidboe/planetposen-backend
cd planetposen-backend
Install dependencies:
yarn
or
npm install
Copy default configuration files:
cp config/default/* config/env
Update values in configuration files for both development & production
Build
To compile typescript files to javascript build project by running:
yarn build:ts
Developing
Start application with development configuration:
yarn dev
Api will be available at: http://localhost:30010
Languages
TypeScript
82.6%
PLpgSQL
12.7%
JavaScript
4.7%