Decentralized Autonomous Organization for funding student innovation across Indian Universities.
🌐 Live Demo: campusimpact-dao-faly.vercel.app
- 🔗 Wallet Connect — Connect MetaMask, Coinbase, or any wallet via RainbowKit
- 📝 Submit Proposals — Multi-step form to submit your campus project idea
- 🗳️ Community Voting — Token holders vote YES/NO on proposals
- 🏦 Treasury — Funds auto-disbursed via smart contracts on Polygon
- 📊 Live Dashboard — Real-time data from Supabase PostgreSQL database
- ⛓️ Smart Contracts — CampusToken (ERC-20), Governor, and Treasury contracts
| Layer | Technology |
|---|---|
| Frontend | Next.js 14, TypeScript, Tailwind CSS, Framer Motion |
| Web3 | wagmi v2, viem v2, RainbowKit |
| Database | Supabase (PostgreSQL) |
| Smart Contracts | Solidity, OpenZeppelin |
| Network | Polygon / Polygon Amoy (Testnet) |
Make sure you have these installed on your computer:
- Node.js (v18 or higher) → Download here
- Git → Download here
- A Supabase account (free) → supabase.com
git clone https://github.com/Samarth9179/Campusimpact-dao.git
cd Campusimpact-daonpm installThis may take 1-2 minutes. It will install all the Web3 and UI libraries.
- Go to supabase.com and create a free account
- Click "New Project" and give it a name (e.g.
campusimpact) - Once the project loads, click "SQL Editor" in the left sidebar
- Click "New Query" and paste the following SQL, then click Run:
create table proposals (
id uuid default gen_random_uuid() primary key,
title text not null,
description text not null,
category text not null,
university text not null,
team_size integer not null,
funding_amount numeric not null,
funding_token text not null,
duration integer not null,
tags text[] default '{}',
milestones jsonb not null default '[]',
status text not null default 'pending',
proposer_address text not null,
created_at timestamp with time zone default timezone('utc'::text, now()) not null
);
-- Allow anyone to read and insert proposals
alter table proposals enable row level security;
create policy "allow_all_inserts" on proposals for insert with check (true);
create policy "allow_all_selects" on proposals for select using (true);
-- Also create the votes table
create table if not exists votes (
id uuid default gen_random_uuid() primary key,
proposal_id text not null,
voter_address text not null,
choice text not null check (choice in ('yes', 'no')),
created_at timestamp with time zone default timezone('utc'::text, now()) not null,
unique (proposal_id, voter_address)
);
alter table votes enable row level security;
create policy "allow_all_inserts_votes" on votes for insert with check (true);
create policy "allow_all_selects_votes" on votes for select using (true);- In the project folder, copy the example env file:
# On Windows (PowerShell):
Copy-Item .env.example .env.local
# On Mac / Linux:
cp .env.example .env.local- Open
.env.localin a text editor and fill in your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key_hereWhere to find these values in Supabase:
- Go to your Supabase project → Settings (gear icon) → API
- Copy the Project URL and anon / public key
npm run devOpen your browser and go to: http://localhost:3000
campusimpact-dao/
├── app/ # Next.js App Router pages
│ ├── page.tsx # Landing page
│ ├── layout.tsx # Root layout with Web3 providers
│ ├── providers.tsx # wagmi + RainbowKit + React Query
│ └── app/
│ ├── page.tsx # Dashboard
│ ├── proposals/ # Proposals list + detail pages
│ ├── submit/ # Submit a proposal (multi-step form)
│ ├── treasury/ # Treasury overview
│ └── governance/ # Governance stats
├── components/
│ ├── layout/ # Navbar, Sidebar
│ ├── proposals/ # ProposalCard component
│ └── ui/ # Button, GlassCard, VoteBar, etc.
├── contracts/ # Solidity smart contracts
│ ├── CampusToken.sol # ERC-20 governance token (CIMP)
│ ├── CampusGovernor.sol # DAO voting and proposal logic
│ └── CampusTreasury.sol # Fund vault controlled by Governor
├── lib/
│ ├── supabase.ts # Supabase client
│ ├── mockData.ts # Demo data for UI testing
│ └── utils.ts # Shared utility functions
├── types/ # TypeScript type definitions
├── .env.example # Template for environment variables
└── README.md # You are here!
- ✅
.env.localis in.gitignoreand will never be committed to GitHub - ✅ Smart contracts use OpenZeppelin audited libraries
- ✅ Treasury funds can only be released by successful DAO proposals
- ✅ Supabase Row Level Security (RLS) is enabled on the proposals table
- Connect your wallet — Click "Connect Wallet" in the navbar and connect MetaMask
- Submit a proposal — Go to
/app/submitand fill out the form - View your proposal — Go to
/app/proposals— your new proposal appears at the top - Vote on a proposal — Click any active proposal → click "Vote YES" or "Vote NO"
- Check the database — Go to Supabase → Table Editor → proposals table → your data is there!
| Contract | Description |
|---|---|
CampusToken.sol |
ERC-20 governance token (CIMP). Determines voting power. |
CampusGovernor.sol |
DAO logic — proposal lifecycle, voting, quorum enforcement. |
CampusTreasury.sol |
Holds USDC/MATIC. Only releases funds on successful proposals. |
Contracts are ready to deploy on Polygon or Polygon Amoy testnet using Hardhat or Foundry.
Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.
MIT — Free to use, modify, and distribute.