Skip to content

Vocdoni's UI Scaffold is a React application that uses the Vocdoni SDK and UI Components library to provide a user interface for the Vocdoni voting protocol. It is built with Vite and is deployed at https://app.vocdoni.io/.

License

Notifications You must be signed in to change notification settings

vocdoni/ui-scaffold

Repository files navigation

Star History Chart

Vocdoni is the first universally verifiable, censorship-resistant, anonymous, and self-sovereign governance protocol.
Our main aim is a trustless voting system where anyone can speak their voice and where everything is auditable.
We are engineering building blocks for a permissionless, private and censorship resistant democracy.
Explore the developer portal »

More About Us

Vocdoni Website | Web Application | Blockchain Explorer | MIT Law Publication | Contact Us

Key Repositories

Vocdoni Node | Vocdoni SDK | UI Components | Census3

ui-scaffold

Vocdoni's UI Scaffold is a React application that uses the Vocdoni SDK and UI Components library to provide a user interface for the Vocdoni voting protocol. It is built with Vite and is deployed at https://app.vocdoni.io/.

Table of Contents

Getting Started

Environment variables

You can create a .env.local file to set your custom environment variables there, here's a list of variables you can use:

  • VOCDONI_ENVIRONMENT: the vocdoni environment to be used, either dev, stg or prod (defaults to stg).
  • BASE_URL is used to specify the public base page during build.
  • BUILD_PATH Specifies the destination of built files.
  • CUSTOM_ORGANIZATION_DOMAINS A JSON.stringified object of custom domains mapped to organization ids, to replace the homepage with their profile page.

You can also start the app by prefixing these vars instead of defining your custom .env file:

VOCDONI_ENVIRONMENT=dev pnpm start
# or an example using many of them...
BUILD_PATH=build/dev BASE_URL=/ui-scaffold/dev VOCDONI_ENVIRONMENT=dev pnpm build

Custom domain names

The custom domain names environment variable allows to map custom domains to organization ids, so that the homepage rendered will be the mapped organization profile.

CUSTOM_ORGANIZATION_DOMAINS='{"deadcorp.com":"0x000000000000000000000000000000000000dead"}' pnpm build

With the example above, accessing the app via the deadcorp.com domain would render the profile of the organization with id 0x000000000000000000000000000000000000dead as the homepage of the app.

Available Scripts

In the project directory, you can run:

pnpm start

Runs the app in the development mode.
Open http://localhost:5173 to view it in the browser (note the port may change if already used).

pnpm build

Builds the app for production to the dist folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

pnpm translations

Extracts all i18n strings from the code and puts them in the i18n/locales json files. The best way to work with translations is:

Branching and deploys

Three branches are linked to deploys:

  • GitHub Actions Workflow Status linked to SaaS api-dev and vochain dev.
  • GitHub Actions Workflow Status linked to SaaS api-stg and vochain LTS.
  • GitHub Actions Workflow Status linked to SaaS api-lts and vochain LTS.

Also, all pushes to develop and stage are deployed to netlify. You can easily access these deploys on each commit to develop, or directly in pull requests.

The common flow to follow when deploying to main is passing through all the other stages:

branch from develop => merge to develop => merge to stage => merge to main

The only exception should be when fixing specific versions to a deployment, in such case, a hotfix should be created from the desired branch to be updated:

branch from stage (i.e. h/sdk-0.4.1) => PR to stage
branch from main (i.e. h/sdk-0.5.0) => PR to main

Contributing

While we welcome contributions from the community, we do not track all of our issues on Github and we may not have the resources to onboard developers and review complex pull requests. That being said, there are multiple ways you can get involved with the project.

Please review our development guidelines.

Contributions and pull requests

To avoid unnecessary review overhead, pull requests that only fix typos, whitespace, punctuation, or other minor changes without functional impact or clear added value will not be accepted. If you want to correct such issues, please open an issue first. If the change is considered necessary, it may be accepted as a dedicated pull request that groups those corrections together. Accepted contributions must provide a clear benefit, whether through functional improvements, meaningful documentation updates, or the implementation of a feature or bug fix. Minor changes should be made with consideration and strong justification to avoid unnecessary distractions for reviewers.

License License: BSL 1.1

This repository is licensed under the Business Source License 1.1.

Copyright © 2025 Vocdoni.

About

Vocdoni's UI Scaffold is a React application that uses the Vocdoni SDK and UI Components library to provide a user interface for the Vocdoni voting protocol. It is built with Vite and is deployed at https://app.vocdoni.io/.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 15

Languages