Open source Next.js app for the World Republic platform—discover and found parties, prep for elections and referendums, and verify identity with Self before voting. Includes server actions and UI; wire up your own auth, database, and deploy stack to get started.
- Political parties — Discover and create global political parties
- Voting — Participate in test elections and referendums
- Identity verification — Zero-knowledge proof verification via Self
- Digital wallet — Manage WDD (world drachma) transactions
- Internationalization — 50+ languages supported
- Framework: Next.js 16 (App Router), React 19
- Database: PostgreSQL (Neon) with Drizzle ORM
- Auth: NextAuth.js v5 (Google OAuth, WebAuthn)
- Identity: Self (zero-knowledge verification)
- Blockchain: thirdweb (WDD transactions)
- UI: Worldcoin Mini Apps UI Kit, Tailwind CSS
- Code quality: Biome (linting/formatting)
-
Install dependencies
pnpm install
-
Copy environment variables
cp .env.example .env.local
-
Configure environment variables:
LOCAL_DATABASE_URL— local Postgres (e.g., Neon Local Connect) — https://console.neon.tech/DATABASE_URL— remote Postgres URL — https://console.neon.tech/NEXTAUTH_SECRET— secret for NextAuth (generate withopenssl rand -base64 32)NEXTAUTH_URL— app base URL (e.g., http://localhost:3000)AUTH_GOOGLE_ID/AUTH_GOOGLE_SECRET— Google OAuth credentials — https://console.cloud.google.com/apis/credentialsTHIRDWEB_SECRET_KEY— thirdweb secret key — https://thirdweb.com/dashboard
-
Set up database
pnpm tsx scripts/reset-database.ts # Reset and apply schema pnpm tsx scripts/seed-parties.ts # Optional: seed sample parties
-
Run the app
pnpm dev
Then open
http://localhost:3000
pnpm dev— Start development server with Turbopackpnpm build— Build for productionpnpm start— Start production serverpnpm lint— Run Biome linterpnpm lint:fix— Auto-fix linting issuespnpm format— Format code with Biome
- Migrations: Schema is managed with Drizzle ORM (see
drizzle/directory) - Reset:
pnpm tsx scripts/reset-database.ts— drops all tables and applies fresh schema - Seed:
pnpm tsx scripts/seed-parties.ts— populates sample parties
AGPL-3.0 — See LICENSE file for details.