Do well by doing good for fulfillment workers
HeyThanks is the Shopify app the enables in-store tipping for fulfillment workers. Built with Node (server), React (admin) and Vue (cart and order widgets). Served up by Heroku with a Postgres database.
Get started contributing to HeyThanks.
Make sure your development environment has the necessary prerequisites.
-
Node.js (v16.x) – we use nvm to manage Node.js versions.
-
Shopify CLI to manage Shopify apps.
-
VSCode – you could also use another editor, but this helps us guarantee linter/formatter features.
-
Volar VSCode Extension – Vue 3 language support (turn off vetur and ts/js language features if you have problems arising from conflicts).
-
Eslint VSCode Extension – linter and formatter.
Clone the repository, checkout a new branch from the master copy, and install all dependencies.
git clone https://github.com/localgoods/heythanks.git
cd heythanks
git pull
git checkout -b feature/tip-more master
npm install
This will install all workspace dependencies for this monorepo.
Create a .env
in the root directory and add your local Shopify app configuration.
SHOPIFY_API_KEY="your-api-key"
SHOPIFY_API_SECRET="your-api-secret"
SHOP="your-shop-url"
SCOPES=write_script_tags,write_products,read_themes,read_fulfillments,read_orders,read_products,read_customers
HOST="your-ngrok-url"
DATABASE_URL="your-postgres-url"
Run the development server for the cart widget.
npm run serve:cart-widget
Run the development server for the default application (the admin app) and backend services.
npm run serve
There are two main operations for setting up and maintaining our PG DBs. Both are shown below with the example values representing our local environment (but the same operations are used for production). For testing changes and sandboxing queries, pgAdmin is a good app to download and configure to access HT DBs.
Dump migrations from an existing DB (to download the HT schema).
pg_dump -h localhost -p 5432 -U ianherrington -d postgres -f ./heythanks_pg.sql
# Then enter password...
Migrate a DB (to upload or update the HT schema).
psql -h localhost -p 5432 -U ianherrington -d postgres -f ./heythanks_pg.sql
# Then enter password...
Todo add usage documentation for the topics below.
- Env vars
- App config
- Store config
- Extension config
- Git workflow
Special, free access to full service:
- loop-chocolate.myshopify.com
- local-goods-ian-dev.myshopify.com
- local-goods-shane-dev.myshopify.com
- local-goods-dawn-staging.myshopify.com
- spotted-by-humphrey-staging.myshopify.com
- urban-edc-supply-staging.myshopify.com
- shopwayre-staging.myshopify.com
- urban-edc-supply.myshopify.com
- spotted-by-humphrey.myshopify.com
- shopwayre.myshopify.com