How neo2701/juned works
JUNED is a Laravel/Vue e-voting application that uses browser-generated Groth16 proofs and Poseidon Merkle membership to support anonymous, eligibility-checked voting. Its main workflow is voter login, eligibility proof and encrypted ballot submission, server-side verification, then audit and public results. Admins manage elections, candidates and voters and generate the eligibility tree; audit and export are separate capabilities. The README documents browser-to-server and Node bridge behavior; sampled backend excerpts confirm verification and persistence responsibilities, while several UI and controller details were not sampled.
Main entry points: VerificationService.php Proof verification · Suara.php Ballot records · Pemilih.php Voter records · PemiluController.php Election management
Components 27
Election administration
- Election management
app/Http/Controllers/PemiluController.php - Candidate management
app/Http/Controllers/KandidatController.php - Voter registration
app/Http/Controllers/VoterRegistrationController.php - Election records
app/Models/Pemilu.php - Voter records
app/Models/Pemilih.php
Voter workflow
- Voting booth
resources/js/Pages/Voter/Dashboard.vue - Vote submission
app/Http/Controllers/SuaraController.php - Ballot records
app/Models/Suara.php
Cryptographic services
- Tree management API
app/Http/Controllers/MerkleTreeController.php - Merkle tree builder
app/Services/MerkleTreeService.php - Witness generator
circuits/vote_js/generate_witness.js - Witness calculator
circuits/vote_js/witness_calculator.js - Nullifier service
app/Services/NullifierService.php - Proof verification
app/Services/VerificationService.php - Groth16 verifier
scripts/verify.js - Merkle bridge
scripts/merkle_tree.js - Proof records
app/Models/ZkpProof.php - Nullifier records
app/Models/Nullifier.php - Merkle tree records
app/Models/MerkleTree.php
Audit and results
- Admin audit
app/Http/Controllers/AuditController.php - Public audit
app/Http/Controllers/PublicAuditController.php - Data exports
app/Http/Controllers/ExportController.php
Identity and access
- Web authentication
app/Http/Controllers/Auth/AuthenticatedSessionController.php - User accounts
app/Models/User.php
Other components
- Election administrator
- Voter
- Application database
Connections 41
- Election administrator → Election management: manages elections
- Election administrator → Candidate management: manages candidates
- Election administrator → Voter registration: registers voters
- Election management → Election records: creates and reads
app/Http/Controllers/PemiluController.php - Election management → Voter records: counts voters
app/Http/Controllers/PemiluController.php - Election management → Ballot records: tallies votes
app/Http/Controllers/PemiluController.php - Voter registration → Voter records: registers voters
- Election administrator → Tree management API: generates tree
- Tree management API → Merkle tree builder: builds tree
- Merkle tree builder → Voter records: reads eligibility
app/Services/MerkleTreeService.php - Merkle tree builder → Merkle tree records: stores tree
app/Services/MerkleTreeService.php - Voter → Web authentication: signs in
- Voter → Voting booth: casts ballot
- Voting booth → Tree management API: fetches tree
- Voting booth → Witness generator: generates proof
- Witness generator → Witness calculator: computes witness
- Voting booth → Vote submission: submits ballot
- Vote submission → Nullifier service: checks nullifier
app/Http/Controllers/SuaraController.php - Vote submission → Ballot records: records ballot
app/Http/Controllers/SuaraController.php - Vote submission → Proof records: records proof
app/Http/Controllers/SuaraController.php - Nullifier service → Nullifier records: checks and stores
app/Services/NullifierService.php - Admin audit → Proof verification: re-verifies votes
- Proof verification → Groth16 verifier: invokes verifier
app/Services/VerificationService.php - Proof verification → Ballot records: updates status
app/Services/VerificationService.php - Proof verification → Proof records: updates verification
app/Services/VerificationService.php - Proof verification → Merkle bridge: recomputes root
app/Services/VerificationService.php - Proof verification → Merkle tree records: reads tree leaves
app/Services/VerificationService.php - Public audit → Election records: reads elections
app/Http/Controllers/PublicAuditController.php - Public audit → Ballot records: reads ballots
app/Http/Controllers/PublicAuditController.php - Public audit → Merkle tree records: reads tree
app/Http/Controllers/PublicAuditController.php - Data exports → Voter records: exports voters
app/Http/Controllers/ExportController.php - Data exports → Election records: exports results
app/Http/Controllers/ExportController.php - Data exports → Ballot records: exports audit data
app/Http/Controllers/ExportController.php - Web authentication → User accounts: authenticates account
- Election records → Application database: persists records
- Voter records → Application database: persists records
- Ballot records → Application database: persists records
- Proof records → Application database: persists records
- Nullifier records → Application database: persists records
- Merkle tree records → Application database: persists records
- User accounts → Application database: persists records