Contributing
Communication between system components
Survey Solutions has several components that communicate with each other at different stages of the survey lifecycle.
See glossary for interpretation of some of the terms, which may have different meaning in other systems.
Survey Solutions Components:
- Interviewer (Android application)
- Supervisor (Android application)
- Tester (Android application)
- Headquarters (HQ) (Web application)
- WebTester (Web application)
- Designer (Web application)
These components may communicate with other components of the system.
Project overview
Survey solutions currently has 2 solution files - one for build UI projects (src/WB.sln
) and one for services (src/Services/WB.Services.sln
).
Project dependency diagram for WB.sln:

From top to bottom:
WB.Core.SharedKernels.DataCollection.Portable
Project contains code that is common to the entire survey solutions. This is an assembly that is referenced from compiled assembly that contains enabling conditions and validation expressions. So for example if you need to add a reusable function to extend existing set this an assembly to extend.
July 1, 2021Headquarters application overview
Headquarters application for developers
Headquarters web application uses CQRS with event sourcing based architecture.
At a high level a change to the state of the system is done in the following sequence:
- Client creates a command that describes what kind of change is needed
- Infrastructure restores aggregate root from its event stream
- Aggregate root checks if command execution is allowed and executes it
- Events produced by aggregate root are published to denormalizers to build reports, lists and any other representations for end user
Sections below describe major aspects of Headquarters application that developers need to know about.
July 1, 2021Development environment
Development environment
In order to be able to buld Survey Solutions locally, you will need to install several prerequesties fist:
- Install PostgreSQL.
- Install LTS version of node JS (we currently use version 12).
- Install yarn package manager.
- Install latest version of asp.net core SDK.
- Install Xamarin build tools for your platform.
Running locally
First you need to build javascript UI. It Can be done by running either .build.ps1
, build.all.deps.bat
or build_deps.sh
scripts. This will build frontend components for Designer, Headquarters and Web Tester applications.
Adding new question type
Adding new question type
Adding a new question type requires changes in all existing applications in survey solutions.
When implementing it think about an answers to the following questions:
- What CLR type can be used to represent an answer to your question type. Consider existing types
- How do you see this question to be represented in export – Is answer should be presented differently during preloading of assignments
- How will it be represented on UI for interviewer, headquarters (answered read-only state)
Designer
Entry point is enum QuestionType
. To add new entry here or not depends on how much your new question type is different from any of the existing types.
In order to be able to use answer to a question in questionnaire expressions implement a type conversion in QuestionTypeToCSharpTypeMapper
. You should always choose a type that can have a null
value in it.