Sol.College

Full lesson

utopia

Utopia is a no-code, decentralized voting platform built on the Solana blockchain that solves the widespread distrust, complexity, and high cost of traditional voting systems.

What it does

From the project README:

Utopia is a no-code, decentralized voting platform built on the Solana blockchain that solves the widespread distrust, complexity, and high cost of traditional voting systems. In a country like Sierra Leone—where even student elections or reality show votes can trigger conflict—Utopia empowers universities, organizations, and event managers to launch transparent, tamper-proof elections without technical barriers. With features like self-serve poll creation, configurable voting rules, pay-to-vote options, and real-time on-chain results, Utopia makes every vote count—instantly, anonymously, and
Original
stElmitchay/utopia
SuperStack fork
Blockchains/utopia @ cc1b663
Stars
1
Last push (original)
2026-04-18
Languages
TypeScript, PLpgSQL, Rust, JavaScript, CSS
Detected stack
AnchorNext.jsweb3.js
Categories
Other
Licence
MIT
Homepage
https://utopia-livid-sigma.vercel.app/

Architecture

84 source files. By extension: .tsx ×53, .ts ×29, .js ×1, .rs ×1.

Top-level directorySource files
src77
anchor5
(root)2

On-chain programs: anchor/programs/votingapplication

Dapp: deploying

This fork is queued for its own live dapp on Sol.College, with a Devnet/Mainnet switch. It appears here, at /dapps/utopia/, once it is deployed and checked on devnet. Until then, run it locally with the commands below.

Key code, explained

Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.

stElmitchay/utopia · anchor/programs/votingapplication/src/lib.rs L97–119 @ cc1b663 · MIT · original
        VotingError::Unauthorized    );     // Can only close if poll hasn't already ended    require!(        clock.unix_timestamp <= poll.poll_end as i64,        VotingError::PollAlreadyEnded    );     // Set poll end time to current time (effectively closing it)    poll.poll_end = clock.unix_timestamp as u64;     msg!("Poll {} closed early by admin", poll.poll_id);     Ok(())  }} #[derive(Accounts)]#[instruction(candidate_name: String, poll_id:u64)]pub struct Vote <'info>{  #[account(mut)]  pub signer: Signer<'info>,
  1. Line 101 require!(: An explicit validation that aborts the instruction with an error.
  2. Line 102 clock.unix_timestamp <= poll.poll_end as i64,: Reads on-chain time from the Clock sysvar.
  3. Line 109 msg!("Poll {} closed early by admin", poll.poll_id);: Logs to the program log, which is visible in explorers and the test output.
  4. Line 119 pub signer: Signer<'info>,: Requires this account to have signed the transaction.

How to run, build and test

These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.

DirectoryCommandRuns
.npm run devnext dev
.npm run startnext start
.npm run buildnext build
.npm run lintnext lint
anchoranchor buildcompile programs and generate IDLs
anchoranchor testlocal validator + test suite
anchoranchor run test../node_modules/.bin/jest --preset ts-jest

What you could build from it