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 directory | Source files |
|---|---|
src | 77 |
anchor | 5 |
(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.
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>,- Line 101
require!(: An explicit validation that aborts the instruction with an error. - Line 102
clock.unix_timestamp <= poll.poll_end as i64,: Reads on-chain time from the Clock sysvar. - 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. - 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.
| Directory | Command | Runs |
|---|---|---|
. | npm run dev | next dev |
. | npm run start | next start |
. | npm run build | next build |
. | npm run lint | next lint |
anchor | anchor build | compile programs and generate IDLs |
anchor | anchor test | local validator + test suite |
anchor | anchor run test | ../node_modules/.bin/jest --preset ts-jest |
What you could build from it
- Fork the SuperStack copy and extend it within the Other gaps listed on the idea page.
- Learn the pattern first: Program Derived Addresses (PDAs)
- Learn the pattern first: Cross-Program Invocations (CPIs)