Streamlining Polkadot bounty grants from submission to payout in one unified web3 platform.
GrantFlow.dev is an all-in-one platform that consolidates grant submissions, reviews, approvals, and payouts for Polkadot bounty programs. It replaces scattered channels (GitHub, Discord, Google Docs) with structured forms, real-time tracking, collaborative dashboards, integrated chat features, and smart contract integrations for efficient, transparent processes.
| GrantFlow.Dev website | Documentation |
- Grant Submission System: Structured forms with draft caching and GitHub integration
- Review Dashboard: Committee-based review workflows with voting and discussion threads
- Milestone Tracking: Progress tracking with deliverable submissions and milestone reviews
- Real-time Communication: Integrated discussion threads for committees and grantees
- Role-Based Access: Specialized views for Grantees, Reviewers, and Public transparency
- Committee Management: Multi-committee support with grant program management
- On-Chain Integration: Polkadot multisig wallet integration for milestone-based payouts (Milestone 2)
- Framework: Next.js 15 with App Router
- React: React 19 with TypeScript
- Database: PostgreSQL with Drizzle ORM
- UI Library: shadcn/ui with Tailwind CSS
- Authentication: NextAuth.js with GitHub OAuth
- Real-time: Server-Sent Events (SSE) for notifications
- Testing: Vitest for unit and integration tests
- Node.js 18+ and pnpm
- Docker and Docker Compose (for local PostgreSQL)
- GitHub account (for OAuth authentication)
# Clone the repository
git clone https://github.com/MbBrainz/grantflow-dev.git
cd grantflow-dev
# Install dependencies
pnpm installBefore running the database setup, you must create a .env file. The easiest way is to copy the example:
cp .env.example .envThe .env.example file contains the correct DATABASE_URL that matches the Docker Compose configuration:
DATABASE_URL=postgresql://postgres:postgres@localhost:5433/grantflowImportant configuration notes:
- Port
5433is used (not the default5432) to avoid conflicts with local PostgreSQL instances - The credentials (
postgres:postgres) match the Docker Compose configuration - Database name is
grantflow
Generate AUTH_SECRET (required for authentication):
openssl rand -base64 32Then update your .env file with the generated secret.
The easiest way to set up the database is using the included setup script, which starts PostgreSQL via Docker and initializes the database:
pnpm db:setupThis command:
- Starts a PostgreSQL container using
docker-compose.yml - Waits for the database to be ready
- Cleans existing tables (if any)
- Pushes the schema from Drizzle ORM
- Seeds the database with test data
Manual Setup (if you prefer):
# Start PostgreSQL container
docker-compose up -d postgres
# Clean database (optional, removes all data)
pnpm db:clean
# Push schema to database
pnpm db:push
# Seed with test data
pnpm db:seedpnpm devOpen http://localhost:3000 in your browser.
pnpm db:setup- Complete setup: starts PostgreSQL, cleans, pushes schema, and seedspnpm db:reset- Reset database: clean → push schema → seedpnpm db:clean- Drop all tables (⚠️ removes all data)pnpm db:push- Push Drizzle schema to databasepnpm db:seed- Seed database with test datapnpm db:studio- Open Drizzle Studio (database GUI)
The seed script (scripts/db/seed.ts) creates a comprehensive test environment:
Committees Created:
- Infrastructure Development Committee (with multisig enabled)
- Research & Education Committee
- DeFi Innovation Committee
- Gaming & NFT Committee
Test Accounts:
Reviewers (password: reviewer123):
reviewer1@test.com- Alex Chen (Infrastructure Committee admin)reviewer2@test.com- Maria Rodriguez (Infrastructure Committee member)reviewer3@test.com- David Kim (Research Committee)reviewer4@test.com- Elena Vasquez (DeFi Committee)
Grantees (password: team1234):
team1@test.com- NextGen SDK Teamteam2@test.com- Layer2 Research Groupteam3@test.com- YieldOpt Protocol Teamteam4@test.com- Blockchain Education Collectiveteam5@test.com- NFT Gaming Studio
Test Data Includes:
- 6 grant programs across committees
- 10 submissions in various states (approved, in-review, pending, rejected)
- 13 milestones with different statuses
- Discussion threads and messages
- Reviews and votes
- Completed payouts
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test:coverageTests are located in the __tests__ directory and use Vitest.
# Development
pnpm dev # Start dev server with Turbopack
pnpm build # Build for production
pnpm start # Start production server
# Code Quality
pnpm lint # Run ESLint
pnpm lint:fix # Fix ESLint errors
pnpm format # Format code with Prettier
pnpm typecheck # Type check with TypeScript
# Database
pnpm db:setup # Complete database setup
pnpm db:reset # Reset database
pnpm db:seed # Seed database
pnpm db:studio # Open Drizzle Studiograntflow-dev/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── (dashboard)/ # Protected dashboard routes
│ │ ├── (login)/ # Authentication routes
│ │ └── api/ # API routes
│ ├── components/ # React components
│ │ ├── ui/ # shadcn/ui components
│ │ ├── submissions/ # Submission-related components
│ │ ├── review/ # Review workflow components
│ │ └── milestone/ # Milestone tracking components
│ ├── lib/ # Utility libraries
│ │ ├── db/ # Database queries and schema
│ │ ├── auth/ # Authentication utilities
│ │ └── polkadot/ # Polkadot integration
│ └── types/ # TypeScript type definitions
├── scripts/
│ └── db/ # Database scripts (seed, clean, setup)
├── docs/ # Documentation
├── docker-compose.yml # PostgreSQL Docker configuration
└── drizzle.config.ts # Drizzle ORM configuration
- User Guides - Walkthrough guides for grantees and reviewers
- Quickstart Guide - Quick setup instructions
- Deployment Guide - Production deployment instructions
This project is part of the Polkadot Fast-Grants Programme. For issues and contributions, please use the GitHub repository.
MIT License - see LICENSE file for details.