A modern form builder application that lets you create, customize, and share beautiful forms with a rich text editor experience. Built with a real-time local-first architecture for instant responsiveness.
- Rich Form Editor — Block-based editor powered by Plate.js with support for text formatting, media, tables, code blocks, math equations, callouts, and more
- AI Assistance — AI-powered content generation and editing within the form builder
- Form Submissions — Collect and manage responses with a built-in data grid view
- Drag & Drop — Reorder form elements with intuitive drag-and-drop interactions
- Embeddable Forms — Share forms via direct links or embed them in external sites
- Password Protection — Restrict form access with password gates
- Workspaces & Organizations — Multi-tenant workspace management with team invitations and role-based access
- Billing & Subscriptions — Integrated payment handling via Polar
- Theme Support — Light and dark mode with customizable styling
- Real-time Sync — Local-first data layer with ElectricSQL for instant UI updates
| Layer | Technology |
|---|---|
| Framework | TanStack Start (Vite + React 19) |
| Routing | TanStack Router (file-based, type-safe) |
| Data | TanStack DB + ElectricSQL (local-first sync) |
| Database | PostgreSQL + Drizzle ORM |
| Auth | Better Auth (email/password, OTP, 2FA, organizations) |
| Editor | Plate.js (rich text, block-based) |
| UI | shadcn/ui + Radix UI + Tailwind CSS v4 |
| AI | Vercel AI SDK |
| Payments | Polar |
| File Uploads | UploadThing |
| Monitoring | Sentry |
| Server | Nitro + Caddy (local HTTPS) |
- Bun (runtime and package manager)
- PostgreSQL database
- Caddy (for local HTTPS development)
-
Clone the repository
git clone <repository-url> cd better-form
-
Install dependencies
bun install
-
Set up environment variables
cp .env.example .env
Fill in the required values in
.env(database URL, auth secrets, API keys, etc.). -
Set up the database
bun db:generate bun db:migrate
-
Start the development server
bun dev
This starts both Caddy (HTTPS proxy) and the Vite dev server. Open the URL printed in the terminal.
| Command | Description |
|---|---|
bun dev |
Start dev server with Caddy HTTPS proxy |
bun build |
Production build |
bun start |
Start production server |
bun test |
Run tests with Vitest |
bun lint |
Lint with oxlint + knip |
bun fmt |
Format with oxfmt |
bun check |
Run all checks (Ultracite) |
bun fix |
Auto-fix lint and format issues |
bun db:generate |
Generate Drizzle migrations |
bun db:migrate |
Run database migrations |
bun db:push |
Push schema changes directly |
bun db:studio |
Open Drizzle Studio |