Git Product home page Git Product logo

public-enemy's Introduction

Public-Enemy

Contextualized questionnaire vizualisation tools developped with react/mui/vite

This project is directly linked with Public Enemy Backoffice to create and save questionnaires.

Global project concept

Public-Enemy (& backoffice) is a tool used to test questionnaires with data. Questionnaire designer create questionnaire in pogues but can't test them with predefined data directly. Public-Enemy gives to the designer the ability to inject a questionnaire in orchestrators (stromae, queen soon), and add predefined survey units data in the orchestrators for this questionnaire.

Public-Enemy's global functionalities for a designer:

  • create a questionnaire in public-enemy
    • retrieve the questionnaire from pogues
    • create the questionnaire in public-enemy
    • inject the questionnaire and survey units data (given by the designer when creating questionnaire in public-enemy) in the orchestrators
  • update a questionnaire in public-enemy
    • synchronise the questionnaire with the orchestrators (when pogues questionnaire has been edited for example, or to change survey units data)
  • delete a questionnaire in public-enemy
    • delete questionnaire in orchestrators
  • access to questionnaire in orchestrators
    • designer can access to a questionnaire in orchestrators for a specific survey unit
    • designer can reset a specific survey unit data

Requirements

For building and running the application you need:

  • yarn
  • a public-enemy environment (backoffice, db, pogues, stromae) configured and running

Install

yarn

Running the application locally

yarn start

Docker/Kubernetes

A Dockerfile is present on this root project to deploy a container. You can get docker images on docker hub

Helm chart repository is available for the public-enemy backoffice/frontend

The repository contains helm charts to deploy pogues/eno/stromae too.

Create a production build

yarn run build

Configuration

Before launching app, you must set up some environment variables:

# base url of public-enemy api (back-office)
VITE_API_URL=http://localhost:8080/api
# root url of orchestrator ui
VITE_ORCHESTRATOR_URL=http://localhost:3001
# root url of pogues ui
VITE_POGUES_URL=http://localhost/pogues
# documentation url
VITE_DOCUMENTATION_URL=http://localhost/documentation
# locale
VITE_LOCALE=fr

For docker, the environment variables can be injected as system environment variables, a script is used to generate environment variables after build time, see Dockerfile and container/env.sh)

Libraries used

  • typescript
  • vite
  • react
  • react mui
  • react-intl
  • react-query
  • husky
  • tss-react
  • notistack
  • eslint
  • semantic-release

Before you commit

Before committing code please ensure,
1 - README.md is updated
2 - A successful build is run and all tests are successful
3 - All newly implemented APIs are documented
4 - All newly added properties are documented

License

Please check LICENSE file

public-enemy's People

Contributors

davdarras avatar laurentc35 avatar qruhier avatar semantic-release-bot avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

public-enemy's Issues

V2 - Initialisation

  • new project architecture
  • questionnaire CRUD
    • display all questionnaires
    • questionnaire creation, and first retrieve informations about the questionnaire with pogues identifier
    • questionnaire update (context + survey unit data file input)
    • questionnaire deletion

Missing support for composed questionnaires

Composed Pogues questionnaires are not working, the root cause being that we dont use the appropriate endpoint to get a fully dereferenced questionnaire (ie the main questionnaire with its dependencies)

Can't download CSV schema

How to reproduce

  1. add a new questionnaire
  2. in the parameter window, click on the link to the schema [0]
  3. a new and blank window appears, no download starts (the URL is https://api-personnalisation-conception-questionnaires-recette.dev.kube.insee.fr/api/questionnaires/ls3bwk2d/csv)

[0]
image

Support Collected data

Currently Public Enemy only handles external variables. The support of collected variables would allow another set of use cases.

Add creation link for pogues

Create a specific page for pogues with pogues identifier as parameter. This page redirects the user to the questionnaire creation page

Can't reload existing PE questionnaire

Description

When i want to reload an existing Public Enemy questionnaire - that is recreating the questionnaires in the orchestrator environments based on new data provided - i get an error:

image

How to reproduce

  • on the modification page for an existing questionnaire (click on the ⚙️ icon)
  • using a new data file or the existing one
  • click on the "Recharger le questionnaire dans les orchestrateurs"
  • 💥

Support for pre existing questionnaire state

The orchestrators allow for the injection of data, which can be used as a mean to enter a questionnaire with a pre-existing state.

In the context of Public Enemy, such a feature would help streamlining long questionnaire validation phase but starting a questionnaire with a pre-existing state (for example having the first two sequences already filled).

display questionnaire details

When user tries to create a questionnaire (or use the questionnaire link in pogues), if the questionnaire already exists, display a page containing the questionnaire details and links to different modes.

Survey data upload

As a user, i want to be able to upload my custom survey data to Public Enemy, using a well documented CSV schema.

Organising questionnaires

Currently, every questionnaires is listed in the home page of PE. We should devise a system for organising and sorting questionnaires, for example by reusing the stamp directories of Pogues.

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.