Jake Goldsborough

Building a Fully Decentralized Voting System Using Just Git and Pull Requests

Published June 23, 2025

4 min read

Tags: rust, git, devops

The Premise

What if we could build a fully transparent, auditable, and tamper-evident voting system -- without any servers, centralized backend, or traditional databases?

The result is GitVote - a simple but powerful decentralized voting system that uses nothing but Git, pull requests, and a little bit of Rust.

Why Git?

Git already gives us:

With all that, we're part of the way to a blockchain.

I wondered if I could build a voting system where Git itself is the storage layer, the consensus layer, and the audit trail.

The Design

At a high level, GitVote works like this:

There's no central database, API server, or backend. Everything happens inside of Git.

The Voting Flow

Proposal Creation

Each new proposal is created as a new Git branch, for example:

proposal/001-color-vote

A simple schema.json file defines the allowed choices for that proposal:

{
  "allowed": ["blue", "purple", "green"]
}

Voter Submission

Voters follow this flow:

  1. Fork the governance repo
  2. Clone their fork locally
  3. Checkout the correct proposal branch
  4. Run GitVote CLI tool to cast their vote: gitvote cast --choice purple

This will:

  1. Push their branch back to their fork
  2. Open a pull request into the upstream proposal branch

Vote Validation

Every pull request triggers CI which runs: gitvote validate

This will validate:

Invalid votes fail the CI and will not be merged

Merging & Chain Building

Once a valid PR is merged, CI will automatically run: gitvote build-chain

This scans all merged vote files and creates an immutable hash-linked chain of blocks stored as plain JSON:

blocks/
  block-0000.json
  block-0001.json
  ...

Each block includes:

Tallying Votes

At any time, anyone can run: gitvote tally

This reads the blocks/ directory and generates a full tally of the current vote state:

Vote Tally:
  purple votes: 3
  red votes: 2
Total unique voters: 5

No external system is needed to calculate the results — everything lives entirely inside Git.

The Tech Stack

Security

The Benefits

Future Plans

There are a number of interesting enhancements that could be made here I think:

For now, GitVote is a minimal, functioning, fully decentralized voting system.

The Code/Demo

You can find the CLI here: GitVote CLI

You can find a test governance repo here: gitvote-test

By going to actions, you can see the various CI workflows that run during the voting process.

Closing Thoughts

What originally started as an idea for "Gitcoin" and wanting to learn more about blockchains turned into a fully functional, fully auditable governance platform -- all built entirely on top of Git (and Rust).

It was pretty satisfying to turn pull requests, branch protections, and hash-linked commits into a simple, verifiable voting process.