Introduction

Voters Verdict

A flexible, open-source voting system built with Rust and Rocket framework, designed to handle various types of voting scenarios with support for multiple data storage backends and custom voting configurations.

Features

  • Multi-Storage Support: Choose between SQLite database, local file storage, or remote storage modes
  • Flexible Voting Styles: Supports various voting mechanisms including weighted votes, cumulative voting, and point-based systems
  • Custom Criteria System: Define customizable voting criteria with minimum, maximum, and weight requirements
  • User and Candidate Management: Built-in support for managing voters, candidates, and user types
  • Admin Panel: Comprehensive administration interface for managing voting sessions, ballots, and configurations
  • API-First Design: RESTful API endpoints for programmatic access to voting data
  • Responsive UI: Modern, accessible interface with dark/light theme support
  • Multi-language Support: Configurable language settings for international use
  • Real-time Results: Display voting results with various sorting options (by sum, by weight, by candidate)

API Endpoints

Voting Management

  • POST /api/v1/votings - Create or modify a voting session
  • GET /api/v1/votings/{voting} - Get voting details
  • POST /api/v1/votings/{voting} - Cast a vote
  • POST /api/v1/votings/{voting}/close - Close a voting session
  • GET /api/v1/votings/raw/{voting} - Get raw voting data
  • GET /api/v1/votings/raw/{voting}?full - Get full voting data with all details

Ballot Management

  • POST /api/v1/ballots - Submit a ballot
  • GET /api/v1/ballots/{voting} - Get ballots by voting
  • GET /api/v1/ballots/{voting}/voters/{voter} - Get ballots by voter
  • GET /api/v1/ballots/{voting}/candidates/{candidate} - Get ballots by candidate
  • GET /api/v1/ballots/{voting}/results?sort=sum - Get results sorted by sum
  • GET /api/v1/ballots/{voting}/results?sort=weight - Get results sorted by weight

User Management

  • GET /api/v1/users - Get all users
  • GET /api/v1/users/{voter} - Get a specific user
  • POST /api/v1/users - Create a new user

Criteria Management

  • GET /api/v1/criteria - Get all criteria
  • GET /api/v1/criteria/{criteria} - Get a specific criterion
  • POST /api/v1/criteria - Create a new criterion

Render Endpoints

  • / - Redirects to voting index
  • /votings - View voting list with invite code authentication
  • /votings/{voting} - Cast a vote in a specific voting session
  • /ballots/{voting} - View ballots for a specific voting
  • /ballots/{voting}/voters/{voter} - View ballots by voter
  • /ballots/{voting}/candidates/{candidate} - View ballots by candidate
  • /ballots/{voting}/results?sort={sort} - View voting results
  • /admin - Admin panel (requires authentication)
  • /info - Version information

Technology Stack

  • Backend: Rust with Rocket web framework
  • Templates: Tera templating engine
  • Styling: DaisyUI + Tailwind CSS
  • JavaScript: Vanilla JS with custom utilities
  • Database: SQLite (optional)
  • Deployment: Static site generator with Zola theme