SaaS Dashboard Kit
Vite + Hono full-stack SaaS template.
The OTF SaaS Dashboard Kit is a deployable SaaS starter. Vite + React 19 + Hono backend + Postgres + Better Auth. Product billing is not implemented in the delivered kit; the customization guide documents a Stripe Checkout and webhook path. Live at saas.otf-kit.dev.
Stack
| Layer | Choice |
|---|---|
| Framework | Vite 6 + React 19 (SPA) |
| Routing | TanStack Router (hand-wired in src/main.tsx) |
| Data | TanStack Query (staleTime: 10s, optimistic updates) |
| Server | Hono 4 + Bun 1.3 (same process serves API + static SPA) |
| DB | Postgres + Drizzle ORM 1.0-rc |
| Auth | Better Auth 1.6 — email + Google OAuth + demo login |
| UI | @otfdashkit/ui (Radix + Tailwind, token-driven theming) |
| Payments | Not included; the kit's docs/CUSTOMISATION.md documents the Stripe setup path |
| Deploy | bash scripts/deploy-worker.sh deploys the app and API to Cloudflare Workers, with Hyperdrive in front of your Postgres; or run the Dockerfile on any container host (Fly, Render, Railway, a VPS). Run migrations from your machine. The deployment guide ships with the kit. |
Pre-built screens
The kit ships with 12 screens that mirror what every B2B SaaS needs:
| Screen | Path | What's there |
|---|---|---|
| Landing | / | Public marketing landing |
| Login / Signup | /auth/login, /auth/signup | 2-col hero + email/password + Google + demo login |
| Dashboard | /home/dashboard | KPIs + AreaChart + BarChart + Timeline |
| Tasks | /home/tasks | All issues — RecordTable + IssueDetail Sheet |
| Issues board | /home/issues-board | Kanban (5 status columns) |
| Issues backlog | /home/issues-backlog | Drag-orderable backlog grouped by priority |
| Inbox | /home/inbox | SplitPage notifications inbox |
| Analytics | /home/analytics | BarChart / LineChart / BarList / ActivityHeatmap |
| Projects | /home/projects | Projects list + create/delete |
| Project detail | /home/projects/:id | Single project with team + tasks |
| Teams | /home/teams | Members table + GridList + Sheet |
| Settings | /home/settings | Profile / Workspace / Notifications / Appearance |
Database
- 5 Better-Auth tables:
user,account,session,jwks,verification - 12 app tables:
userPublic,workspace,team,teamMember,project,issue,label,issueLabel,comment,attachment,notification,savedView
bun run db:generate produces clean SQL. bun run db:migrate applies it. bun run db:seed
loads a deterministic 4-user / 5-project / 50-issue seed.
Conventions
The kit follows the patterns documented in CLAUDE.md:
- Hooks: every entity gets a TanStack Query hook with optimistic updates. Copy
src/hooks/useProjects.ts. - Routes: every entity gets a Hono router under
server/routes/. Copyserver/routes/projects.ts. - Screens: wrap content in
<FadeIn>then<Page>/<PageHeader>/<PageBody>. Add the route insrc/main.tsx. Add a sidebar item insrc/components/Sidebar.tsx. - Theming:
@otfdashkit/tokensCSS imported first,@otfdashkit/ui/stylessecond. Pre-paint default inindex.htmlto avoid FOUC. - Charts:
hsl(var(--chart-1))etc. Deep-clone data withdata.map(d => ({...d})).
Adding things
The kit's ai/prompts/ folder has
20+ task prompts for common tasks: add a CRUD entity, add a chart, add a screen, swap auth
provider, swap payment provider, etc. Each prompt is a copy-paste-into-Claude/Cursor template.
Deploy
Set the Worker secrets (BETTER_AUTH_SECRET, BETTER_AUTH_URL, DATABASE_URL), then run
bash scripts/deploy-worker.sh from the kit root: it builds the web app and deploys the app and
API to Cloudflare Workers, and DOMAIN= attaches a custom domain on your Cloudflare zone. Put
Hyperdrive in front of the database. To run it on a container host instead (Fly, Render, Railway or
a VPS), use the kit's Dockerfile. Run bun run db:migrate and bun run db:seed from your machine
against the same database. The deployment guide ships with the kit.
Required env
| Variable | Purpose |
|---|---|
DATABASE_URL | Postgres connection string |
BETTER_AUTH_SECRET | 32+ chars — signs sessions/JWTs |
BETTER_AUTH_URL | Public origin (e.g. https://your-app.com) |
Optional: GOOGLE_CLIENT_ID + GOOGLE_CLIENT_SECRET for Google sign-in. The demo button is off in production
unless you set DEMO_LOGIN_ENABLED=1; DEMO_LOGIN_DISABLED=1 hides it everywhere. On Railway, the auto-set RAILWAY_STATIC_URL is added to the CORS allowlist.
The Stripe variables shown in the kit's .env.example are commented out and are only needed if
you implement the optional billing customization described above.
Buy
$99 on otf-kit.dev — or get the Everything Bundle ($149 = 6 delivered Live kits + all 20 landing templates; $774 separately, save $625.)