Case study · Full-stack product engineering · Multi-tenant SaaS
AI Form Builder Platform
Built a multi-tenant AI form builder SaaS end-to-end: drag-and-drop authoring, multi-step LLM form generation with preview/insert, company workspaces with plan gates, approvals, and analytics, from raw requirements through production delivery and go-live.

Product surfaces
REPRESENTATIVE MOCKUPSIllustrative mockups of the same workflows and capabilities. Client UI is not shown.





Executive summary
Multi-tenant form SaaS owned from raw requirements through architecture, design, implementation, delivery, and go-live: drag-and-drop authoring, multi-step LLM generation, workspace/plan gates, approvals, and analytics.
Sanitized for public use. No product brands, company names, or client identifiers. This is the form-builder product case study, not a healthcare or rebrand write-up.
Not a form library drop-in or a one-shot LLM dump. Production B2B SaaS: workspaces, quotas, a serious builder, reliable structured AI insert, approvals, and measurable usage.
My role
Primary full-stack ownership across the entire engagement lifecycle.
Requirements → flows, constraints, MVP vs later
Written scope, risks, delivery plan
Tenancy, JWT claims, field schema, AI pipeline, analytics events
System beyond a prototype
Auth, dashboard, builder, approvals, company/plans UX
Coherent product surfaces
Next.js + Django, DnD builder, AI insert, gates, analytics
Integrated working product
Env/config, migrations, deploy path, demo readiness
Operable environments
Discovery
What raw requirements looked like
- Teams need to author forms without engineering tickets.
- AI should generate usable fields, not an uneditable blob.
- Multiple companies need isolation, roles, and plan limits.
- Approvals and comments before publish matter for collaboration.
- Usage must be measurable for quotas and KPIs.
How I structured discovery
- Persona map: owner, manager, employee
- Activation funnel: auth → company workspace → plan → unlock builder
- Capability pillars: DnD builder, AI generation, tenancy/plans, approvals, analytics
- Delivery slices: authoring loop first, then AI insert, then gates and ops
Product principles
- AI lands in a real builder: chained prompts → typed fields → preview → editable insert
- Sellable SaaS mechanics: company tenancy, roles, plan limits, JWT claim gating
- Go-live readiness: auth/SMTP, deep links, env config, demo-ready authoring loop
- Ambiguous requirements become personas, an activation funnel, and phased slices
Problem
Buyers do not need another form library or a one-shot LLM dump. They need production B2B SaaS that authors, gates, reviews, and measures forms.
Must become personas, activation funnel, and phased slices
Chained prompts → typed fields → preview → editable insert
Company tenancy, roles, plan limits, JWT claim gating
Auth/SMTP, deep links, env config, demo-ready authoring loop
Goal: Ship assistive AI form authoring that behaves like production multi-tenant SaaS.
Constraints
- Multi-tenant company boundaries for users, forms, and analytics
- Plan quotas for users, forms, submissions, fields, and storage flags
- LLM output must map into a constrained widget catalog
- Builder UX must combine DnD, AI insert, and unsaved navigation guards
- Soft activation gates without a heavyweight BPM engine
- Dual analytics: company event stream plus per-form counters
Solution: five pillars
A sellable form platform organized around five capability pillars.
Drag-and-drop form builder
Authoring canvas with a flexible field schema and a full field lifecycle.
- Widget catalog of ~20 types: inputs, choice, media, layout, HTML
- Canvas UX: DnD place/reorder, edit/delete, required badges
- Per-field JSON styling options (font, color, alignment, type configs)
- Lifecycle: Draft → Published → Archived
- Persistence: bulk create new fields; incremental dirty updates
- Safety / links: unsaved navigation guard; create/share use /builder/[id]
Buyer value: Operators get a serious authoring loop, not a static form template editor.
AI form generation
Multi-step LLM pipeline that ends in preview and editable insert, not a black-box dump.
- Pipeline: user prompt → theme → field schema → HTML preview → insert to builder
- Hallucinated field types constrained to the product catalog vocabulary
- Templates enforce MCQ/dropdown/radio/slider option shapes
- JSON mode maps output into editable canvas components
- Sandboxed HTML preview before insert
Buyer value: AI accelerates authoring while keeping every field reviewable and editable in the canvas.
Workspace & plans
Multi-tenant activation and quotas that make the product sellable.
- Company workspace as the tenant boundary for users, forms, analytics
- Roles: owner / manager / employee
- Team invite/create with email onboarding
- Plans with limits for users, forms, submissions, fields, storage flags
- Activation gate: company → plan → unlock builder/approvals/analytics
- JWT claims: role, company, has_payment_plan for client gating
Buyer value: Soft SaaS activation and plan enforcement without rewriting the product core later.
Approvals & collaboration
Review before publish without a heavyweight BPM engine.
- Approvals list with live field preview
- Comment thread with add/update/delete
- Status transitions: Draft / Published / Archived
- Collaborative review suited to form publish workflows
Buyer value: Teams can gate quality before forms go live without enterprise workflow overhead.
Analytics & operations
Event log plus per-form counters for quotas and KPIs.
- Company event log for add user / submit / view events
- Per-form counters with flexible attribute/value metrics
- Dashboard: team members, form entries, total views, weekly chart
- Event stream supports both quotas and product KPIs
Buyer value: Operators can see usage, enforce plan limits, and prove product value with real metrics.
What shipped
DnD authoring with ~20 widgets, styling options, and publish lifecycle
Multi-step LLM generation with preview and editable insert
Tenant boundary with roles, invites, and plan activation
Live preview, comments, and draft/publish/archive transitions
Team, entries, views, weekly chart, and company event log
JWT claims, SMTP/verification, /builder/[id] share paths
Architecture
Next.js app ── builder, dashboard, gates, React QueryDjango REST API ── auth, companies, forms, AI, analyticsJWT + claims ── role, company, plan flagsOpenAI pipeline ── theme → fields → HTMLData layer ── Postgres-ready; flexible field options JSONPatterns I insisted on
- Enriched JWT gating for role, company, and plan flags
- Bulk/dirty field sync for builder persistence
- Chained LLM stages with catalog-constrained schemas
- Event log for quotas + KPIs alongside per-form counters
- Deep-linked builder URLs for create/share flows
Hard problems I solved
- Flexible field schema: typed widgets + JSON options with order, bulk create, dirty sync
- Reliable structured AI: chained prompts, catalog constraints, preview → editable insert
- Builder UX complexity: DnD + AI insert + save guards as one authoring loop
- Soft SaaS activation: auth → company → plan gates in layout + JWT claims
- Dual analytics model: company event stream for quotas/KPIs + per-form counters
- Tenant/role boundaries: company-scoped team, invites, plan limits at API validation
Delivery & go-live
Environments
- Environment-driven config for local → staging → production
- Migrations and deploy path for API + frontend
- Dockerfiles for operable delivery
Go-live readiness
- Auth/SMTP and signed verification ready for operators
- Deep-linked builder URLs for demos and sharing
- Plan/activation gates validated before unlock
- Demo-ready authoring loop: generate → preview → insert → publish
Delivered as an operable SaaS surface: configuration via env, company/plan admin paths, and a builder loop that can be demoed without engineering in the room.
Outcomes
- End-to-end ownership from ambiguous requirements to go-live
- AI generation that inserts editable, catalog-valid fields into a real builder
- Sellable tenancy with roles, plan limits, and JWT claim gating
- Approvals and analytics that make collaboration and usage measurable
- Architecture ready for production SaaS constraints, not one-off demos
Tech stack
Next.js, React, TypeScript, Tailwind, Zustand, TanStack Query, react-dnd
Django, DRF, SimpleJWT, rest-registration, OpenAI SDK
PostgreSQL-ready; flexible JSON field options
JWT, signed verification, SMTP
Env config, migrations, Dockerfiles
Engagement fit
Best fit
Multi-tenant B2B SaaS, AI + authoring tools, plan-gated products with approvals/analytics
Not a fit
“Just add ChatGPT to our form” with no tenancy, review, or data controls
Got a form product to ship?
Available for remote roles and freelance engagements with US timezone overlap. Happy to walk through architecture decisions and a phased delivery plan.