Developing a Survey Form Builder

At https://linsublim.com I need to gather survey information based on each somatic neuroplasticity in motion exercise lesson from participants .

This led me to develop a Golang based survey / form creation system which even has validation, saving of data. Forms are stored as JSON objects and can be loaded from static files or from the database.

I eventually ditched using the static files system in favor of the DB system, however I can be used to create selfcontained binaries to gather data.

I used templ It took me a maximum of 2-3 days to built a proof of concept/prototype and included validation and saving of the results in a database.

I did some refactoring to add picocss as I might use this as a standalone app in the future.

Anyway, sure, I maybe needed 1-2 more days to make the software stable and usable. But the time I invested in building my own integrated system is much better than the drawbacks I had (especially time investment in researching, experimenting) with existing solutions, even javascript libraries.

You might ask, but why build a form survey system instead of using existing ones?

Libraries and approaches I tried

How about 3rd party hosted solutions

First question is WHy not use Google forms/3rd party systems?

There are a few reasons to why I chose this path of “more resitance”

  1. Self Hosting provides many more benefits than anyone can understand in terms of branding, ease of use, etc
  2. Technical complexities
  3. MOst existing software is either proprietary or gets you in a lockin
  4. Innefficiency, not loading fast enough, and many other problems which I won’t go on right now.

Golang variants

First I searched for a golang survey/library. But most were too complex and didn’t fit my needs.

Javascript Libraries/apps

Then I searched in the JavaScript land. And yes, there are plenty of full blown survey/form builder apps out there

But I didn’t want to

  1. Host a complex JavaScript app which contravenes with my easy self-hosting principles
  2. Manage NodeJS/yarn etc dependency hell

After a few days of research I had setup surveyjs. But i felt it was too complex for my needs, and it’s full JS codebase is 2MB to 3MB AFTER MINIFICATION. Which I feel is too much for a simple form.

The code

I may release the code in the future, right now it’s kind of integrated in my app, if you’re interested PM me and I might be able to give you a snapshot.

COnclusion

Overall I feel I spent more time researching and trying other existing solutions than building my own system.

Subscribe to my Newsletter

Receive emails about Linux, Programming, Automation, Life tips & Tricks and information about projects I'm working on