Skip to main content

Prerequisites

  • Python 3.11 or higher
  • Supabase account and project
  • Google API key for AI services
  • (Optional) Redis for background processing

Installation Steps

1. Clone the Repository

git clone <repository-url>
cd conformly-backend

2. Create Virtual Environment

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure Environment

cp env.example .env
# Edit .env with your configuration
Required environment variables:
# Supabase Configuration
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# AI Services
GOOGLE_API_KEY=your_google_api_key
TAVILY_API_KEY=your_tavily_key
VISION_AGENT_API_KEY=your_vision_agent_key

# Optional: Celery/Redis
USE_CELERY=true
REDIS_URL=redis://localhost:6379/0
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0

5. Set Up Supabase

  1. Create a new Supabase project
  2. Run the SQL migrations in migrations/supabase_migrations.sql
  3. Update .env with your Supabase credentials

6. Run the Application

python -m app.main
Or using the run script:
python run.py
The API will be available at http://localhost:8000

Running with Docker

See the Docker Deployment Guide for containerized setup.

Verify Installation

  1. Check API health: curl http://localhost:8000/health
  2. Access Swagger UI: http://localhost:8000/docs
  3. Test authentication endpoint: GET /api/v1/auth/me

Next: Configuration

Learn about configuration options