How Janamat
Engage Works.
An end-to-end pipeline that converts on-chain Solana votes into gamified civic points transparently and in real-time.
⚡The Vote-to-Points Pipeline
Vote on Janamat
The user submits a vote via the Janamat app. This calls the cast_vote instruction on the vote_program Anchor program deployed on Solana devnet.
cast_vote · vote_program · Solana DevnetVoteCasted Event Emitted
The program emits a VoteCasted event in transaction logs with voter pubkey, poll index, and vote type (YesNo, SingleChoice, Ranked, MultipleChoice).
VoteCasted · Anchor BorshCoder · Program LogsBackend Listener Decodes
Our Express backend subscribes to program logs via connection.onLogs. It decodes the event using the vote_program IDL and extracts voter details.
connection.onLogs · @solana/web3.js · Expressengage_registry Awards Points
The backend calls award_points on our engage_registry Anchor program. This updates the voter's on-chain EngageProfile PDA. Points accumulate with streak bonuses (base 1 pt + up to 2 bonus pts for consecutive daily votes).
engage_registry · EngageProfile PDA · Streak LogicLeaderboard Direct from Chain
GET /leaderboard fetches all EngageProfile accounts directly from Solana using program.account.engageProfile.all(). No database the chain IS the source of truth. Sorted by totalPoints.
engageProfile.all() · GET /leaderboard · Next.js ISR🔧Tech Stack
Purposefully chosen for the Superteam Earn Mini Hack scope.
🛡️Integrity Guarantees
The system is designed to be trustworthy, fair, and resilient.
Fully On-Chain
Points are stored in EngageProfile PDAs on Solana not in any database. Anyone can independently verify any voter's score using the program's public key.
Real-Time Updates
The backend listener runs 24/7 via connection.onLogs. VoteCasted events are decoded and awarded on-chain within seconds of finality.
Streak Bonuses
The engage_registry program tracks daily voting streaks on-chain. Base 1 pt per vote + up to 2 bonus pts for consistent voting every 24-48 hours. Maximum 3 points per vote.
Immutable Rewards
Points earned are permanent and cannot be revoked. Once you vote and earn points, they're yours forever building trust and fairness into the system.
⛓️On-Chain Data Schema
Two on-chain Anchor accounts replace the database entirely.
EngageProfile PDA
GlobalState PDA
Ready to participate?
Every vote you cast on Janamat is verified on-chain and earns you points.