Open Source & Contributing
FormSCN is community-driven. We'd love your help to make form building easier for everyone.
Getting Started
1. Setup the Project
FormSCN is a monorepo managed by Turborepo.
- Fork & Clone:
git clone https://github.com/AbdullahMukadam/formscn.git cd formcn - Install Dependencies:
pnpm install - Run Development Server:
This starts the web app atpnpm devhttp://localhost:3001.
Project Structure
apps/web: The main Next.js application containing the visual builder, documentation, and the registry source.apps/web/src/registry/default: The core of the registry.templates/: Definition files for form templates (e.g.,login.ts,onboarding-wizard.ts)lib/form-generator/: Code generation logic for React Hook Form and TanStack Formui/: Reusable UI components used within templates
Current Features
FormSCN now supports:
- React Hook Form and TanStack Form code generation
- shadcn Dependencies Detection - auto-detect required components
- Optional Better Auth - auth features are completely optional
- Form Library Selector - toggle between RHF and TanStack in the editor
- Welcome Modal - onboarding for first-time users
- 20+ Templates - categorized by use case
Roadmap & Areas for Contribution
We are actively looking for help with:
- Conditional Logic: Adding
if/thenbranching to the visual builder and schema generator - Drag-and-Drop Step Reordering: Improving the UX for multi-step form management
- AI Integration: Generating form schemas from text prompts
- New Templates: Adding more complex real-world forms (e.g., KYC, Medical Intake, Survey Forms)
- New Field Types: File upload improvements, rich text editor, phone input with country codes
- Validation Enhancements: Cross-field validation, custom validation rules
- Theme System: More theme presets and customization options
- Framework Support: SolidStart, SvelteKit generators
Common Tasks
Adding a New Template
The easiest way to contribute a new template is to build it visually first.
-
Build Visually: Open the Visual Builder locally. Build your form (fields, steps, validation).
-
Export Configuration: Use the developer tools or console to inspect the form state, or look at how
useFormEditorsaves the state. We are working on a "Export to JSON" feature for contributors.Currently, you can manually create the template definition file based on your design.
-
Create Template File: Create a new file in
apps/web/src/registry/default/templates/(e.g.,medical-intake.ts).import type { FormTemplate } from "../types"; export const medicalIntake: FormTemplate = { id: "medical-intake", name: "Medical Intake", description: "Patient registration and medical history form.", category: "healthcare", // authentication | contact | ecommerce | profile fields: [ // ... your fields here ], // Auth is optional - only add if your template needs it // oauthProviders: [], // authPlugins: {}, }; -
Register the Template: Add it to
apps/web/src/registry/default/templates/index.ts. -
Build Registry: Run
pnpm --filter web registry:buildto generate the artifacts.
Improving the Generator
If you want to improve the code generation logic:
For React Hook Form:
- Edit files in
apps/web/src/registry/default/lib/form-generator/generators/ - Test your changes by running the visual builder and checking the "Code" tab
- Run
pnpm --filter web registry:buildto update the generator artifacts
For TanStack Form:
- Edit files in
apps/web/src/registry/default/lib/form-generator/generators/tanstack/ - Both generators should produce equivalent functionality
Adding a New Field Type
- Add the field configuration to
apps/web/src/lib/form-fields-config.ts - Update the generator to handle the new field type
- Add the field to the form builder sidebar
- Test in both RHF and TanStack Form modes
Code Style
- TypeScript: All code must be type-safe
- shadcn/ui: Use standard shadcn components
- Accessibility: Ensure keyboard navigation and screen reader support
- Comments: Add JSDoc for public APIs
Submitting Changes
- Create a branch for your feature (
git checkout -b feature/amazing-form) - Commit your changes with clear messages
- Push to your fork and submit a Pull Request
- Include screenshots/videos for UI changes
Community
- GitHub Issues: Bug reports and feature requests
- Pull Requests: Code contributions
- Discussions: Questions and ideas
We appreciate all contributions!