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.
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).
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.
Check the file env-config.js
for a full featured list of the environment vars used when exporting the project.
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
andmaster
: These images are created frommaster
branch and have the latest development updates. They point to our development environment and use goerli for the ethereum transactions.stage
: these are created fromstage
and have a more stable version thanmaster
, but still not production ready. They point to our stage environment and usexdai
for the ethereum transactionsrelease-*
: 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
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).