A Next.js application for building, publishing, and collecting submissions for custom forms. It includes an authenticated admin area with a drag-and-drop editor and a public-facing form experience.
- Authenticated admin area with form creation and editing
- Public shareable forms for submissions
- Results dashboard and export
- Email notifications for verification and sharing
- File uploads backed by Supabase storage
- Next.js 15 (App Router) for routing, server components, and API route handlers
- React 19 for UI composition
- TypeScript for type safety across the codebase
- Tailwind CSS v4 and shadcn/ui (Radix primitives) for UI components and styling
- Prisma + PostgreSQL for database access and migrations
- Auth.js (next-auth) with Prisma adapter for session-based auth
- Puck Editor for drag-and-drop form configuration
- TanStack Query for client-side data fetching and caching
- TanStack Table for data tables
- React Hook Form + Zod for form handling and validation
- Resend for transactional email delivery
- Supabase storage for file uploads
- ESLint + Prettier + Husky/lint-staged for code quality
- Docker + Docker Compose for containerized deployment
src/app— routes and API handlers (App Router)src/components— UI and feature componentssrc/features— domain modules (forms, results, profile, puck)src/lib— shared utilities and service clientsdocker/— Dockerfile and compose configuration
- Node.js 20+
- npm
- Docker Desktop (for containerized deployment)
- Make (optional, for
maketargets on Windows via Git Bash)
Create a local .env file at the project root. Required keys used in this project:
DATABASE_URLNEXTAUTH_URLNEXTAUTH_SECRETAUTH_GOOGLE_IDAUTH_GOOGLE_SECRETAUTH_GITHUB_IDAUTH_GITHUB_SECRETSESSION_COOKIE_NAMEAUTH_SECRETRESEND_API_KEYFROM_EMAILSUPABASE_URLSUPABASE_ANON_API_KEYSUPABASE_BUCKETENCRYPTION_KEY
Keep .env out of version control.
npm install
npm run devThe app runs on http://localhost:3003.
The Docker build uses BuildKit secrets for DATABASE_URL to run prisma generate during build.
Build and run with Make:
make build
make up-runtimeCommon targets:
make up # start services
make down # stop services
make logs # follow logs (all services)
make migrate # run Prisma migrations in containerIf you do not have make, use Docker Compose directly:
docker compose -f docker/docker-compose.yml --env-file .env build
docker compose -f docker/docker-compose.yml --env-file .env up -d- Missing env errors during build: ensure
.envexists andDATABASE_URLis set. - BuildKit secrets: Docker Desktop must support BuildKit for build-time secrets.
- Check container logs:
make logsordocker compose ... logs -f app.