Skip to content

vocdoni/vocdoni-manager-frontend

Repository files navigation

Vocdoni Manager

GitHub stars GitHub issues GitHub Workflow Status Docker Image Size i18n status

Static web site project to manage Vocdoni entities and explore their contents. It also defines the mobile app settings for deep link handling and allows voting via web.

Supported paths

Check the next.config.js file for a full list of the routes. You'll see them split in two:

  • Public: those only accessible in read-only mode.
  • Private: only accessible in write mode (and with the wallet already unlocked).

Standalone Ethereum wallets

A few management workflows need the signature of multiple transactions and payloads, which may lead to a bad user experience.

To mitigate this, the frontend creates a Standalone Web3 Wallet that is present in memory only. For it to be restored, users need the seed and the passphrase to unlock it.

Environment variables

Check the file env-config.js for a full featured list of the environment vars used when exporting the project.

Dockerfile

Docker Image Size

The dockerfile provided builds and serves the static files of the manager.

With this dockerfile you can manually change any of the defined values to build your own manager, pointing wherever you want it to point:

docker build \
    --build-arg=VOCDONI_ENVIRONMENT=dev \
    --build-arg=ETH_NETWORK_ID=goerli \
    --build-arg=REGISTER_URL=https://manager.dev.vocdoni.net/api/registry \
    --build-arg=ACTION_VISIBILITY_URL=https://manager.dev.vocdoni.net/api/registry
    -t custom-manager-build .
# serve it!
docker run --rm -it -p 8000:80 custom-manager-build

If you only plan on serving the project, we create a set of images from this Dockerfile:

  • latest and master: These images are created from master branch and have the latest development updates. They point to our development environment and use goerli for the ethereum transactions.
  • stage: these are created from stage and have a more stable version than master, but still not production ready. They point to our stage environment and use xdai for the ethereum transactions
  • release-*: the most stable ones, used specifically for production environments. They point to our production infrastructure and use xdai for the ethereum transactions.
  • All of the previous images have an app- alias, which is the same build but without the bootnodes RW url set, meaning you can't use those images for things that require writing things to the blockchain (so they're only for viewing data)
# Serve any of the alread built images with a single line
docker run --rm -it -p 8000:80 vocdoni/vocdoni-manager-frontend:app-latest

Translations

i18n status

This project translations are mantained using weblate, you can help us translate the project to any language from our weblate project.

When developing, you need to use i18n.t('key.subkey.subsubkey') for the messages to be translated, and then you can extract those to the json files by using npm run i18n-extract.

The extractor generates _old.json files when it removes translations from the existing files, but these files should not be commited (they're actually ignored).