Form API

Data Collector as a Service —
a server for your HTML forms written on Go.

Part of Hugs Platform, made with ️ by OctoLab


Open Source

We found some services like Wufoo and Pageclip are useful. However, they are proprietary, closed and paid. Also, we want to have full control of our data. With love for open source, we start to create something similar from scratch and share it with our community.

Static Sites

We use static site generators like awesome Hugo in our everyday work. We chose to get missing functionality from microservices like the Form API. You can use it wherever you want - on simple landing pages or sites based on Hugo or Gatsby, or product from the StaticGen list.


We focused on performance and simplicity because the service is self-hosted and we do not want to spend much money, time and effort to host and maintain it. Therefore, we apply efficient solutions, such as Go, nginx and PostgreSQL.

Live examples

different languages
<form lang="en" title="GitHub demo page"
      method="post" enctype="application/x-www-form-urlencoded">
    <input name="name" type="text" title="Name"
           placeholder="Name..." maxlength="25" required="1"/>
    <input name="feedback" type="text" title="Feedback"
           placeholder="Your feedback..." maxlength="255" required="1"/>
<form lang="ru" title="GitHub демо"
      method="post" enctype="application/x-www-form-urlencoded">
    <input name="name" type="text" title="Имя"
           placeholder="Имя..." maxlength="25" required="1"/>
    <input name="feedback" type="text" title="Комментарий"
           placeholder="Ваш комментарий..." maxlength="255" required="1"/>
different behavior
<form lang="en" title="Email subscription"
      method="post" enctype="application/x-www-form-urlencoded">
  <input name="email" type="email" title="Email"
         maxlength="64" required="1"/>

Up and running

from source code

$ go get -d -u
$ cd ${GOPATH}/src/

# test it
$ make deps generate test

# run it
$ make up && make demo && make status

     Name                    Command               State                Ports
env_db_1 postgres    Up>5432/tcp
env_migration_1   form-api migrate up              Exit 0
env_server_1      /bin/sh -c envsubst '$SERV ...   Up       80/tcp,>8080/tcp
env_service_1     form-api run --with-profiler     Up>8080/tcp

# check it
$ curl http://localhost:8080/api/v1/41ca5e09-3ce2-4094-b108-3ecc257c6fa4
$ curl -H "Content-Type: application/x-www-form-urlencoded" \
       --data-urlencode "" \
  • Docker 17.09.0-ce or above
  • Docker Compose 1.16.1 or above
  • Go 1.9.2 or above
  • GNU Make 3.81 or above
Installation from source code

using Docker

$ docker network create -d bridge form-api
$ docker run --rm -d \
             --env-file .env \
             --network form-api \
             --name form-api-db \
             -h db \
             -p 5432:5432 \
$ docker run --rm -it \
             --env-file .env \
             --network form-api \
             --name form-api-migration \
             --link form-api-db:db \
             -h migration \
             kamilsk/form-api:latest migrate up --demo
$ docker run --rm -d \
             --env-file .env \
             --network form-api \
             --name form-api-service \
             --link form-api-db:db \
             -h service \
             -p 8080:8080 \
Using Docker

it is friendly for developers


MVP, v1.0

CRUD, v2.0

GUI, v3.0

API v2, v4.0

Extensibility, v5.0

Forma, SaaS