Skip to content

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

bash
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key

Optional: AI Configuration

Enable AI-powered features by configuring your AI provider:

bash
# 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 Anthropic

Optional: GitHub Integration

Enable GitHub integration for linking repositories and syncing issues:

bash
VITE_GITHUB_CLIENT_ID=your_github_client_id

📖 Note: For Anthropic Claude models, you can also set ANTHROPIC_API_KEY in your Supabase Edge Function secrets for more secure API key management.

Supabase Configuration

1. Project Setup

  1. Create a new Supabase project at supabase.com
  2. 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

  1. Get your API key from platform.openai.com
  2. Set VITE_AI_PROVIDER=openai
  3. Set VITE_AI_API_KEY=your_key
  4. Choose your model (e.g., gpt-4o-mini, gpt-4, gpt-3.5-turbo)

Anthropic Claude

  1. Get your API key from console.anthropic.com
  2. Set VITE_AI_PROVIDER=anthropic
  3. Set VITE_AI_API_KEY=your_key or configure in Supabase Edge Function secrets
  4. Choose your model (e.g., claude-3-haiku-20240307, claude-3-sonnet-20240229)

GitHub Integration

  1. 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
  2. Add to environment variables:

    bash
    VITE_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):

  1. Add all environment variables in your hosting platform's dashboard
  2. Ensure all secrets are properly configured
  3. Verify Supabase connection strings are correct
  4. Test authentication and API connections

Next Steps

Built with ❤️ for BlockForge