Skip to content

Latest commit

 

History

History
132 lines (108 loc) · 2.47 KB

INSTALL.md

File metadata and controls

132 lines (108 loc) · 2.47 KB

Installation Guide 📦

Prerequisites

  1. Node.js 20+

    • Download from nodejs.org
    • Required for development and build
  2. Supabase Account

    • Sign up at supabase.com
    • Create a new project
    • Get required credentials:
      • Project URL (format: https://<project>.supabase.co)
      • Anon/Public key (starts with eyJ)
      • Service Role key (for setup)
  3. Required API Keys

    • OpenAI API key (Required)
    • Affinda API key (Optional)

Local Development Setup

  1. Clone Repository
git clone <repository-url>
cd clappcode
  1. Install Dependencies
npm install
  1. Configure Environment

    • Click "Connect to Supabase" in the app
    • Enter your Supabase credentials:
      • Project URL (format: https://<project>.supabase.co)
      • Anon/Public key (starts with eyJ)
    • Configure API keys:
      • OpenAI API key (Required)
      • Affinda API key (Optional)
  2. Verify Setup

npm run verify
  1. Start Development Server
npm run dev

Docker Setup

Development

docker-compose -f docker-compose.dev.yml up

Testing

docker-compose -f docker-compose.test.yml up

Production

docker-compose -f docker-compose.prod.yml up

Testing

Run All Tests

npm test

Run E2E Tests

npm run test:e2e

Run Integration Tests

npm run test:integration

Troubleshooting

Database Connection Issues

  1. Check Supabase credentials format:
    • URL must be https://<project>.supabase.co
    • Keys must start with eyJ
  2. Verify project status in Supabase dashboard
  3. Run connection test:
    npm run verify

API Key Issues

  1. Verify key formats:
    • OpenAI: starts with sk-
    • Affinda: 64 characters
  2. Check API quotas and limits
  3. Test API access:
    npm run test:api

Docker Issues

  1. Check Docker installation:
    docker --version
    docker-compose --version
  2. Verify port availability:
    lsof -i :5173
  3. Check container logs:
    docker-compose logs

Support