Skip to content

Commit 49fc08f

Browse files
committed
update: readme & config
1 parent 534f3f1 commit 49fc08f

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
CLOUDFLARE_API_TOKEN=
2-
NODE_VERSION=22
32
SHOPIFY_API_KEY=
43
SHOPIFY_API_SECRET_KEY=
54
SHOPIFY_APP_URL=

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
release:
1010
name: Release
1111
runs-on: ubuntu-latest
12+
if: ${{ github.event.repository == 'chr33s/shopflare' }}
1213
permissions:
1314
contents: write
1415
steps:

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# ShopFlare
22

3-
> Minimalist Shopify app using React Router (v7) running on cloudflare (worker). Only required features, no future changes other than core upgrades & platform alignment.
3+
> Minimalist Shopify app using React Router (v7) running on cloudflare (worker, kv, analytics). Only essential features, no future changes other than core upgrades & platform alignment.
44
55
## Rationale
66

7-
- @shopify/shopify-app-remix to complex (to much abstraction)
8-
- Needed simple boilerplate, than only does the basics with minimal abstraction
7+
- @shopify/shopify-[api,app-remix] to complex (to much abstraction)
8+
- Needed a simple starter, than only does the basics
99
- Small code surface, easier audit
1010
- Stability over feature completeness
1111
- Minimally opinionated, by supporting only:
@@ -18,23 +18,24 @@
1818
1. Cloudflare account
1919
2. cloudflared cli `brew install cloudflared`
2020
3. Node.js & NPM see package.json#engines `brew install node@22`
21+
4. Github cli `brew install gh` (optional)
2122

2223
## Setup
2324

2425
```sh
25-
cp .env.example .env # update values
26+
npm install
27+
cp .env.example .env # update vars to match your env
28+
# vi [wrangler.json, shopify.app.toml] # update vars[SHOPIFY_API_KEY, SHOPIFY_APP_URL]
29+
npx wrangler secret put SHOPIFY_API_SECRET_KEY # value from shopify partners
30+
gh secret set --app=actions CLOUDFLARE_API_TOKEN # value from cloudflare
31+
gh variable set SHOPIFY_API_KEY
2632
```
2733

28-
- copy .env.example vars to Cloudflare workers > Environment variables
29-
- create Workers > KV store key \_SESSION_STORAGE & attach it to workers > Settings > KV namespace bindings
30-
- copy .env{ SHOPIFY_API_KEY, CLOUDFLARE_API_TOKEN } vars to Github > secrets (and variables)
31-
3234
## Development
3335

3436
```sh
35-
npm install
3637
npm run dev
37-
# open -a Safari {cloudflared.url}
38+
# open -a Safari ${SHOPIFY_APP_URL}
3839
```
3940

4041
## Production

worker-configuration.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
interface Env {
44
SESSION_STORAGE: KVNamespace;
5-
CLOUDFLARE_API_TOKEN: string;
65
NODE_VERSION: string;
76
SHOPIFY_API_KEY: string;
87
SHOPIFY_API_SECRET_KEY: string;

wrangler.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
"mode": "smart"
3535
},
3636
"vars": {
37-
"NODE_VERSION": 22
37+
"NODE_VERSION": 22,
38+
"SHOPIFY_API_KEY": "",
39+
"SHOPIFY_APP_URL": ""
3840
}
3941
}

0 commit comments

Comments
 (0)