SupaStaqOpen dashboard

Developer guides

Choose a service for your project. For features backed by Supabase, open your running instance to get its tenant URL and generate setup instructions for the right project.

Frontend hosting

In the project actions menu, choose Host a frontend. Commit the generated include to a GitLab repository with Pages enabled and an available runner. For an app inside a larger repository, add this entry to your pipeline’s include list.

include:
  - remote: 'https://supa.staq.dev/guides/supastaq-pages-1.1.0.yml'
    integrity: 'sha256-uSRONP/Ze1ca+DHRb/QsfGSjf9VtwYZnyaEjyvI4yBM='
    inputs:
      app-directory: apps/storefront
      publish: dist

Replace the app directory and output directory with yours. Use public for committed static files. After the default branch builds, open Deploy → Pages. To check the served release, run the verifier against the output from that same build.

node verify-frontend-v1.1.mjs SITE_URL apps/storefront/dist --wait-seconds 660 --all-assets
Catch broken scripts and styles before publishing

Save the build checker in your repository as ci/check-frontend-build-v1.py. It checks the entry page’s local scripts and styles against the exact Pages path. External resources are counted and skipped.

For an npm build, keep the include above. Have your build job upload both apps/storefront/dist/ and ci/check-frontend-build-v1.py as artifacts. Replace build website below with its name. Add these jobs to your pipeline. The Pages job publishes the artifact only after the check passes. Set runner tags if your project requires them.

check website:
  stage: test
  image: python:3.12-alpine
  dependencies: ["build website"]
  variables:
    GIT_STRATEGY: empty
  cache: []
  script:
    - python ci/check-frontend-build-v1.py apps/storefront/dist "$CI_PAGES_URL"
  artifacts:
    paths: [apps/storefront/dist/]
  rules:
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

supastaq-frontend:
  dependencies: ["check website"]
  variables:
    GIT_STRATEGY: empty
  cache: []
  script:
    - test -s apps/storefront/dist/index.html

For committed static files, use publish: public in the include and override just the Pages job’s image and script.

supastaq-frontend:
  image: python:3.12-alpine
  script:
    - python ci/check-frontend-build-v1.py apps/storefront/public "$CI_PAGES_URL"

Private RAG

Index documents in your Supabase instance and return answers with source excerpts. Install the SDK in your Node.js backend. Apply the generated migration to the selected tenant and run the models on the backend machine.

npm install https://supa.staq.dev/guides/supastaq-cli-0.1.3.tgz
node ./node_modules/@supastaq/cli/bin/supastaq.mjs rag init
ollama pull all-minilm
ollama pull qwen2.5:1.5b

Use the signed-in app user’s access token so retrieval follows document ownership. The editor kit lets users browse their saved sources, open a document, and edit or remove it. Its README includes the tenant SQL setup and an example for loading the next page.

Database metrics

Extract the daily report kit into your app directory and follow its README to configure the tenant and the signed-in reader. Preview the proposed tables and SQL. Once you approve a table, install the included SQL and grant the reader access to that table.

node --env-file=.env.metrics supastaq-metrics.mjs preview
node --env-file=.env.metrics supastaq-metrics.mjs report --approve orders --output orders.html

Replace orders with your approved table. Open the HTML file locally to see 30 UTC days of visible row counts and compare the two most recent completed weeks. For JSON output, use run --approve orders.

Web and app analytics

Open Set up page views and error reports on your instance. Generate the base migration with supastaq telemetry init, apply it, and register the release, route and event labels your app sends. Apply the report SQL and grant a signed-in user access to read the counts.

To confirm a page view, set SUPABASE_URL, SUPABASE_ANON_KEY and SUPABASE_USER_ACCESS_TOKEN in your shell. Substitute your tenant and registered labels below. The count belongs to that group and UTC day.

node tenant-check-7aa11b8.mjs telemetry TENANT_URL --event web-1 checkout page view

For browser apps that need delivery confirmation, install the kit’s tenant SQL and use its browser module with confirmDelivery: true. It can retry a lost response using the same event ID, so one error adds one count. The README includes a working setup.

For Android 11 and later, apply the Android SQL, register the crash labels, and configure the Java reporter at startup with the user’s consent. Check the original crash day after the app restarts and uploads its report.

To compare web errors on one route, apply the release check SQL once after the report SQL. Download the checker and run it with the same reader environment. Supply the route, the older release and UTC date, the newer release and UTC date, a minimum view count for each, and the increase in errors per 1,000 views that should flag a regression.

node release-error-check-v1.mjs checkout web-1 OLD_DATE web-2 NEW_DATE 100 5.00

Use dates within the last 30 UTC days. In this example, an increase of at least 5 errors per 1,000 recorded views flags the error code. Exit 0 means all comparable codes stayed below the limit and had full coverage. Exit 1 means a regression was observed. Exit 2 means the check was inconclusive or failed. The check uses the labels currently registered for each release. Today’s counts are partial.

Push notifications

Use a Node.js 22.13+ Express backend and an HTTPS frontend on the same origin. Extract the integration kit, install the SDK, then generate the project’s VAPID keys and service worker.

npm install https://supa.staq.dev/guides/supastaq-cli-0.1.2.tgz
node ./node_modules/@supastaq/cli/bin/supastaq.mjs push init

Serve the worker at /supastaq-push.js and mount the adapter after your app’s session middleware. Ask for browser permission when the user selects Enable. The kit shows how to reuse an event ID on retries and check delivery receipts.

Project security

Open Set up project security reports on your instance. The scheduled job checks an npm lockfile against reviewed advisories and records your project’s access-control test results. Grant publication to the project’s trusted runner and report access to the team members who need it.

Managed GitLab

As project owner, choose Managed GitLab in the project actions menu and request an estimate. Review the server, runner and backup costs before accepting. An accepted request can remain queued until provider capacity is available.

LLM relay

In Billing, select the project under AI Gateway and create an app key. Store it in the backend environment as AI_GATEWAY_RUNTIME_KEY. List model prices using the Node.js helper.

node --env-file=.env supastaq-ai-v1.mjs models

The public relay currently offers the model catalog. Check the inference status in Billing before funding a project. When paid generation is enabled, each request needs at least $0.25 of available prepaid credit across the owner’s projects and $0.25 remaining under the selected project’s monthly limit. Resolve any overdue invoice first.

The relay reserves $0.25 when it accepts a request and settles the actual charge when generation completes. Other projects can use the same credit balance. A paid Ozon sandbox top-up appears in order history and adds zero spendable credit.

Consolidated billing

Open your billing statement to review instance and relay charges together. The RUB quote converts the USD balance using the applicable Bank of Russia rate with a 5% markup. In Ozon sandbox checkout, one payment settles the outstanding statement balance and produces one receipt. Live collection is deferred.

Expand the AI Gateway invoice to see usage and any prepaid credit applied. For example, if credit covers the full AI charge and the instance charge is ₽100, the statement checkout collects ₽100. The receipt lists the invoices covered by that payment.