Forma

Data Collector as a Service
— your personal server for HTML forms

Part of Hugs Platform, made with ️ by OctoLab

Motivation

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 Forma. You can use it wherever you want - on simple landing pages or sites based on Hugo or Gatsby, or product from the StaticGen list.

Performance

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"
      action="https://kamilsk.github.io/form-api/"
      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>
<form lang="ru" title="GitHub демо"
      action="https://kamilsk.github.io/form-api/"
      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"/>
</form>
different behavior
<form lang="en" title="Email subscription"
      action="https://kamilsk.github.io/form-api/"
      method="post" enctype="application/x-www-form-urlencoded">
  <input name="email" type="email" title="Email"
         maxlength="64" required="1"/>
</form>

Up and running

from source code

$ go get -d -u github.com/kamilsk/form-api
$ cd ${GOPATH}/src/github.com/kamilsk/form-api

# test it
$ make generate test

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

     Name                    Command               State                Ports
------------------------------------------------------------------------------------------
env_db_1          docker-entrypoint.sh postgres    Up       0.0.0.0:5432->5432/tcp
env_migration_1   form-api migrate up              Exit 0
env_server_1      /bin/sh -c envsubst '$SERV ...   Up       80/tcp, 0.0.0.0:8080->8080/tcp
env_service_1     form-api run --with-profiler     Up       0.0.0.0:8081->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 "email=test@my.email" \
       http://localhost:8080/api/v1/41ca5e09-3ce2-4094-b108-3ecc257c6fa4
Requirements
  • 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 \
             postgres:10-alpine
$ 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 --with-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 \
             kamilsk/form-api:latest
Images
Using Docker

it is friendly for developers

Roadmap

MVP, v1.0

API v2, v2.0

CSI, v3.0

CRUD, v4.0

GUI, v5.0

Forma, SaaS