Skip to content
teo@dev:~$
cd ../projects

project 01/03

Formify.

A form builder: one-question-at-a-time forms, endpoints any HTML form can post to, and delivery of every response to email, Slack, Sheets or a signed webhook. Pre-launch.

role
Solo · design and full-stack
period
2026 — now
category
Web
status
In progress
formify.cc (waitlist)

Private repository. Happy to walk through it on a call.

// overview

Formify is a form builder for individuals and small teams. Forms run one question at a time with logic and themes, and any existing HTML or React form can post to a Formify endpoint instead. Every response is stored and delivered to email, Slack, Discord, Telegram, Google Sheets or a signed webhook. Paid plans run on Stripe subscriptions.

  • Next.js 16
  • TypeScript
  • PostgreSQL
  • Drizzle ORM
  • Better Auth
  • Stripe
  • Resend
  • Cloudflare R2
  • Vitest
  • Playwright
  • Docker

// problem

A form builder is mostly plumbing. Submissions arrive from sites you don't control, at the same moment, from bots as well as people. Each one has to be counted against a plan, stored once, and delivered to services that are sometimes down, without a slow Google API call holding up the next submission.

// approach

  1. 01

    Draft, then publish

    The editor autosaves a JSON draft with a revision counter. Publishing copies it into an immutable version. The logic engine is a pure function: the browser runs it to pick the next question, the server runs it again on submit, and the server's answer is what gets stored.

  2. 02

    Accept posts from anywhere

    Each endpoint request passes an origin allowlist or a hashed API key, rate limits kept in Postgres (5 a minute and 50 a day per IP), a honeypot and validation, then lands in one transaction. Delivery starts after the reply is sent.

  3. 03

    Deliver through an outbox

    Every response, channel and target is a row. Workers claim rows with FOR UPDATE SKIP LOCKED and a 2-minute lease, so a crashed worker's rows come back on their own. Failures retry from 1 minute up to 12 hours. Webhooks are signed with HMAC-SHA256 over a timestamp and the body.

  4. 04

    Keep plan limits exact

    Usage counters only increment while under the limit, so two submissions at the same instant can't both slip past it. Responses over the limit are held, not dropped, and a downgrade pauses forms instead of deleting anything.

  5. 05

    Don't trust webhook URLs

    A URL is checked when it's saved and again when the socket connects, so a DNS change can't point a webhook at an internal address.

// highlights

  • About 1,140 Vitest tests, many against a real Postgres, with property-based tests for the logic engine
  • About 110 Playwright tests, including a second site that posts cross-origin
  • A late autosave can't overwrite newer answers: saves only land with a higher sequence number
  • Billing periods match Stripe's, so a plan started on Jan 31 renews on Feb 28, then Mar 31

// what I learned

  • Postgres handled the queue, the rate limits and the locks. I didn't need another service for any of them.
  • The bugs worth writing tests for were the concurrent ones: two requests, same row, same millisecond.