Backend-as-a-service monorepo: NestJS API, Next.js dashboard, shared packages, and the voltbase-js client SDK.
| Package | Description |
|---|---|
apps/api |
NestJS API (auth, orgs, projects, SQL, storage, realtime) |
apps/web |
Next.js dashboard |
packages/constants |
Shared constants (@voltbase/constants) |
packages/types |
Shared TypeScript types (@voltbase/types) |
packages/voltbase-js |
Official JS/TS SDK (npm) |
pnpm install
pnpm run dev- API:
http://localhost:3000/api - Web:
http://localhost:3001
Copy env templates:
cp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.envOrder: Railway (API) first, then Vercel (web), then update both with the final URLs.
- railway.app → New Project → Deploy from GitHub →
Owusu1946/voltbase - Railway uses root
railway.toml:- Build:
pnpm run build:api - Start:
pnpm run start:api - Health:
GET /api/health
- Build:
- Variables → add everything from
apps/api/.env.example - Set placeholders first, then after you have URLs:
WEB_URL=https://YOUR-APP.vercel.app(no trailing slash)API_URL=https://YOUR-RAILWAY-DOMAIN/api- OAuth callback URLs to the same Railway host
- Generate a public domain under Settings → Networking
- vercel.com → Add New Project → import
Owusu1946/voltbase - Root Directory:
apps/web(Important) - Framework: Next.js —
apps/web/vercel.jsonsets install/build for the monorepo - In Project Settings → General / Build & Development:
- Do not override Install/Build in the dashboard (use
vercel.json) - Do not set
ENABLE_EXPERIMENTAL_COREPACK(it conflicts with our install)
- Do not override Install/Build in the dashboard (use
- Environment variables from
apps/web/.env.example:API_URL/NEXT_PUBLIC_API_URL=https://YOUR-RAILWAY-DOMAIN/apiNEXT_PUBLIC_WEB_URL= your Vercel URLJWT_ACCESS_SECRET= same value as on Railway
- Deploy
- Put the Vercel URL into Railway
WEB_URL(CORS + OAuth redirects) - Confirm Railway
API_URLand OAuth callbacks match the Railway public domain - Redeploy both if you changed env vars after the first deploy
- Neon
DATABASE_URL(+REALTIME_DATABASE_URLif separate) - Strong JWT / invite secrets (not the local defaults)
- Resend + UploadThing tokens for email/storage
- GitHub/Google OAuth app callback URLs point at Railway
-
WEB_URLand Vercel URL match exactly (scheme + host, no trailing slash)