I've been working on a simple ODK backend
https://github.com/digidem/simple-odk built on node.js
https://nodejs.org/ that receives form submissions from ODK collect and
stores them as geojson on a Github https://github.com repo.
Here at Digital Democracy we needed something more lightweight than ODK
Aggregate and Formhub and its derivatives, and wanted the flexibility to
switch in different back ends. One goal is to run this on a Raspberry Pi
http://www.raspberrypi.org/ as a portable form server, to avoid needing
every collection device to connect to the internet.
For now, it's called Simple ODK https://github.com/digidem/simple-odk.
I've also written a collection of modules that should be useful for anyone
working with node.js or javascript and ODK. They attempt to follow the
standards https://bitbucket.org/javarosa/javarosa/wiki/browse/ as closely
as possible and have reasonable test coverage (more tests welcome!)
- openrosa-request-middleware
https://github.com/digidem/openrosa-request-middleware Basic
middleware for serving OpenRosa compliant responses for express middleware - xform-to-json https://github.com/digidem/xform-to-json Converts
XForm submissions from ODK Collect to json or geojson - openrosa-manifest https://github.com/digidem/openrosa-manifest Create
a valid OpenRosa manifest document see
https://bitbucket.org/javarosa/javarosa/wiki/FormListAPI - openrosa-formlist https://github.com/digidem/openrosa-formlist Create
a valid JavaRosa FormList of xforms see
https://bitbucket.org/javarosa/javarosa/wiki/FormListAPI
If you want to get up and running straight away with your own server, it's
a one click deploy to Heroku: My Simple ODK
https://github.com/digidem/my-simple-odk. Note that Heroku is not the
best option for this because of their 30 second timeout
https://devcenter.heroku.com/articles/request-timeout which will cut off
any form submissions from slow connections, especially with media.
We use a $5/month Digital Ocean https://www.digitalocean.com/ droplet and
have written a provisioning
https://github.com/digidem/simple-odk/blob/master/bin/provision.js and deployment
script https://github.com/digidem/simple-odk/blob/master/bin/deploy.sh,
although it needs more tweaking of nginx config for slow connections and
large form uploads, but you can get up and running quickly and get SSL for
free on their herokuapp.com domain. To get a new server up and running we
just npm run provision then npm run deploy. We use Cloudflare
http://cloudflare.com/ to get SSL up and running easily for $20/month
with minimal config (you will be able to get SSL from Cloudflare for free
one this issue https://code.google.com/p/opendatakit/issues/detail?id=1121
is fixed). Cloudflare also has a timeout, of about 3-5 minutes in my
testing. To avoid this you need to store your own certificate on your own
server.
I'd be really interested in any feedback or ideas on this and happy to
answer any questions. I hope that this can be useful for the community in
some way.