Skip to content

brendangibson/fabric

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adding a new style/colour

  1. Take a photo of the fabric

on this machine:

  1. Put the photo in the public/assets directory
  2. npm run build
  3. git add .
  4. git commit -m "Adding a new style"
  5. git push

ssh to the server

  1. git pull

on AWS AppSync

  1. Login - go to Cognito>App client settings to get the id
  2. Run GetColours query. Store the colour id.
  3. Run GetStyles query. Store the style id
  4. swatchUrl should be set to https://sienandco.space/assets/ + your new file from above
  5. Run CreateStyleColour mutation with the colourId, styleId, glenRavenName, and swatchUrl

Run code locally

  1. npm run start

Build and deploy

  1. npm run build
  2. Commit to git and push

Connect to the database

  1. Get the URL of the Writer
  2. mysql -h appsyncrdsinstance-rcy4ohoyyzhlvahtxrucs5oix4.clghn7faucwg.us-east-2.rds.amazonaws.com -u master -p
  3. If that fails, you may have to update your IP for the security group for the Writer
  4. If that fails try rebooting the database in the AWS console
  5. use myrds
  6. show tables;

Add in a new style/colour

  1. Take a picture of the fabric. Put that image in public/assets. Build and deploy
  2. INSERT INTO colours (id, name) VALUES (uuid(), 'New Colour Name');
  3. INSERT INTO styles (id, name) VALUES (UUID(), 'New Style Name');
  4. INSERT INTO stylesColours (id, colourId, styleId, swatchUrl, sku) VALUES (uuid(), 'New Colour Id', 'New Style ID', 'https://sienandco.space/assets/newimage.jpg', 'AAABBBFAB)