Skip to main content
Madhukar
Case Study

My Form

AI-Native Conversational Form Builder SaaS

My Form — AI-Native Conversational Form Builder SaaS project screenshot

Project Overview

My Form is a modern, enterprise-grade form builder SaaS designed from the ground up to combine drag-and-drop flexibility with natural language AI generation. Built as a Turborepo monorepo, it features a complete design system, shared package architecture, and end-to-end type safety. Users can create, customize, and publish conversational, Typeform-style forms, analyze responses via a real-time dashboard, and leverage advanced AI agents to draft forms or summarize user submissions.

System Architecture

The platform is built within a Turborepo monorepo containing 2 applications (the main dashboard client and the form runner client) and 7 shared packages (database schema, UI components, shared configurations, API client, and authentication utilities). Communication relies on tRPC v11 to guarantee absolute, compile-time type safety across the stack. The backend leverages PostgreSQL powered by Drizzle ORM, with Redis serving as a caching layer and rate limiter.

AI Capabilities Deep Dive

My Form integrates three core AI systems built on top of the Vercel AI SDK: • **Natural-Language Form Generation:** Users describe the form they want (e.g., "A customer feedback form for a coffee shop with dynamic rating scales"), and the AI compiles, structures, and creates the form JSON in real-time. • **Conversational Agent:** While a user is filling out a form, a custom-trained model can ask streaming follow-up questions to drill down on interesting or incomplete answers. • **AI Response Summaries:** Form owners can generate semantic summaries and reports of incoming submissions, highlighting key trends and sentiments without reading every entry individually.

Key Engineering Achievements

• **Type Safety:** 100% type-safe endpoints using Zod schema validation and tRPC v11, eliminating API communication bugs. • **Conversational Runner:** Built a stateful, high-performance conversational form runner with 5 built-in animations and themed presets for an engaging Typeform-like user experience. • **Advanced Security:** Developed a custom authentication system from scratch featuring JWT access tokens, HTTP-only refresh tokens with automatic token rotation, and reuse detection.

Engineering Challenges & Solutions

P

Challenge

Performance bottlenecks in the drag-and-drop designer when editing large forms with complex conditional logic.

S

Solution

Optimized rendering cycles by migrating state management to a specialized zustand store, memoizing interactive elements, and implementing windowing for form lists with thousands of items.

P

Challenge

Type safety maintenance in a multi-application monorepo when sharing PostgreSQL schemas across services.

S

Solution

Configured a shared `@repo/db` package compiling schema definitions via Drizzle ORM, exposing custom zod validation schemas that automatically sync into the tRPC backend.

Technologies Used

TypeScriptNext.js 16React 19tRPC v11ZodDrizzle ORMPostgreSQLRedisVercel AI SDKTurborepo

Key Metrics & Results

  • Successfully handles sub-100ms response times for the conversational runner due to aggressive caching.
  • Achieved zero runtime API schema exceptions thanks to end-to-end tRPC validation.
  • Generated over 1,000+ AI-assisted forms during local testing environments.