Non-custodial voting platform for web3 repositories. Vote with tokens that stay in your wallet.
- 🔐 Wallet Authentication - thirdweb-powered secure login
- 📝 Repository Submission - Submit repos for community voting
- 🗳️ Non-Custodial Voting - Tokens never leave your wallet
- 📊 Real-time Leaderboards - Live rankings and statistics
- 📈 Historical Data - Track voting trends over time
| Technology | Purpose |
|---|---|
| Next.js 14 + TypeScript | Full-stack React framework |
| PostgreSQL + Prisma | Database and ORM |
| thirdweb SDK | Voting contracts & authentication |
| decent.xyz | Multi-token support |
| Vercel | Hosting + serverless functions |
# Clone and setup
git clone https://github.com/devoter-xyz/devoter-app
cd devoter-voting
pnpm install
# Setup database
npx dotenv -e .env.local -- npx prisma db push
# Start development
pnpm devTo get started, create a .env file in the root of the project by copying .env.example.
cp .env.example .envThis file should contain the following environment variables. For local development, you can use the placeholder values provided in .env.example or replace them with your actual credentials.
In CI environments, .env.example is copied to .env if present. If .env.example is not found, the CI process will continue without it, assuming environment variables are provided by other means (e.g., GitHub Secrets).
DATABASE_URL=postgresql://username:password@localhost:5432/devoter
NEXT_PUBLIC_THIRDWEB_CLIENT_ID=your_client_id
THIRDWEB_SECRET_KEY=your_secret_key# View database in browser
npx dotenv -e .env.local -- npx prisma studio
# Run database migrations
npx dotenv -e .env.local -- npx prisma migrate dev
# Reset database (development only)
npx dotenv -e .env.local -- npx prisma migrate reset
# Run database seeder
npx dotenv -e .env.local -- ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.tsTo create actions restricted to admin users, use the adminActionClient from src/lib/actions.ts. This client will verify that the user is authenticated and is present in the AdminUser table.
// src/actions/admin/someAdminAction.ts
import { adminActionClient } from '@/lib/actions';
export const someAdminAction = adminActionClient.action(async ({ ctx }) => {
// This code will only execute if the user is an admin
console.log('Admin user ID:', ctx.session.userId);
// ... your admin logic here
});To add an admin user, you need to manually add their user ID to the AdminUser table in the database. You can do this using Prisma Studio:
- Start Prisma Studio:
npx dotenv -e .env.local -- npx prisma studio
- Open your browser to
http://localhost:5555. - Navigate to the
AdminUsermodel. - Click "Add record" and enter the
idandwalletAddressof the user you want to make an admin. Theidshould be the user's ID from theUsertable.
| Component | Platform | Auto-Deploy |
|---|---|---|
| 🌐 Main App | Vercel | ✅ On push to main |
| ⏰ Cron Jobs | Vercel Functions | ✅ Configured in vercel.json |
| 💾 Database | Vercel PostgreSQL | ✅ Managed service |
Empowering Web3 Repository Discovery 🚀