Skip to content

AmateurMind/Web3Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

45 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

STROTAS โ€” Campus Trust System

Blockchain-Secured Voting, Attendance & Certificates on Algorand

Built on Algorand Next.js Hackspiration'26 License: MIT

"Trust comes from code, not authority."
Every record is immutable, verifiable, and transparent โ€” secured by Algorand's Pure Proof-of-Stake.

๐ŸŽฌ Watch Demo Video โ†’

Homepage โ€” 3D Landing Page with Wallet Connected Certificate Module โ€” Hash Storage & Verification


๐ŸŽฏ Problem Statement (Track 2: AI and Automation in Blockchain)

Campus systems like voting, attendance, feedback, and certification suffer from:

Problem Traditional System Strotas Solution
๐Ÿ”ด Trust deficit "Trust the admin" Trust the code โ€” results are on-chain
๐Ÿ”ด Data tampering Editable databases Immutable blockchain records
๐Ÿ”ด Proxy attendance Buddy signs for you Wallet = Identity, cryptographic proof
๐Ÿ”ด Fake certificates Easy to forge PDFs SHA-256 hash verification on Algorand
๐Ÿ”ด No transparency Closed-door counting Anyone can audit via Pera Explorer

โœจ Key Features

๐Ÿ—ณ๏ธ Module 01 โ€” Secure Voting

  • 1 Wallet = 1 Vote โ€” enforced by a PyTeal smart contract
  • On-chain vote tallying with live results
  • Multi-election support (create unlimited polls)
  • Smart contract prevents double-voting, close-out resets, and admin manipulation
  • View on Pera Explorer โ†’

๐Ÿ“‹ Module 02 โ€” Smart Attendance

  • Mark attendance with a blockchain transaction โ€” zero proxy possible
  • SHA-256 hashed session data stored permanently on Algorand
  • Each record linked to a verifiable transaction ID
  • Auto-generated session IDs with timestamps

๐Ÿ“œ Module 03 โ€” Certificate Verification & Secure Sharing

  • Upload any certificate (PDF/PNG/JPG) โ†’ generates SHA-256 hash
  • Hash is permanently stored on Algorand as cryptographic proof
  • Verify mode: Re-upload any certificate to check authenticity instantly
  • If even 1 pixel changes, the hash won't match โ€” tamper-proof
  • Secure Sharing: Create temporary, view-only links with customizable expiration (5s to 7 days). Viewers cannot copy or print.

๐Ÿš€ Demo Guest Mode

  • No wallet needed โ€” generates a temporary Algorand keypair in-browser
  • Perfect for hackathon demos and presentations
  • Fund via Algorand TestNet Faucet

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    STROTAS FRONTEND                     โ”‚
โ”‚              Next.js 16 + React 19 + Tailwind           โ”‚
โ”‚                                                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚  โ”‚  Voting  โ”‚  โ”‚  Attendance  โ”‚  โ”‚  Certificates โ”‚     โ”‚
โ”‚  โ”‚  Module  โ”‚  โ”‚    Module    โ”‚  โ”‚    Module      โ”‚     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ”‚       โ”‚               โ”‚                  โ”‚              โ”‚
โ”‚       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚
โ”‚                       โ”‚                                 โ”‚
โ”‚              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                       โ”‚
โ”‚              โ”‚  WalletContext   โ”‚                       โ”‚
โ”‚              โ”‚  (Pera / Guest)  โ”‚                       โ”‚
โ”‚              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                        โ”‚ algosdk (sign + submit)
                        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              ALGORAND TESTNET (Layer 1)                 โ”‚
โ”‚                                                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Smart Contract โ”‚    โ”‚  Transaction Note Storage  โ”‚  โ”‚
โ”‚  โ”‚  (PyTeal AVM8)  โ”‚    โ”‚  (Attendance & Cert Hashes)โ”‚  โ”‚
โ”‚  โ”‚                 โ”‚    โ”‚                            โ”‚  โ”‚
โ”‚  โ”‚  Global State:  โ”‚    โ”‚  0-ALGO self-transfers     โ”‚  โ”‚
โ”‚  โ”‚  โ€ข is_open      โ”‚    โ”‚  with JSON note payloads   โ”‚  โ”‚
โ”‚  โ”‚  โ€ข option_0     โ”‚    โ”‚                            โ”‚  โ”‚
โ”‚  โ”‚  โ€ข option_1     โ”‚    โ”‚  { type: "ATTENDANCE",     โ”‚  โ”‚
โ”‚  โ”‚  โ€ข creator      โ”‚    โ”‚    hash: "a3f8c1..." }     โ”‚  โ”‚
โ”‚  โ”‚                 โ”‚    โ”‚                            โ”‚  โ”‚
โ”‚  โ”‚  Local State:   โ”‚    โ”‚  { type: "CERTIFICATE",    โ”‚  โ”‚
โ”‚  โ”‚  โ€ข has_voted    โ”‚    โ”‚    hash: "b7d2e4..." }     โ”‚  โ”‚
โ”‚  โ”‚  โ€ข choice       โ”‚    โ”‚                            โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                                         โ”‚
โ”‚            ~3.8s finality  โ€ข  ~0.001 ALGO/tx            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Zero backend. Zero database. 100% on-chain.


๐Ÿ› ๏ธ Tech Stack

Layer Technology Purpose
Frontend Next.js 16 + React 19 App Router, SSR, routing
Styling Tailwind CSS 4 + Framer Motion Premium UI with animations
3D Spline + Three.js Interactive 3D hero visualization
UI Components Radix UI + Lucide Icons Accessible, consistent components
Blockchain Algorand TestNet (AVM v8) Immutable record storage
Smart Contracts PyTeal (Python) Voting contract logic
Wallet Pera Wallet SDK Secure transaction signing
SDK algosdk v2.7 Algorand interaction layer

๐Ÿ“ Project Structure โ€” Files Judges Should Review

STROTAS/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“„ README.md                          โ† You are here
โ”‚
โ”œโ”€โ”€ ๐Ÿ”— contracts/                         โ† โญ SMART CONTRACT CODE
โ”‚   โ”œโ”€โ”€ voting.py                         โ† PyTeal voting contract (core logic)
โ”‚   โ”œโ”€โ”€ deploy_voting.py                  โ† Deployment script for Algorand TestNet
โ”‚   โ”œโ”€โ”€ generate_wallet.py                โ† Deployer wallet generation utility
โ”‚   โ””โ”€โ”€ requirements.txt                  โ† Python dependencies (pyteal, algosdk)
โ”‚
โ”œโ”€โ”€ ๐ŸŒ src/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ page.tsx                      โ† โญ Homepage with 3D Spline scene
โ”‚   โ”‚   โ”œโ”€โ”€ layout.tsx                    โ† Root layout with WalletProvider
โ”‚   โ”‚   โ”œโ”€โ”€ vote/page.tsx                 โ† โญ Voting module (smart contract UI)
โ”‚   โ”‚   โ”œโ”€โ”€ attendance/page.tsx           โ† โญ Attendance module (hash storage)
โ”‚   โ”‚   โ”œโ”€โ”€ certificate/page.tsx          โ† โญ Certificate module (verify + store)
โ”‚   โ”‚   โ””โ”€โ”€ certificate/share/[data]/page.tsx โ† โญ Secure Sharing (view-only link)
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ context/
โ”‚   โ”‚   โ””โ”€โ”€ WalletContext.tsx             โ† โญ Pera Wallet + Guest Mode provider
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ””โ”€โ”€ algorand.ts                   โ† โญ All Algorand SDK interactions
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ components/ui/                    โ† Reusable UI components (Button, Card, etc.)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“š docs/
โ”‚   โ”œโ”€โ”€ MVP_FLOW.md                       โ† System flow documentation
โ”‚   โ””โ”€โ”€ HACKATHON_STRUCTURE.md            โ† Project structure reference
โ”‚
โ”œโ”€โ”€ .env.local                            โ† Environment config (App IDs, Algod endpoint)
โ””โ”€โ”€ package.json                          โ† Dependencies and scripts

โญ Must-Review Files for Judges

Priority File What It Demonstrates
๐Ÿฅ‡ contracts/voting.py PyTeal smart contract โ€” 1 wallet = 1 vote, on-chain state
๐Ÿฅ‡ src/lib/algorand.ts All blockchain interactions (vote, attend, certify)
๐Ÿฅ‡ src/app/vote/page.tsx Full voting flow: opt-in โ†’ vote โ†’ live results
๐Ÿฅˆ src/context/WalletContext.tsx Pera Wallet integration + Guest Mode for demos
๐Ÿฅˆ src/app/attendance/page.tsx Hash-based attendance proof on Algorand
๐Ÿฅˆ src/app/certificate/page.tsx SHA-256 certificate verification system
๏ฟฝ src/app/certificate/share/.../page.tsx Secure view-only link sharing system
๏ฟฝ๐Ÿฅ‰ src/app/page.tsx Premium UI with 3D visualization
๐Ÿฅ‰ contracts/deploy_voting.py Automated contract deployment pipeline

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Python 3.8+ (for smart contract deployment)
  • Pera Wallet app (iOS / Android)

1. Clone & Install

git clone https://github.com/your-username/strotas.git
cd strotas
npm install

2. Configure Environment

cp .env.example .env.local
# .env.local
NEXT_PUBLIC_ALGOD_SERVER=https://testnet-api.algonode.cloud
NEXT_PUBLIC_ALGOD_PORT=443
NEXT_PUBLIC_ALGOD_TOKEN=
NEXT_PUBLIC_VOTING_APP_ID=755380217    # Pre-deployed on TestNet

3. Run the Application

npm run dev
# โ†’ Opens at http://localhost:3000

4. Deploy a New Voting Contract (Optional)

cd contracts
pip install -r requirements.txt
python generate_wallet.py              # Generate deployer wallet
# Fund it at https://bank.testnet.algorand.network/
set DEPLOYER_MNEMONIC="your 25 word mnemonic"
python deploy_voting.py                # Deploy โ†’ get new App ID

๐ŸŽฎ Demo Flow (For Hackathon Presentation)

Step 1: Open app โ†’ Show premium 3D landing page
        โ†“
Step 2: Connect Pera Wallet (or use Guest Mode)
        โ†“
Step 3: ๐Ÿ—ณ๏ธ VOTING โ†’ Opt-in โ†’ Cast vote โ†’ See live results
        โ†’ Show transaction on Pera Explorer
        โ†“
Step 4: ๐Ÿ“‹ ATTENDANCE โ†’ Generate Session โ†’ Mark Present
        โ†’ Show hash stored on-chain
        โ†“
Step 5: ๐Ÿ“œ CERTIFICATE โ†’ Upload PDF โ†’ Store hash
        โ†’ Share Link (5s expiry) โ†’ Show auto-expiry & anti-copy
        โ†’ Switch to Verify mode โ†’ Re-upload โ†’ โœ… Match!
        โ†’ Modify file โ†’ Re-upload โ†’ โŒ No match! (tamper detected)
        โ†“
Step 6: Show Pera Explorer โ†’ All transactions are public & auditable

๐Ÿ’ก Tip: Use "Change Election" to switch to a fresh App ID if you need to vote again with the same wallet.


๐Ÿ† Why Strotas Should Win

Criteria How We Excel
Innovation Zero-database architecture โ€” no backend, no SQL, pure blockchain
Technical Depth Custom PyTeal smart contract with local + global state management
Completeness 3 fully functional modules: Voting + Attendance + Certificates
UX Quality Premium dark UI with 3D Spline scene, Framer Motion animations
Algorand Usage Smart Contracts (ABI calls) + Transaction Notes (hash storage) โ€” dual approach
Trust Model Every action is verifiable on Pera Explorer โ€” zero admin control
Demo-Ready Guest Mode generates instant wallets โ€” no setup needed for judges
Scalability Multi-election support, session-based attendance, unlimited certificates

๐Ÿ” Trust Guarantees

  • โœ… 1 wallet = 1 vote โ€” Smart contract rejects duplicates
  • โœ… No admin override โ€” Contract rejects UpdateApplication and DeleteApplication
  • โœ… No vote reset โ€” ClearState is rejected to prevent gaming
  • โœ… Public auditability โ€” Every transaction visible on Pera Explorer
  • โœ… Cryptographic proofs โ€” SHA-256 hashes ensure certificate integrity


๐Ÿ”— Live Links

Resource URL
๐ŸŒ Live App http://localhost:3000 (run locally)
๐Ÿ” Voting Contract App ID 755380217 on Pera Explorer
๐Ÿ’ฐ TestNet Faucet bank.testnet.algorand.network
๐Ÿ“ฑ Pera Wallet Download

Team

Team Strotas โ€” Hackspiration'26


Trust is a protocol, not a promise.

About

Decentralized campus voting, attendance & certificate verification on Algorand. Built with Next.js 16, PyTeal smart contracts, and Pera Wallet.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors