Configuration
Configure BlockForge to work with your services and customize it to your needs.
Environment Variables
BlockForge uses environment variables for configuration. Create a .env.local file in your project root.
Required Variables
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_keyOptional: AI Configuration
Enable AI-powered features by configuring your AI provider:
# AI Provider (openai or anthropic)
VITE_AI_PROVIDER=openai
# API Key
VITE_AI_API_KEY=your_ai_api_key
# Model Selection
VITE_AI_MODEL=gpt-4o-mini # for OpenAI
# or
VITE_AI_MODEL=claude-3-haiku-20240307 # for AnthropicOptional: GitHub Integration
Enable GitHub integration for linking repositories and syncing issues:
VITE_GITHUB_CLIENT_ID=your_github_client_id📖 Note: For Anthropic Claude models, you can also set
ANTHROPIC_API_KEYin your Supabase Edge Function secrets for more secure API key management.
Supabase Configuration
1. Project Setup
- Create a new Supabase project at supabase.com
- Get your project URL and anon key from Settings > API
2. Database Schema
Run the SQL scripts in the supabase/ directory to set up your database schema.
3. Authentication
Configure authentication providers in Supabase:
- Email/Password (default)
- GitHub OAuth (optional)
- Other providers as needed
4. Storage
Set up storage buckets for file uploads:
- Create buckets for
images,documents, etc. - Configure appropriate RLS (Row Level Security) policies
AI Provider Setup
OpenAI
- Get your API key from platform.openai.com
- Set
VITE_AI_PROVIDER=openai - Set
VITE_AI_API_KEY=your_key - Choose your model (e.g.,
gpt-4o-mini,gpt-4,gpt-3.5-turbo)
Anthropic Claude
- Get your API key from console.anthropic.com
- Set
VITE_AI_PROVIDER=anthropic - Set
VITE_AI_API_KEY=your_keyor configure in Supabase Edge Function secrets - Choose your model (e.g.,
claude-3-haiku-20240307,claude-3-sonnet-20240229)
GitHub Integration
Create a GitHub OAuth App:
- Go to GitHub Settings > Developer settings > OAuth Apps
- Register a new OAuth application
- Set Authorization callback URL
- Copy the Client ID
Add to environment variables:
bashVITE_GITHUB_CLIENT_ID=your_github_client_id
📖 Learn more: See GitHub Integration Guide for detailed setup.
Production Deployment
When deploying to production (e.g., Vercel):
- Add all environment variables in your hosting platform's dashboard
- Ensure all secrets are properly configured
- Verify Supabase connection strings are correct
- Test authentication and API connections