Skip to content

Socialcap-app/midnight-hack2025

Anonymous and censorship-resistant voting app

A minimal anonymous voting engine for communities, using credential filtering, random elector selection, and verifiable encrypted voting.

Generic badge Generic badge

This example implements a simple one-item bulletin board. It allows users to post a single message at a time, and only the user who posted the message can take it down and make the board vacant again.

The full description of the bulletin board scenario, as well as a detailed discussion of the code, can be found in part 3 of the Midnight developer tutorial.

The api directory contains different methods, classes and types required to run the voting CLI and the voting UI.

The contract directory contains the Compact contract and its utilities.

The voting-cli directory contains the code required to run the voting dapp as a CLI app.

The voting-ui directory contains the code needed to build the interface and interact with it in the browser. The interface allows the user to deploy a new voting contract, post a new message and take it down.

How to use the CLI

Note: if installing via npm, you need to pass --legacy-peer-deps because of the more modern use of vite.

  1. Install the node modules in the root
  2. Install the node modules in api
  3. Install the node modules in contract, compile the contract with npm run compact, and then the typescript with npm run build
  4. Install the node modules in voting-cli, build it and run npm run testnet-remote to launch the app

How to use the user interface

  1. Install the node modules in the root
  2. Install the node modules in api
  3. Install the node modules in contract and compile it
  4. Install the node modules in voting-ui
  5. Run npm run build:start to build the project and run a local server

About

Hackaton Midnight Agosto 2025

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors