Giter Site home page Giter Site logo

citizen_science_backend's Introduction

This is the backend of the citizen science survey for the PRODIGI team at UZH.

This server handles assigning unique question set to the connected clients. The current settings helps to duplicate each question 3 times and assign 30 questions to a user and for a total of 50 users.

In order to make this work, we need to run serially→

  1. src/backend/random_generator.py → This file generates a list of 30 random questions for each of the 50 users. The generated data is stored in file → src/backend/data/question_list.json
  2. src/backend/create_db_entry.py → This file is responsible to upload the data into mongodb Database.

Important point: Before running this program make sure that mongo db docker container is running on the server. Use below command to run it →

docker run -d -p 27017:27017 --name prodigi-mongo mongo:latest

So far you can run these two files in your local system also. But you need to start Flask and WSGI server to enable the API endpoint by which qualtrics client can connect and obtain the question list. This API endpoint is →

/api/v1/questions

To run the Flask server in our Ubuntu server, we have a service which automatically runs the flask server. Please make sure that the service is active. The service automatically starts upon server restart. Check for error logs in case its not running.

/etc/systemd/system → citizen_backend.service

Revers proxy to the flask server has been implemented using Nginx. You can find more details about the file on the server.

/etc/nginx/sites-available → citizen-science.org

You can find the repository to create the survey here-->

https://github.com/saurabhprasun20/qualtrics-automation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.