How akkupy/z-vote works
Z-Vote is a Django blockchain-based voting prototype. A voter registers against an administrator-provisioned voter list, receives an OTP, obtains a secret passphrase, logs in, signs a ballot, and stores it as a vote. Every five votes are sealed into a Merkle-backed proof-of-work block. After voting closes, users can verify block integrity and view counted results. The sampled views, helper modules, URL mappings, README, and settings support this workflow; unsampled model details are represented only at their exact tree path.
Components 20
Access & Identity
- Web Routes
poll/urls.py - Registration Flow
poll/views.py - Security Helpers
poll/xtra.py - Twilio SMS
- API Ninjas
- Login Flow
poll/views.py
Election Operations
- Admin Console
poll/admin.py - Election Configuration
poll/models.py - Ballot Handler
poll/views.py
Blockchain Processing
- Ballot Signing
poll/views.py - Merkle Tree
poll/merkleTree/merkleTree.py - Block Sealer
poll/views.py
Verification & Results
- Integrity Checker
poll/views.py - Results Handler
poll/views.py
Application Storage
- Vote Records
poll/models.py - Block Records
poll/models.py - Candidate Records
poll/models.py - SQLite Database
blockchain_voting/settings.py
Other components
- Voter
- Election Admin
Connections 33
- Voter → Web Routes: opens voting site
- Election Admin → Admin Console: configures election
- Web Routes → Registration Flow: dispatches registration
- Web Routes → Login Flow: dispatches login
- Web Routes → Ballot Handler: dispatches ballot
- Web Routes → Block Sealer: dispatches sealing
- Web Routes → Integrity Checker: dispatches verification
- Web Routes → Results Handler: dispatches results
- Registration Flow → Election Configuration: checks voter list
- Registration Flow → Security Helpers: generates credentials
- Security Helpers → Twilio SMS: sends OTP
- Security Helpers → API Ninjas: requests passphrase
- Registration Flow → Election Configuration: stores voter identity
- Login Flow → Election Configuration: authenticates voter
- Admin Console → Election Configuration: writes election settings
- Ballot Handler → Security Helpers: decrypts key
- Ballot Handler → Ballot Signing: signs ballot
- Ballot Handler → Vote Records: stores signed vote
- Ballot Handler → Election Configuration: marks voter voted
- Block Sealer → Vote Records: reads five votes
- Block Sealer → Merkle Tree: builds Merkle root
- Block Sealer → Block Records: writes mined block
- Block Sealer → Election Configuration: updates chain hash
- Integrity Checker → Block Records: reads blocks
- Integrity Checker → Vote Records: reads transactions
- Integrity Checker → Merkle Tree: recomputes roots
- Results Handler → Vote Records: reads votes
- Results Handler → Candidate Records: increments counts
- Results Handler → Candidate Records: reads standings
- Election Configuration → SQLite Database: persists election data
- Vote Records → SQLite Database: persists votes
- Block Records → SQLite Database: persists blocks
- Candidate Records → SQLite Database: persists candidates