Flisk logoflisk/demosHow it worksGitHubSponsor

Personal Flisk demo · preview

@yourhandle's Flisk stack

yourhandle is an example handle

This plan is a sample, so nothing was built and nothing runs live. Put your own X handle in the link to get a stack of your own: demo.flisk.si/<your-handle>/vue-storefront-connected-to-saleor.

Why this stack

saleor integration

This stack uses placeholder .env keys for saleor. A real saleor integration is built by hand, the way we did for Thor Commerce. We've logged a request for it.

Stack diagram

webfrontendapibackendapi-migratormigratorpostgresdatabase

Browser → web → api → Postgres. Workers and migrators share the same database. Traefik routes every service on *.localhost.

Run it

npm install -g @flisk-sh/flisk
flisk doctor
flisk project --yes
flisk resource web --type frontend --stack store --framework vue --yes
flisk resource api --type backend --stack store --feature prisma --yes
flisk up store
flisk status

Docs

.env.example

Copy to .env and fill in your keys. It never leaves your machine.

SALEOR_API_URL=
SALEOR_API_KEY=

Your service.json files

One service.json each. Postgres comes from "prisma" and Traefik routing is built in, so neither needs its own file.

webfrontendvue app
// services/store/web/service.json
{
  "$schema": "https://flisk.sh/schema.service.json",
  "schemaVersion": 1,
  "appName": "web",
  "appType": "frontend",
  "stack": "store",
  "port": 3000,
  "framework": "vue",
  "dependsOn": [
    "api"
  ]
}
apibackendbackend-for-frontend: the only service holding saleor keys
// services/store/api/service.json
{
  "$schema": "https://flisk.sh/schema.service.json",
  "schemaVersion": 1,
  "appName": "api",
  "appType": "backend",
  "stack": "store",
  "port": 4000,
  "healthCheckPath": "/health",
  "dependsOn": [
    "api-migrator"
  ],
  "featuresEnabled": [
    "prisma"
  ]
}
api-migratormigratorruns Prisma migrations against the shared Postgres before the api starts
// services/store/api-migrator/service.json
{
  "$schema": "https://flisk.sh/schema.service.json",
  "schemaVersion": 1,
  "appName": "api-migrator",
  "appType": "migrator",
  "stack": "store"
}

Want one for a friend?

Ask @grok on X with their handle and what they build.