Skip to content

pansani/openformy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenFormy

Open-source form builder inspired by Typeform - beautiful, conversational forms made simple.

License: MIT Built with Go Built with React


About OpenFormy

OpenFormy is a modern, open-source alternative to Typeform and Google Forms. Built on the powerful Pagode framework, it combines the speed and type-safety of Go with the flexibility of React to deliver beautiful, engaging forms.

Key Features

  • 🎨 Conversational & Traditional Modes - Choose between one-question-at-a-time (Typeform-style) or traditional multi-field forms
  • 🎨 Auto Brand Color Extraction - Automatically extract and apply your brand colors from any website URL
  • ⚑ Lightning Fast - Built on Go + Echo for blazing-fast performance
  • πŸ” Secure by Default - Session-based authentication, CSRF protection, rate limiting
  • πŸ“Š Response Analytics - View, filter, and analyze form submissions with ease
  • 🎯 Rich Question Types - Text, email, number, dropdown, checkboxes, date, file upload, and more
  • 🌐 Public Sharing - Share forms via unique URLs with published/draft status control
  • πŸ’Ύ Simple Database - SQLite for easy setup and portability
  • 🎭 Auto-Generated Admin Panel - Manage all entities through built-in admin interface
  • πŸ”„ Hot Reload Development - Fast development workflow with Air

Tech Stack

Backend:

  • Go 1.24 with Echo v4 web framework
  • Ent ORM for type-safe database operations
  • SQLite with WAL mode for concurrent access
  • InertiaJS for seamless frontend-backend communication

Frontend:

  • React 19 with TypeScript
  • Tailwind CSS v4 for styling
  • shadcn/ui component library
  • Vite for blazing-fast builds

Quick Start

Prerequisites

  • Go 1.24+
  • Node.js 18+
  • Make (optional but recommended)

Installation

# Clone the repository
git clone https://github.com/pansani/openformy.git
cd openformy

# Install backend dependencies
go mod download

# Install frontend dependencies
npm install

# Generate Ent code
make ent-gen

# Run the application
make run

The application will be available at http://localhost:8000

Development with Hot Reload

# Install Air (Go hot reload)
make air-install

# Start with hot reload
make watch

Usage

Creating Your First Form

  1. Register an account at /user/register
  2. Create a form - Click "New Form" from the dashboard
  3. Add questions - Drag question types from the sidebar
  4. Choose display mode - Toggle between Conversational and Traditional
  5. Publish - Toggle the Published switch
  6. Share - Copy the public form URL and share it

Display Modes

Traditional Mode:

  • All questions visible on one page
  • Faster for short forms
  • Familiar user experience

Conversational Mode:

  • One question at a time
  • Typeform-style experience
  • More engaging for users
  • Progress indicator and keyboard navigation

Documentation

OpenFormy is built on Pagode, a full-stack Go + React starter kit. For detailed documentation on the underlying framework:

Project-Specific Documentation

  • CLAUDE.md - Development guide and architecture notes
  • DEPLOYMENT.md - Production deployment guide for Coolify

Development Commands

# Run the application
make run

# Hot reload development
make watch

# Run tests
make test

# Generate Ent code (after schema changes)
make ent-gen

# Create new Ent entity
make ent-new name=EntityName

# Create admin user
make admin [email protected]

Project Structure

openformy/
β”œβ”€β”€ cmd/                    # Application entry points
β”‚   β”œβ”€β”€ web/               # Main web application
β”‚   └── admin/             # Admin CLI tools
β”œβ”€β”€ pkg/
β”‚   β”œβ”€β”€ handlers/          # HTTP request handlers
β”‚   β”œβ”€β”€ middleware/        # Custom middleware
β”‚   β”œβ”€β”€ services/          # Business logic & service container
β”‚   └── routenames/        # Route name constants
β”œβ”€β”€ ent/
β”‚   └── schema/            # Database entity schemas
β”œβ”€β”€ resources/
β”‚   └── js/
β”‚       β”œβ”€β”€ Pages/         # InertiaJS page components
β”‚       β”œβ”€β”€ components/    # Reusable React components
β”‚       β”œβ”€β”€ hooks/         # Custom React hooks
β”‚       └── types/         # TypeScript type definitions
β”œβ”€β”€ config/                # Configuration files
└── static/                # Static assets

Testing

# Run all Go tests
make test

# Run E2E tests with Playwright
npx playwright test

# Run E2E tests in headed mode
npx playwright test --headed

# Run specific E2E test file
npx playwright test e2e/forms.spec.ts

# Run specific Go test
go test ./pkg/handlers -run TestForms

Deployment

Deploy OpenFormy to production using Coolify with automatic Nixpacks builds.

Quick Deploy to Coolify

  1. Connect your Git repository to Coolify
  2. Nixpacks will auto-detect and configure the build
  3. Set required environment variables (see table below)
  4. Deploy!

Required Environment Variables

Variable Description Example
PAGODA_APP_ENVIRONMENT Set to production production
PAGODA_APP_HOST Your public URL https://forms.yourdomain.com
PAGODA_APP_ENCRYPTIONKEY 32+ char secret Generate with openssl rand -base64 32

Optional Environment Variables

Variable Description
PAGODA_DATABASE_CONNECTION Database path (SQLite) or connection string (MySQL)
PAGODA_OPENAI_APIKEY For AI features
PAGODA_PAYMENT_STRIPE_SECRETKEY For payment features
PAGODA_MAIL_* For email functionality

πŸ“– Full Deployment Guide - Detailed instructions, database setup, troubleshooting, and more.


Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is open source and available under the MIT License.


Credits

OpenFormy is built with and inspired by many amazing open-source projects:

Core Framework

  • Pagode - Full-stack Go + React starter kit

Backend

  • Go - Programming language
  • Echo - Web framework
  • Ent - Entity framework & ORM
  • SQLite - Database
  • Air - Hot reload
  • Backlite - Background job processing
  • Viper - Configuration management

Frontend

Inspiration


Support


Built with ❀️ using Pagode

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages