Fetching contributors…
Cannot retrieve contributors at this time
238 lines (184 sloc) 8.74 KB

🗃 Forma Tweet

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

Patreon Build Status Code Coverage Code Quality Research License



  • We need better integration with static sites built with Hugo.
  • We want cheaper products than Formata or FormKeep.
  • We have to full control over our users' data and protect it from third parties.

Quick start


  • Docker 18.06.0-ce or above
  • Docker Compose 1.22.0 or above
  • Go 1.9.2 or above
  • GNU Make 3.81 or above
$ make up demo status

     Name                    Command               State                          Ports
forma_db_1 postgres    Up>5432/tcp
forma_server_1    /bin/sh -c echo $BASIC_USE ...   Up>443/tcp,>80/tcp
forma_service_1   service run --with-profili ...   Up>80/tcp,>8090/tcp,

$ open

$ make help
GET curl /api/v1/UUID
$ curl
# <form id="10000000-2000-4000-8000-160000000004" lang="en" title="Email Subscription"
#       action="http://localhost/api/v1/10000000-2000-4000-8000-160000000004" method="POST"
#       enctype="application/x-www-form-urlencoded">
#       <input id="10000000-2000-4000-8000-160000000004_email" name="email" type="email" title="Email"
#              maxlength="64" required="true"></input>
#       <input type="submit">
# </form>
POST /api/v1/UUID
$ curl -v -H "Content-Type: application/x-www-form-urlencoded" \
       --data-urlencode "" \
# > POST /api/v1/10000000-2000-4000-8000-160000000004 HTTP/1.1
# > Host:
# > User-Agent: curl/7.54.0
# > Accept: */*
# > Content-Type: application/x-www-form-urlencoded
# > Content-Length: 21
# >
# < HTTP/1.1 302 Found
# < Location: http://localhost/api/v1/10000000-2000-4000-8000-160000000004#eyJpbnB1dCI6ImJmM2MyYWIwLWVkYjQtNDFiZi1iNDlkLWY3ZjNiMmI5ZDViMiIsImlkIjoiMTAwMDAwMDAtMjAwMC00MDAwLTgwMDAtMTYwMDAwMDAwMDA0IiwicmVzdWx0Ijoic3VjY2VzcyJ9
# < Date: Sat, 05 May 2018 09:34:47 GMT
# < Content-Length: 0
# <



You can find API specification here. Also, we recommend using Insomnia HTTP client to work with the API - you can import data for it from the file. Or you can choose Postman - its import data is here and here.


You can use CLI not only to start the HTTP server but also to execute CRUD operations.

Service command-line interface
$ make install

$ form-api help

  form-api [command]

Available Commands:
  completion  Print Bash or Zsh completion
  ctl         Forma Service Control
  help        Help about any command
  migrate     Apply database migration
  run         Start HTTP server
  version     Show application version

  -h, --help   help for form-api

Use "form-api [command] --help" for more information about a command.

Bash and Zsh completions

You can find completion files here or build your own using these commands

$ form-api completion -f bash > /path/to/bash_completion.d/
$ form-api completion -f zsh  > /path/to/zsh-completions/_form-api.zsh



$ brew install kamilsk/tap/form-api

$ which form-api


$ export REQ_VER=2.0.0  # all available versions are on
$ export REQ_OS=Linux   # macOS and Windows are also available
$ export REQ_ARCH=64bit # 32bit is also available
# wget -q -O forma.tar.gz
$ curl -sL -o forma.tar.gz \"${REQ_VER}/form-api_${REQ_VER}_${REQ_OS}-${REQ_ARCH}".tar.gz
$ tar xf forma.tar.gz -C "${GOPATH}"/bin/ && rm forma.tar.gz

Docker Hub

$ docker pull kamilsk/form-api:2.x
# or use mirror
$ docker pull

From source code

$ egg^2.0.0 -- make test install
# or use mirror
$ egg^2.0.0 -- make test install

egg1 is an extended go get.


This application is in a state of MVP and under active development. SemVer is used for releases, and you can easily be updated within minor versions, but major versions can be not BC-safe.

1 The project is still in prototyping.

Gitter @kamilsk @octolab

made with ❤️ by OctoLab