Skip to content

🎯 Zero-cost contact forms for landing pages using GitHub Issues as free database. Open-source alternative to Typeform/Tally/FormSpree. Next.js 14, TypeScript, Tailwind CSS. €0/month.

License

Notifications You must be signed in to change notification settings

Luigigreco/gitforms

Repository files navigation

GitForms

Zero-cost contact forms for your landing page - powered by GitHub Issues.

Every time someone submits your contact form, you receive an automatic email notification. No monthly fees, no external database.

GitForms = Free alternative to Typeform, Tally, and FormSpree

Features

  • βœ… 100% Configurable without code (JSON files)
  • βœ… Automatic email notifications for every submission
  • βœ… Multilingual (IT/EN) with auto browser language detection
  • βœ… Customizable styling (colors, borders, shadows)
  • βœ… Customizable text (labels, messages, buttons)
  • βœ… Next.js 14 with App Router
  • βœ… TypeScript
  • βœ… Tailwind CSS
  • βœ… Deploy anywhere (Vercel, Netlify, Railway, Docker, AWS...)
  • βœ… Completely free

How It Works

User fills form β†’ Data saved to GitHub Issue β†’ Email notification sent

Quick Setup

# 1. Clone
git clone https://github.com/Luigigreco/gitforms.git
cd gitforms

# 2. Install
npm install

# 3. Configure
cp .env.example .env.local
# Edit .env.local with your GITHUB_TOKEN and GITHUB_REPO

# 4. Start
npm run dev

Open http://localhost:3000

🎨 Customization (ZERO Code!)

1. Change All Colors

File: config/theme.json

{
  "colors": {
    "primary": {
      "DEFAULT": "#10b981",  // Green instead of blue
      "hover": "#059669",
      "ring": "#34d399"
    }
  }
}

Popular colors:

  • Purple: #8b5cf6, #7c3aed, #a78bfa
  • Orange: #f97316, #ea580c, #fb923c
  • Pink: #ec4899, #db2777, #f472b6

2. Change All Text

File: config/translations.json

{
  "it": {
    "title": "Richiedi Informazioni",  // Change "Contattaci"
    "fields": {
      "company": "SocietΓ "  // Change "Azienda" to "SocietΓ "
    },
    "buttons": {
      "submit": "Richiedi Contatto"  // Change button
    }
  }
}

3. Change Default Language

File: .env.local

NEXT_PUBLIC_DEFAULT_LOCALE=it   # Force Italian
# or
NEXT_PUBLIC_DEFAULT_LOCALE=en   # Force English
# or remove for auto-detection

4. Add New Language (e.g., French)

File: config/translations.json

{
  "it": { ... },
  "en": { ... },
  "fr": {
    "title": "Contactez-nous",
    "subtitle": "Remplissez le formulaire...",
    "fields": {
      "firstName": "PrΓ©nom",
      "lastName": "Nom",
      "email": "Email",
      "company": "Entreprise",
      "message": "Message"
    }
  }
}

Then update src/app/translations.ts:

export type Locale = 'it' | 'en' | 'fr'

πŸ“ Configuration Files

File What You Configure
config/theme.json Colors, borders, shadows, styling
config/translations.json ALL text (title, fields, messages, buttons)
.env.local GitHub token, repo, default language

Edit only these 3 files = complete customization!

Form Fields

All fields are required:

  • First Name
  • Last Name
  • Email
  • Company
  • Message

Test

curl -X POST http://localhost:3000/api/contact \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Mario",
    "lastName": "Rossi",
    "email": "mario@example.com",
    "company": "ACME",
    "message": "Ciao"
  }'

πŸš€ Deploy Options

1. Vercel (Recommended) ⚑

Easiest for Next.js - 2 clicks, zero configuration.

# Install Vercel CLI (optional)
npm i -g vercel

# Deploy
vercel

Or via Dashboard:

  1. Push to GitHub
  2. Import on vercel.com
  3. Add environment variables:
    • GITHUB_TOKEN
    • GITHUB_REPO
    • NEXT_PUBLIC_DEFAULT_LOCALE (optional)
  4. Auto deploy!

Free Tier: Unlimited for personal projects


2. Netlify

Great Vercel alternative - 2 clicks, great free tier.

  1. Push to GitHub
  2. Import on netlify.com
  3. Build settings:
    • Build command: npm run build
    • Publish directory: .next
  4. Environment variables:
    • GITHUB_TOKEN
    • GITHUB_REPO
    • NEXT_PUBLIC_DEFAULT_LOCALE (optional)
  5. Deploy!

Free Tier: 100GB bandwidth/month


3. Railway

Fast deploy with included databases - 3 clicks, good free tier.

  1. Push to GitHub
  2. Go to railway.app
  3. New Project β†’ Deploy from GitHub
  4. Add environment variables (Dashboard β†’ Variables)
  5. Railway auto-detects Next.js and deploys

Free Tier: $5 credit/month (~500h runtime)


4. Render.com

Alternative with free tier - Auto-sleep after inactivity.

  1. Push to GitHub
  2. New Web Service on render.com
  3. Connect repository
  4. Settings:
    • Build Command: npm install && npm run build
    • Start Command: npm start
  5. Environment variables:
    • GITHUB_TOKEN
    • GITHUB_REPO

Free Tier: Unlimited (with auto-sleep)


5. Docker / Self-Hosted 🐳

Full control - Deploy on any VPS/cloud.

# Build
docker build -t gitforms .

# Run
docker run -p 3000:3000 \
  -e GITHUB_TOKEN=your_token \
  -e GITHUB_REPO=your_repo \
  gitforms

With Docker Compose:

# docker-compose.yml
version: '3.8'
services:
  app:
    build: .
    ports:
      - "3000:3000"
    environment:
      - GITHUB_TOKEN=${GITHUB_TOKEN}
      - GITHUB_REPO=${GITHUB_REPO}
      - NEXT_PUBLIC_DEFAULT_LOCALE=it
    restart: unless-stopped
docker-compose up -d

Cost: VPS from €5/month (DigitalOcean, Hetzner, Linode)


6. AWS Amplify

Enterprise deployment - Auto-scaling, global CDN.

  1. Push to GitHub
  2. AWS Console β†’ Amplify β†’ New App
  3. Connect repository
  4. Build settings (auto-detected):
    version: 1
    frontend:
      phases:
        preBuild:
          commands:
            - npm install
        build:
          commands:
            - npm run build
      artifacts:
        baseDirectory: .next
        files:
          - '**/*'
      cache:
        paths:
          - node_modules/**/*
  5. Environment variables:
    • GITHUB_TOKEN
    • GITHUB_REPO

Free Tier: 1000 build minutes/month, 15GB storage


πŸ’° Costs

Platform Free Tier Paid Cost
GitHub (storage) βœ… Unlimited €0
GitHub (email) βœ… Unlimited €0
Vercel βœ… Unlimited (personal) €20/month (team)
Netlify βœ… 100GB bandwidth €19/month (pro)
Railway βœ… $5 credit/month $5/month per $5 usage
Render.com βœ… With auto-sleep $7/month (always on)
Docker VPS ❌ €5-20/month
AWS Amplify βœ… 1000 build min Pay-as-you-go

Recommendation: Vercel or Netlify for guaranteed €0/month.


πŸ“¦ Deployment Comparison

Feature Vercel Netlify Railway Render Docker
Setup Time 2 min 2 min 3 min 5 min 10 min
Free Tier βœ… Best βœ… Good βœ… Limited βœ… Auto-sleep ❌
Auto Deploy βœ… βœ… βœ… βœ… ❌ Manual
Custom Domain βœ… βœ… βœ… βœ… βœ…
SSL/HTTPS βœ… Auto βœ… Auto βœ… Auto βœ… Auto βš™οΈ Manual
Logs βœ… βœ… βœ… βœ… βš™οΈ Manual
Scaling βœ… Auto βœ… Auto βœ… Auto βš™οΈ Manual βš™οΈ Manual

Customization Examples

B2B Corporate Landing Page

// config/translations.json
{
  "it": {
    "title": "Richiedi una Demo",
    "subtitle": "Compila il form per una demo personalizzata",
    "buttons": { "submit": "Richiedi Demo" }
  }
}

// config/theme.json
{ "colors": { "primary": { "DEFAULT": "#1e3a8a" } } }  // Corporate blue

E-commerce Landing Page

// config/translations.json
{
  "it": {
    "title": "Hai Domande?",
    "fields": { "company": "Settore" },
    "buttons": { "submit": "Invia Richiesta" }
  }
}

// config/theme.json
{ "colors": { "primary": { "DEFAULT": "#dc2626" } } }  // Sales red

Documentation

License

CC-BY-NC-SA-4.0 (Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Key Terms:

  • βœ… Attribution - Credit must be given to Luigi Greco
  • ❌ NonCommercial - No commercial use without permission
  • βœ… ShareAlike - Derivatives must use the same license

See LICENSE file for full legal text.

Repository

https://github.com/Luigigreco/gitforms


Made with ❀️ by Luigi Greco | Star us on GitHub ⭐

About

🎯 Zero-cost contact forms for landing pages using GitHub Issues as free database. Open-source alternative to Typeform/Tally/FormSpree. Next.js 14, TypeScript, Tailwind CSS. €0/month.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published