HeyForm

Open-source conversational form builder with AI generation, conditional logic, and 30+ integrations — self-host with full data ownership.

8.9Kstars
686forks
GNU AGPLv3
TypeScript

HeyForm is an open-source form builder designed for small businesses, marketers, and product teams who need to collect data through interactive conversational forms without relying on expensive SaaS platforms. It eliminates vendor lock-in and data privacy concerns by offering a fully self-hostable alternative to tools like Typeform and SurveyMonkey, built on a modern TypeScript monorepo stack with React and NestJS.

The platform ships with an AI-powered form generation feature that accepts plain-language prompts and produces complete, structured forms in seconds — including field types, conditional logic, and branching. This makes it accessible for non-technical users while remaining fully programmable for developers who want to extend it via webhooks and APIs.

HeyForm’s architecture separates the form rendering engine into a standalone, versioned React package that powers the builder, the embedded widget, the live preview, and the submission endpoint from a single source of truth. This means form logic defined once in the builder is enforced consistently everywhere the form appears, with no risk of rendering drift.

Deployment is flexible: one-click options on Railway, Zeabur, Sealos, and Alibaba Cloud lower the barrier for teams without DevOps resources, while a standard Docker Compose setup with MongoDB and KeyDB (Redis-compatible) covers production self-hosting for those who want full infrastructure control.

What You Get

  • AI-Powered Form Generation - Describe your form in plain language and receive a fully structured, field-complete form with conditional logic applied, eliminating hours of manual configuration.
  • Conditional Logic & Multi-Branch Endings - Route respondents dynamically based on their answers, show or hide questions in real time, and deliver different thank-you messages or URL redirects per path.
  • Customizable Visual Themes - Brand every form with custom fonts, colors, backgrounds, and layout options, including raw CSS injection for pixel-perfect control over form appearance.
  • Multi-Device Responsive Rendering - The standalone form renderer package automatically adapts layouts for mobile, tablet, and desktop without manual breakpoint configuration.
  • Built-in Analytics Dashboard - Track submission counts, completion rates, and question-level drop-off in real time to identify and fix friction points in your forms.
  • CSV Export & Webhook Delivery - Export every submission to CSV for offline analysis and push response payloads to external systems via webhook on each submission event.
  • 30+ Native Integrations - Connect directly to Google Sheets, Airtable, Stripe, Mailchimp, Notion, Slack, HubSpot, Google Analytics, and Zapier without custom middleware.
  • Stripe Payment Collection - Accept form-embedded payments via Stripe Connect, routing funds directly to your account without involving HeyForm as an intermediary.
  • One-Click Cloud Deployments - Pre-configured templates for Railway, Zeabur, Sealos, RepoCloud, and Alibaba Cloud enable production deployments without writing infrastructure code.
  • Self-Hosted AI with Custom LLM Endpoints - Configure the AI form generator to use any OpenAI-compatible API endpoint, enabling fully private AI-assisted form creation on self-hosted LLMs.

Common Use Cases

  • Collecting paid event registrations - A community organizer builds a registration form with Stripe Connect embedded, collecting both attendee information and ticket payment in a single conversational flow, with responses synced to Google Sheets.
  • Running post-onboarding user research - A SaaS team embeds a HeyForm survey at a key product milestone, using conditional logic to branch into detailed follow-up questions only for users who report low satisfaction scores.
  • Processing job applications without an ATS - An HR team builds a multi-page job application form with file upload for resumes, email confirmation via SMTP, and automatic syncing of candidate data to Airtable for review.
  • Building GDPR-compliant lead capture forms - A European B2B company self-hosts HeyForm to collect sales leads with legally required consent checkboxes, keeping all submission data within their own MongoDB instance.
  • Automating customer feedback loops - An e-commerce operator triggers a post-purchase feedback form via webhook, uses conditional logic to identify dissatisfied customers, and routes those responses to a Slack channel for immediate review.

Under The Hood

Architecture HeyForm is organized as a TypeScript monorepo with cleanly bounded packages for the NestJS backend server, React frontend webapp, form renderer library, shared type definitions, and embed script. The backend separates HTTP controllers, GraphQL resolvers, domain services, Bull queue processors, and scheduled tasks into distinct layers, with NestJS dependency injection wiring them together. Async workloads — including email delivery, integration triggers, form translation, and submission notifications — are decoupled from request handling via named Bull queues backed by KeyDB. Guards enforce authentication, device identity, and permission checks at the resolver boundary before any service logic executes, keeping authorization concerns out of the service layer entirely.

Tech Stack The backend runs NestJS with Express and TypeScript, exposing a GraphQL API via Apollo Server 4. MongoDB (Percona distribution) stores all form definitions, submissions, teams, and integrations as documents, while KeyDB (a Redis-compatible store) handles caching, session data, and Bull queue persistence. The React 19 frontend communicates with the server via Apollo Client, with Zustand and MobX managing local state for the builder and workspace pages. Vite with the SWC plugin handles frontend bundling. Stripe Connect is integrated directly for payment collection, and an OpenAI SDK integration drives AI form generation — configurable to point at any OpenAI-compatible base URL for self-hosted LLM support. Docker multi-stage builds produce production images that bundle the compiled server and pre-built frontend static assets together.

Code Quality The project maintains a comprehensive two-tier test suite: unit-style tests covering form schema sanitization, permission guard logic, CORS enforcement, OAuth state handling, and outbound URL filtering, alongside a full e2e suite with thirteen test files covering authentication flows, input validation, rate limiting, permission matrices, team management, and static file upload. TypeScript is enforced across all packages with shared interfaces in the shared-types-enums package ensuring type consistency between client and server boundaries. Oxlint provides linting with pre-commit enforcement via simple-git-hooks. A global NestJS exception filter catches unhandled errors at the application boundary, and validation pipes reject malformed inputs at every resolver entry point. The service layer occasionally has broad cross-service references, but the consistent use of dependency injection keeps coupling explicit.

What Makes It Unique HeyForm’s most architecturally distinctive feature is its decoupled form renderer: a separately versioned React package that consumes the shared type schema to power the visual builder, embedded widget, live preview, and submission endpoint from a single implementation. Form field logic defined once propagates to every rendering context without duplication or divergence. The AI generation feature is wired into the NestJS service layer with a configurable base URL, making it compatible with locally hosted models for teams that cannot send form data to external AI providers. Stripe Connect integration enables direct form-level payment collection without routing funds through HeyForm as a financial intermediary — a meaningful distinction from hosted competitors.

Self-Hosting

HeyForm is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This is a strong copyleft license with a network use clause: if you run a modified version of HeyForm as a web service, you are required to make the modified source code available to users of that service. For internal use — running HeyForm within your own organization to collect data from your own employees or customers — AGPL-3.0 imposes no restriction on your ability to deploy and modify the software. If you plan to offer HeyForm as a managed service to external customers, you would need to either release your modifications as open source or negotiate a commercial license with the maintainers.

Operationally, self-hosting HeyForm requires managing three infrastructure components: a Node.js application server (containerized via Docker), a MongoDB-compatible database for persistent storage, and a Redis-compatible store (KeyDB is used in the reference Docker Compose stack) for caching and background job queues. You are responsible for database backups, scaling the Node.js layer under load, handling MongoDB replica sets if you need high availability, and maintaining SMTP configuration for transactional emails. File uploads are stored locally on the server filesystem by default, with S3-compatible storage available for distributed deployments. Initial setup is straightforward via the provided Docker Compose configuration, but ongoing operational burden — including patching, certificate management, and capacity planning — falls entirely on your team.

Compared to the hosted HeyForm cloud service at my.heyform.net, self-hosting means you forgo automatic platform upgrades, managed database backups, built-in redundancy, and first-party support. The hosted tier handles infrastructure complexity and provides the assurance of uptime managed by the core team. The self-hosted path is best suited to teams with existing DevOps capacity who require data residency, GDPR compliance within their own infrastructure, or the ability to point the AI form generation feature at a private LLM endpoint.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search