A comprehensive grant analysis dashboard that aggregates data from multiple grant systems across the Ethereum ecosystem using the DAOIP-5 metadata standard.
- Unified Grant Data: Aggregates data from Octant, Giveth, Stellar, Celo, and more
- Real-time Analytics: Live ecosystem statistics and funding metrics
- Accurate Currency Conversion: Historical price data for precise USD calculations
- Cross-system Analysis: Compare funding mechanisms and approval rates
- Interactive Dashboard: Modern React-based UI with real-time updates
- DAOIP-5 Compliant: Standardized metadata format for interoperability
- Configurable Systems: Single source of truth for active grant systems
- Total ecosystem funding across all systems
- Grant rounds and application statistics
- Active grant systems monitoring
- Average approval rates and trends
- Individual system performance metrics
- Funding mechanism analysis
- Historical trend visualization
- Cross-system comparisons
- Centralized Configuration: All system metadata managed in
server/config/systemsConfig.ts - Security-First Design: Only manual code changes can enable/disable systems
- Read-Only API Access: Public endpoints only show active system information
- Priority-Based Ordering: Configure system display order and priority
- β Fixed CORS issues with API proxy endpoints
- β Real data fetching replacing hardcoded fallbacks
- β Accurate currency conversion with historical rates
- β Comprehensive system coverage (6+ grant systems)
- β Secure configuration management with manual control
- Node.js v18 or higher
- pnpm (recommended package manager)
- PostgreSQL database (local or cloud)
git clone <repository-url>
cd Grants-Gateway-API
# Install dependencies with pnpm
pnpm install# Copy environment template
cp .env.example .envEdit .env with your configuration:
# Required: Database URL
DATABASE_URL="postgresql://username:password@localhost:5432/grants_gateway"
# Optional: API Configuration
NODE_ENV=development
PORT=5000
SESSION_SECRET="your-random-secret-key-change-this"
# Optional: External API Keys (for rate limiting bypass)
COINGECKO_API_KEY=""
KARMA_API_KEY=""# Install PostgreSQL (macOS)
brew install postgresql
brew services start postgresql
# Create database
createdb grants_gatewayUse a cloud provider:
- Neon: https://neon.tech (recommended)
- Supabase: https://supabase.com
- Railway: https://railway.app
# Push database schema
pnpm run db:pushEdit server/config/systemsConfig.ts to enable/disable systems:
{
"activeSystems": [
{
"id": "octant",
"name": "Octant",
"enabled": true, // Set to false to disable
"priority": 1,
// ... other metadata
}
]
}# Start the application
pnpm run devThe app will be available at http://localhost:5000
| Endpoint | Description |
|---|---|
| http://localhost:5000 | Main application |
| http://localhost:5000/dashboard | Grant analytics dashboard |
| http://localhost:5000/api/health | API health check |
| http://localhost:5000/endpoints | API documentation |
| http://localhost:5000/query-builder | Interactive query builder |
# Development
pnpm run dev # Start development server with hot reload
# Production
pnpm run build # Build for production
pnpm start # Start production server
# Database
pnpm run db:push # Push schema changes to database
pnpm run db:generate # Generate migration files
pnpm run db:migrate # Run database migrations
# Utilities
pnpm run check # Run TypeScript type checking
pnpm run install:clean # Clean install (removes node_modules and lock file)
# Testing
pnpm run test:api # Test API health endpoint
pnpm run test:accurate # Test accurate analytics endpoint# Ecosystem statistics
GET /api/v1/analytics/ecosystem-stats
# System-specific metrics
GET /api/v1/analytics/system/:systemName?source=opengrants
# Funding trends
GET /api/v1/analytics/funding-trends# Get active systems configuration
GET /api/v1/systems/config/active
# Get available source types
GET /api/v1/systems/config/source-types# All grant systems
GET /api/v1/systems
# Grant pools
GET /api/v1/pools?system=octant
# Grant applications
GET /api/v1/applications?system=giveth&poolId=pool-id# OpenGrants API proxy
GET /api/proxy/opengrants/:endpoint
# DAOIP-5 static files proxy
GET /api/proxy/daoip5/:system/:file- Edit Configuration File: Modify
server/config/systemsConfig.ts - Change enabled flag: Set
"enabled": true/falsefor the target system - Restart Application: The server must be restarted for changes to take effect
{
"activeSystems": [
{
"id": "system-identifier",
"name": "System Name",
"displayName": "Public Display Name",
"source": "opengrants" | "daoip5" | "custom",
"enabled": true, // Manual control only
"priority": 1, // Display order
"metadata": {
"description": "System description",
"website": "https://system-website.com",
// ... additional metadata
}
}
]
}- Public Endpoints: Only return information about enabled systems
- Configuration Viewing: Read-only access to active systems configuration
- No Modification API: No endpoints exist for changing system status
Error: DATABASE_URL must be set
Solution: Ensure valid DATABASE_URL in .env file
Failed to load systems configuration: ENOENT
Solution: Ensure server/config/systemsConfig.ts exists and is properly formatted
Error: listen EADDRINUSE: address already in use :::5000
Solution: Change port in .env or kill existing process:
# Change port
echo "PORT=3000" >> .env
# Or kill process
lsof -ti:5000 | xargs kill -9# Install pnpm globally
npm install -g pnpm
# Or use npm instead
npm install
npm run dev# Check for type errors
pnpm run check
# Clean install if needed
pnpm run install:clean# Reset database schema
pnpm run db:push- Check
systemsConfig.ts- ensure"enabled": true - Restart the development server
- Verify system configuration syntax is correct
| Metric | Before | After |
|---|---|---|
| Funding Totals | 0-20% accurate (random data) | 95-99% accurate (real APIs) |
| Application Counts | 10-30% accurate (samples) | 98-99% accurate (complete data) |
| Approval Rates | 0% accurate (hardcoded) | 95-98% accurate (calculated) |
| Currency Conversion | 50-70% accurate (basic ETH/USD) | 90-95% accurate (historical rates) |
| Historical Trends | 0% accurate (fabricated) | 95-99% accurate (real time-series) |
- β Octant - Quadratic funding via OpenGrants API
- β Giveth - Donation platform via OpenGrants API
- β Stellar - Cross-border payments via DAOIP-5
- β Celo - Mobile-first blockchain via DAOIP-5
- π Optimism - L2 grants via DAOIP-5
- π Arbitrum Foundation - L2 ecosystem via DAOIP-5
- π Gitcoin - Coming soon (Allo Protocol integration)
Note: Systems can be enabled/disabled by editing server/config/systemsConfig.ts and restarting the application.
External APIs β Server Proxy β Data Validation β Analytics Engine β Dashboard UI
β
Systems Configuration
- Systems Configuration Service: Centralized system management
- API Proxy: Resolves CORS issues for external APIs
- Accurate Data Service: Fetches real data replacing fallbacks
- Historical Price Service: Provides accurate currency conversion
- Analytics Engine: Computes ecosystem-wide metrics
- React Dashboard: Modern UI with real-time updates
- Single Source of Truth:
server/config/systemsConfig.ts - Security-First: Manual changes only, no API modifications
- Type-Safe: TypeScript interfaces for configuration validation
- Hot Reload: Frontend changes apply immediately, server changes require restart
Quick Deploy:
# Run the deployment helper script
./deploy-to-render.shManual Steps:
- Push your code to GitHub
- Create PostgreSQL database on Render
- Create web service connected to your GitHub repo
- Configure environment variables
- Deploy!
Detailed Instructions: Render Deployment Guide
# Build Docker image
pnpm run docker:build
# Run locally with Docker
pnpm run docker:run
# Deploy to any Docker-compatible platformThe app can be deployed to any Node.js hosting platform:
- Vercel: Use
vercelCLI - Railway: Connect GitHub repository
- Heroku: Use
git push heroku main - DigitalOcean App Platform: Connect GitHub repository
- Update Configuration: Add system definition to
systemsConfig.ts - Create Adapter: Implement adapter in
server/adapters/if needed - Test Integration: Verify data fetching and transformation
- Update Documentation: Add system to supported list
- Never expose system control APIs to public endpoints
- Always require manual configuration changes for system modifications
- Validate configuration on startup and fail fast if invalid
- Log configuration changes for audit trails
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: Available at
/endpointswhen running locally - Health Check:
/api/healthendpoint for monitoring - Configuration Help: See
server/config/systemsConfig.tsfor examples
Built with β€οΈ for the Ethereum ecosystem
Security Notice: This application implements a security-first approach to system management. All system configuration changes must be made manually through code changes, ensuring complete administrative control and preventing unauthorized modifications.