Commit 9a35ae76 authored by Oruluk's avatar Oruluk


parent 357fd72c
# Edision
Nudge testing framework based on React, Django + GraphQL Relay Modern backend.
Edison is a framework for conducting online experiments. It provides a nudge testing framework based on React, Django + GraphQL Relay Modern backend.
## Quick start:
## Quick start & Installation:
You will need python 3.6 and nodejs as well as yarn installed.
sudo apt-get install python3.6
The installation guide of nodejs can be found [here]( and the guide for yarn can be found [here](
The installation guide of nodejs can be found [here]( and the guide for yarn can be found [here](
You will also need to have a virtualenv activated before running npm install/yarn or the post install build step will fail as django needs to be available to dump the graphql_schema
......@@ -16,20 +18,107 @@ pip3 install -r ./lib/deps/dev.txt
Execute in three different console tabs
To launch Edision it is recommended to use three different console tabs:
1. Start the Django server. The first two commands are only necessary for the first start or when there are changes in the model. For further information please read the Django [documentation](
python3 makemigrations
python3 migrate
python3 runserver
2. React
yarn start
3. Let relay deal with mutations and queries. This is only necessary for the first start or when there are changes regarding queries and mutations. For further information please read the Relay [documentation](
yarn relay
### Deployment
For the deployment some changes in webpack.config are necessary.
Adapt the url (which is 'http://localhost' per default):
const url = ''
Define host IP-address:
module.exports = {
entry: {
app: appEntry,
vendor: ['react', 'react-dom', 'react-relay']
output: {
path: buildPath,
filename: "[name]-[hash].js",
publicPath: publicPath
devServer: {
// Add IP address for deployment
//host: '',
hot: true,
port: devServerPort,
historyApiFallback: true,
stats: "errors-only",
contentBase: buildPath,
To start the Django server on port, e. g. 8000, with the command:
python3 runserver
python3 runserver
It will now be publicly accessible.
## Overview
The first page the user will see is the landing page specified in WelcomeView. On the next screen (BeginningScreen) the user is introduced to the general experiment context and instructions.
Note: before entering the BeginningScreen in the default version an automated registration of the user is conducted, which is essential to gain an user ID, which in turn is necessary for later processes and the evaluation. The automated registration process makes use of placeholders for names, emails and passwords, however it can also be modified in the code so the registration is done by the users themselves. During the registration the user is also logged in for 60 minutes by placing a cookie. If she is logged out after this time and enters Edison again, a new registration is processed and a new account is created (without linking it to the previous one).
When leaving the BeginningScreen a new session is created. From all session configurations that are below their respective iteration limit a random session configuration is chosen and assigned to the user. Note: To create a session an unique combination of a session configuration ID and user ID is necessary, so a user can only execute a session configuration once.
During the session the user is guided through a set of blocks, each consisting of a context, activity and feedback part, each represented by a single screen (ContextScreen, ActivityScreen and FeedbackScreen). The sequence of the blocks is determined by the order the block configurations were assigned to a session configuration.
The url contains information about the session ID and the respective block ID, which are both base64 encoded. When there are no blocks left the user is guided to the FinishScreen from which she can access an external survey tool, e.g. limesurvey, specified in session configuration.
Every time the user changes or reloads a screen event as well as user input data is directly stored in the database. If the user returns to previous pages and changes parameters those events will be tracked as well. It is up to the evaluation of the experiment designer if this data is necessary. The database (db.squlite3) can be found in the root folder of the project.
## Set-up
Before starting an experiment all configurations must be specified. This can be done via the admin page:
Cockpit view:
Note: Before creating sessions or blocks the nudge, context and feedback configuration must be defined since these are part of blocks and thus sessions.
Configuration of a session:
Configuration of block:
Add blocks to session:
Nudge configuration:
Context configuration:
Feedback configuration
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment