Skip to main content

Environment Overview

Risk Legion supports three environments:

Supabase Project Setup

1. Create Project

  1. Go to supabase.com
  2. Create a new project
  3. Note down:
    • Project URL
    • Anon Key (public)
    • Service Role Key (secret)

2. Database Setup

Run migrations to set up the database schema:

3. Enable Row Level Security

4. Configure Auth

In Supabase Dashboard → Authentication:
  1. Enable Email/Password provider
  2. Configure password requirements
  3. Set up email templates (optional)
  4. Configure redirect URLs

Backend Environment

Required Variables

Generate Secret Key

Frontend Environment

Required Variables

Environment-Specific Files

AWS Setup (EC2)

1. Create EC2 Instance

  • Type: t3.small or larger
  • AMI: Ubuntu 22.04 LTS
  • Security Group: Allow ports 22, 80, 443, 8000

2. Install Docker

3. Configure nginx

4. Set Up SSL

GitHub Secrets

Configure these secrets in GitHub repository settings:

AWS Secrets

Application Secrets

Vercel Setup (Frontend)

1. Connect Repository

  1. Go to vercel.com
  2. Import GitHub repository
  3. Select risk-legion-frontend directory

2. Configure Environment

In Vercel Dashboard → Settings → Environment Variables:

3. Configure Rewrites

In vercel.json:

Environment Validation

Backend Startup Check

The backend validates required environment variables on startup:

Health Check Validation

Expected response: