Development
How to develop Superflow
Clone superbonfire-lab/superflow.
The stack is TanStack Start, React 19, tRPC, Drizzle ORM, and Tailwind v4. Production uses Cloudflare D1 for the database and R2 for files. Generation runs through fal.ai.
Read status.md before you change the app.
Start locally
- Copy
.env.exampleto.env. - Run
pnpm install. - Run
pnpm dev. - Open
http://localhost:3000.
With the Cloudflare and R2 values empty, the app uses data/superflow.db and data/blobs/. In development, the sign-in code shows on the sign-in card.
pnpm dev:live loads .env.live and works on the live database and files. Use it only when you mean to.
Environment variables
Copy the names from .env.example. Get the values from Vaultwarden.
CLOUDFLARE_*— the D1 database.R2_*— file storage.SF_DATA_URLandSF_DATA_TOKEN— live updates through the data worker.FAL_KEY— turns generation on.OPENROUTER_KEY— turns Enhance on.OPENROUTER_MANAGEMENT_KEYreads the prompt balance.LOOPS_API_KEYandLOOPS_SIGNIN_TRANSACTIONAL_ID— email the sign-in code in production.
These keys stay on the server. They never go to the browser.
Models
The model menu is src/lib/models.ts. Image Gen defaults to Nano Banana 2. Video Gen defaults to MiniMax H3.
Checks before a push
pnpm install turns on a git hook. Before each push it runs pnpm check: typecheck, tests, the Prettier check, and the build. If a check fails, nothing is pushed.
GitHub does not run these checks. Merge a pull request only when GitHub says the branch is up to date with main.
Current deployment
The app is deployed to https://superflow.superbonfire.tech through Coolify on our Tencent Cloud VPS.
Coolify deploys each push to main. It runs pnpm build, then pnpm start, on port 3000. Leave the Coolify start command empty. Set NODE_ENV=production.