A modern, wizard-style form builder application that allows users to create, customize, and preview forms with comprehensive theming options and an intuitive drag-and-drop interface.
- Step 1 - Build: Drag-and-drop form creation with component palette and properties panel
- Step 2 - Style: Choose from 9 robust and modern form themes
- Step 3 - Preview: Final form preview with theme rendering and save functionality
- Text Input: Standard text fields with validation
- Email Input: Email-specific validation and formatting
- Number Input: Three variants (Number, Phone Number, Currency) with real-time formatting
- Textarea: Multi-line text input with configurable rows
- Select Dropdown: HeadlessUI-powered with theme-specific styling
- Checkbox Groups: Multi-select options with themed styling
- Radio Groups: Single-select options with custom theming
- Rate Scale: 1-10 rating with unique emoji progression
- Boolean Switch: Three variants (Yes/No, True/False, On/Off)
- Full Name: Side-by-side First Name and Last Name fields
- Minimal: Clean, simple design with subtle borders
- Modern: Glassmorphism effects with backdrop blur
- Professional: Corporate styling with bold typography
- Playful: Colorful design with rounded corners
- Elegant: Dark theme with sophisticated styling
- Neon: Cyberpunk-inspired with glowing effects
- Nature: Earth tones with organic shapes
- Luxury: Premium design with rich colors and serif fonts
- Retro: Vintage 80s style with bold geometric patterns
- Drag & Drop: Intuitive component placement with visual feedback
- Real-time Preview: Live form updates as you build
- Theme-Aware Components: All elements adapt to selected themes
- Field Validation: Required fields, min/max values, character limits
- Responsive Design: Mobile-first approach with touch-friendly interactions
- Form Data Preview: JSON output with email-style formatting
- Progress Tracking: Real-time form completion indicators
- React 18 with TypeScript
- Vite for fast development and optimized builds
- Tailwind CSS with shadcn/ui component library
- @dnd-kit for drag-and-drop functionality
- HeadlessUI for accessible form components
- TanStack Query for server state management
- Wouter for lightweight routing
- Node.js with Express.js
- TypeScript with ES modules
- PostgreSQL with Drizzle ORM
- Neon Database (serverless PostgreSQL)
- Session Management with PostgreSQL storage
- Node.js 18+ installed
- PostgreSQL database (or Neon account)
-
Clone the repository
git clone <repository-url> cd form-builder
-
Install dependencies
npm install
-
Set up environment variables Create a
.envfile with:DATABASE_URL=your_postgresql_connection_string -
Run database migrations
npm run db:push
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5000
βββ client/ # Frontend React application
β βββ src/
β β βββ components/
β β β βββ form-builder/ # Form builder core components
β β β βββ ui/ # Reusable UI components
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility functions
β β βββ pages/ # Application pages
β β βββ types/ # TypeScript type definitions
β βββ index.html
βββ server/ # Backend Express server
β βββ index.ts # Server entry point
β βββ routes.ts # API routes
β βββ storage.ts # Database storage interface
βββ shared/ # Shared types and schemas
β βββ schema.ts # Database schema and validation
βββ README.md
The application features 9 comprehensive themes, each with unique styling:
- Colors: Custom color palettes for each theme
- Typography: Theme-specific fonts (sans-serif, serif, mono)
- Borders: Varied border styles and radii
- Effects: Glassmorphism, shadows, glows, and gradients
- Animations: Smooth transitions and hover effects
- Base theme styles defined in TypeScript
- CSS-in-JS approach for dynamic theming
- Component-level theme application
- Consistent styling across all form elements
POST /api/forms
Content-Type: application/json
{
"title": "Contact Form",
"elements": [...],
"theme": "modern",
"settings": {...}
}GET /api/formsGET /api/forms/:idPUT /api/forms/:id
Content-Type: application/json
{
"title": "Updated Form",
"elements": [...],
"theme": "professional"
}npm run devnpm run build
npm startDATABASE_URL: PostgreSQL connection stringNODE_ENV: Environment (development/production)PORT: Server port (default: 5000)
The application includes comprehensive drag-and-drop compatibility testing:
- Touch Support: Mobile device compatibility
- Mouse Support: Desktop interaction testing
- Browser Compatibility: Cross-browser drag functionality
- Performance Testing: Drag operation efficiency
- Event System: Proper event handling validation
- Touch-Friendly: Large touch targets for mobile devices
- Responsive Layout: Adaptive design for all screen sizes
- Mobile Gestures: Touch-based drag and drop
- Floating Action Button: Easy component addition on mobile
- Optimized Interactions: Mobile-first design approach
- Input Validation: Zod schema validation on client and server
- SQL Injection Protection: Parameterized queries with Drizzle ORM
- Session Management: Secure PostgreSQL-based sessions
- CORS Configuration: Proper cross-origin resource sharing
- Environment Variables: Sensitive data protection
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- shadcn/ui for the beautiful component library
- HeadlessUI for accessible form components
- Tailwind CSS for utility-first styling
- Radix UI for primitive components
- Drizzle ORM for type-safe database operations
For support, email support@formbuilder.com or create an issue in the repository.
Built with β€οΈ using React, TypeScript, and modern web technologies