atomic-data-docs
atomic-data-docs copied to clipboard
Usecase: surveys
Surveys are an interesting case for web applications and frameworks. How could surveys work in the Atomic Data paradigm (using concepts like Commits and Agents)?
Things that I want, as a survey creator:
- A secret (non-indexed) URL for respondents to fill in a survey
- Unique links for specific individuals, to make sure people only fill in an item once, or set unique identifiers for individuals.
- A management screen for my surveys
- Provide edit rights to colleagues
- Decent survey tooling including...
- a form builder with open questions, multiple choice options, logic jumps...
- an interface for looking at individual responses
- an interface for looking at invite links #23 , and whether they have been used
- an interface for looking at aggregate / average responses (ideally with piecharts and all that)
And as a respondent, I want:
- The option to fill in a survey without any registration barrier
- The ability to pre-fill questions that I've entered before in other surveys.
So, how to implement this? Here's some thoughts:
- Use Classes as a basis for surveys. Classes also set a bunch of properties that are required and recommended, which is similar. However, Classes don't enable things like logic jumps, sorting questions, pagination, intro texts.. It could provide an easy way to have basic surveys, though, as forms for classes are already functional, and Commits already perform the actual validation of the data.
- We don't have an
enumlike datatype, yet #27, which would be useful for multiple choice questions - Create Invite resources with secret, unindexed URLs #23, each with a Private Key and a link to the Class (survey). Upon opening, the front-end sets the private key as current agent, and uses it to sign the commit containing the filled-in survey. The back-end verifies the signature, checks if the agent's key is present in the parent's
writeResourceArray. - Create a ResponseBox Resource which contains a box of invites. When an invite is used, the invite gets a
used: truepropval. - Pre-filling / autofilling questions can be done using Paths. A question could describe a certain path from a pre-defined starting point, which can be traversed to fetch a specific piece of data.