Full-stack

How to deploy an Elysia + TanStack dashboard on Rock8Cloud

Deploy an authenticated dashboard to Rock8Cloud in one click - Elysia API on Bun, a TanStack Start web app, PostgreSQL provisioned and wired, with a seeded login ready on the first deploy.

Updated 26 July 2026
The deployed dashboard signed in as demo@example.com, showing the todo list

An authenticated dashboard in one deploy - an Elysia API on Bun and a TanStack Start web app, managed as a single Turborepo monorepo. Rock8Cloud provisions the database, generates the secrets, and has you signed in before you have opened an editor.

Elysia + TanStack example
rock8-cloud/elysia-tanstack-dashboard-monorepo

Deploy in one click#

The blueprint clones the monorepo into your GitHub account, then builds two services from it - the Elysia API (port 3001) and the TanStack Start web app (port 3000). A managed PostgreSQL database is provisioned and passed to the API as DATABASE_URL.

The services learn each other’s addresses at deploy time. The API receives its own public URL as BETTER_AUTH_URL and the web origin as CORS_ORIGIN, and the web app is built against the API public URL. Nothing about that is yours to wire.

What is in the box#

LayerTechnology
APIElysia on Bun, port 3001
Type safetyEden, the web app imports the API type directly
Authbetter-auth cookie sessions, email and password, OIDC-ready
DatabasePostgreSQL with Drizzle ORM
WebTanStack Start, TanStack Query and shadcn/ui on Base UI, port 3000

There is a working todo vertical slice in the repo showing the route to service to query layering, so the first feature you add has a pattern to copy.

Your first login#

The API seeds demo@example.com with a password generated for your deployment. Read it from SEED_USER_PASSWORD in the API service’s environment variables, then sign in at /login on the web URL.

Pro tip:

Sign-up is open by default, so anyone who reaches your web URL can register. Restrict or disable emailAndPassword in apps/server/src/lib/auth.ts before putting anything real behind it.

Change the demo password or delete the account once you have your own user. Set SEED_DEFAULT_USER=false to stop seeding entirely.

Changing the schema#

Migrations run automatically when the API starts. To change the schema:

  1. Edit apps/server/src/db/schema/*
  2. Run bun run db:generate
  3. Commit and push

Keep the route to service to query boundaries when adding features. An oxlint rule enforces that only src/db touches Drizzle.

Moving the API#

VITE_SERVER_URL is inlined by Vite at build time, so it travels as a Docker build argument rather than a runtime variable. If you move the API to a different URL, the web service needs a rebuild rather than a restart.

Frequently asked questions

What do I need to configure before deploying?
Nothing. The blueprint clones the repo, provisions PostgreSQL and passes it in as DATABASE_URL, generates the auth secret, and sets the cross-service URLs. The first deploy gives you a working signed-in dashboard.
How do the API and the web app find each other?
Automatically. The API gets its own public URL as BETTER_AUTH_URL and the web origin as CORS_ORIGIN, and the web app is built against the API public URL. There is no manual URL setup.
How do I log in the first time?
The API seeds demo@example.com with a password generated for your deployment. Read SEED_USER_PASSWORD from the API service environment variables. Change the password or delete the account once you have your own user, and set SEED_DEFAULT_USER=false to stop seeding.
Do I need to run migrations?
Migrations run automatically when the API starts. To change the schema, edit apps/server/src/db/schema/*, run bun run db:generate, then commit and push.
Why does moving the API URL need a rebuild?
VITE_SERVER_URL is inlined by Vite at build time, so it is passed as a Docker build argument rather than a runtime variable. If the API moves to a different URL the web service needs a rebuild, not just a restart.

More guides

Ship today

Ship your dashboard.Signed in on day one.

An Elysia API, a TanStack Start web app and PostgreSQL - provisioned together, wired to each other, live on the first deploy.

60 days free. No credit card required to start.