How jayesh-2404/formai works
AI Form Builder turns a user’s description into a saved form, which can then be customized, previewed, shared, and used to collect submissions. The dashboard also supports form management, response viewing/export, and analytics; the landing page presents plans and upgrade options. The excerpts show generation, editing, live rendering, and persistence. Response export, analytics details, and plan upgrades are README-documented capabilities whose implementation is not shown in the sampled source.
Main entry points: schema.js Form data store · FormUi.jsx Form renderer · page.jsx Form editor · Controller.jsx Style controls
Components 22
Entry and accounts
- Landing page
app/page.js - Sign in/up
app/(auth)/sign-in/[[...sign-in]]/page.jsx - Clerk auth
Form authoring
- AI generation
actions/generateAiForm.js - Gemini AI
- Form editor
app/edit_form/[formId]/page.jsx - Form renderer
app/edit_form/_components/FormUi.jsx - Field editing
app/edit_form/_components/FieldEdit.jsx - Style controls
app/edit_form/_components/Controller.jsx - Theme options
app/_data/Themes.jsx - Background options
app/_data/GradientBg.jsx - Form styles
app/_data/Style.jsx
Sharing and responses
- Shared form page
app/aiform/[formid]/page.jsx - Response submissions
app/edit_form/_components/FormUi.jsx - Form data store
configs/schema.js - Neon/Drizzle client
configs/index.js
Dashboard and plans
- Forms dashboard
app/dashboard/page.jsx - Form list
app/dashboard/_components/FormList.jsx - Response viewing/export
app/dashboard/responses/page.jsx - Form analytics
app/dashboard/analytics/page.jsx - Plans and upgrades
app/_components/landing/PricingSection.jsx
Other components
- Form builder user
Connections 27
- Form builder user → Landing page: browses
- Form builder user → Sign in/up: signs in
- Sign in/up → Clerk auth: authenticates with
- Form builder user → Forms dashboard: manages forms
- Forms dashboard → AI generation: requests generation
app/dashboard/page.jsx - AI generation → Gemini AI: requests JSON
actions/generateAiForm.js - AI generation → Form data store: saves form
actions/generateAiForm.js - Forms dashboard → Form list: renders
app/dashboard/page.jsx - Form builder user → Form editor: customizes form
- Form editor → Form renderer: renders editor
app/edit_form/[formId]/page.jsx - Form editor → Style controls: configures style
app/edit_form/[formId]/page.jsx - Form renderer → Field editing: renders field editor
app/edit_form/_components/FormUi.jsx - Style controls → Theme options: uses themes
app/edit_form/_components/Controller.jsx - Style controls → Background options: uses backgrounds
app/edit_form/_components/Controller.jsx - Style controls → Form styles: uses styles
app/edit_form/_components/Controller.jsx - Form editor → Form data store: reads and updates
app/edit_form/[formId]/page.jsx - Form builder user → Shared form page: opens shared link
- Shared form page → Form data store: loads form
app/aiform/[formid]/page.jsx - Shared form page → Form renderer: renders live form
app/aiform/[formid]/page.jsx - Form builder user → Form renderer: submits answers
- Form renderer → Form data store: stores response
app/edit_form/_components/FormUi.jsx - Form builder user → Response viewing/export: views responses
- Response viewing/export → Form data store: reads responses
app/dashboard/responses/page.jsx - Form builder user → Form analytics: views analytics
- Form analytics → Form data store: queries form data
app/dashboard/analytics/page.jsx - Form builder user → Plans and upgrades: reviews plans
- Neon/Drizzle client → Form data store: maps schema
configs/index.js