Marketing site for StageFlo, published on GitHub Pages via static export.
- Next.js (App Router)
- TypeScript
- Static export (
out/) - GitHub Actions Pages deployment
npm install
npm run devnpm run buildThis outputs static files to out/.
- Push to
main. - GitHub Actions runs
.github/workflows/deploy.yml. - The generated
out/artifact is deployed to GitHub Pages.
This repo now includes a static offline page at /offline/ for StageFlo public links.
If you want *.stageflo.app tunnel URLs to redirect there when the desktop app or Cloudflare tunnel is down, use a Cloudflare Worker rather than a plain Redirect Rule. Redirect Rules run before the origin response is known, so they cannot reliably react to tunnel outage responses.
Included example worker:
scripts/cloudflare-tunnel-offline-worker.mjs
Recommended Cloudflare setup:
- Create a Worker using
scripts/cloudflare-tunnel-offline-worker.mjs. - Set Worker env var
OFFLINE_PAGE_URL=https://stageflo.app/offline/. - Attach a route such as
*.stageflo.app/*. - Keep
stageflo.app/*served normally so the offline page itself never loops.
The worker passes through healthy requests and issues a 302 redirect to /offline/ when the tunnel returns a common origin-down status (502, 503, 504, 530) or the fetch itself fails.
The StageFlo desktop app reports anonymous install and launch activity to Supabase so you can see how many unique installs are active and which app versions are currently in use.
Setup steps:
- Apply supabase/migrations/20260519143000_create_app_installations.sql.
- Deploy supabase/functions/capture-app-usage/index.ts.
- Deploy supabase/functions/usage-admin/index.ts for usage dashboard queries.
- Rebuild or release the desktop app so it points at the new usage endpoint.
The desktop app stores a persistent anonymous install ID in user data and reports the current version on every packaged launch. The latest active version for each install is written to app_installations.last_version.
Telemetry also includes tunnel metadata (tunnel_mode, tunnel_active, tunnel_hostname) so you can analyze named/quick tunnel adoption.
This site is static on GitHub Pages, so downloads can only be gated with a client-side form that posts to an external endpoint.
The preferred setup is a Supabase Edge Function that receives the lead form payload and writes to a download_leads table.
Setup steps:
- Create a Supabase project.
- Apply supabase/migrations/20260502193000_create_download_leads.sql.
- Deploy supabase/functions/capture-download-lead/index.ts.
- Add GitHub repository secret
NEXT_PUBLIC_SUPABASE_FUNCTION_URLwith your deployed function URL. - Push to
mainto trigger deploy.
Expected function URL format:
https://<project-ref>.functions.supabase.co/capture-download-lead
The GitHub Pages deploy workflow already injects NEXT_PUBLIC_SUPABASE_FUNCTION_URL into the site build via .github/workflows/deploy.yml.
CLI shortcut from this repo:
SUPABASE_ACCESS_TOKEN=... \
SUPABASE_PROJECT_REF=... \
SUPABASE_DB_PASSWORD=... \
npm run setup:supabaseFor a brand new project, provide SUPABASE_ORG_ID and optionally SUPABASE_REGION / SUPABASE_PROJECT_NAME instead of SUPABASE_PROJECT_REF.
The helper script will:
- Create or link the Supabase project.
- Push the SQL migration.
- Deploy
capture-download-lead,capture-app-usage, andusage-adminwith--no-verify-jwtso the public website and desktop app can call them. - Set function secrets and update the GitHub repo secret
NEXT_PUBLIC_SUPABASE_FUNCTION_URL.
If needed, the site still supports NEXT_PUBLIC_DOWNLOAD_LEAD_ENDPOINT as a generic fallback for non-Supabase providers.
You can also use Basin, Google Apps Script, or your own API.
Expected request payload:
{
"name": "Jane Doe",
"email": "jane@example.com",
"marketingOptIn": true,
"consent": true,
"source": "desktop",
"downloadUrl": "https://...",
"page": "https://stageflo.app/",
"submittedAt": "2026-04-11T00:00:00.000Z"
}If neither NEXT_PUBLIC_SUPABASE_FUNCTION_URL nor NEXT_PUBLIC_DOWNLOAD_LEAD_ENDPOINT is set, the gate appears but downloads are blocked until the endpoint is configured.
- No custom domain configured.
- Download links point to StageFlo releases: