Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:

Node.js

v18.x or higher

Python

v3.11 or higher

PostgreSQL

v15+ (via Supabase)

Step 1: Clone the Repository

Step 2: Set Up Supabase

Create a Supabase Project

  1. Visit supabase.com and create a free account
  2. Create a new project
  3. Note your project URL and anon key

Run Database Migrations

The migrations will create all necessary tables, views, functions, and RLS policies.

Step 3: Configure Environment Variables

Frontend Environment

Create risk-legion-frontend/.env:

Backend Environment

Create backend/.env:
Never commit .env files to version control. The service role key has admin privileges.

Step 4: Install Dependencies

Frontend

Backend

Step 5: Start Development Servers

Terminal 1: Backend

You should see:

Terminal 2: Frontend

You should see:

Step 6: Create Your First User

Option A: Using Supabase Dashboard

  1. Go to your Supabase project → Authentication → Users
  2. Click “Add user”
  3. Enter email and password
  4. Enable “Auto Confirm User”

Option B: Using Signup Flow

  1. Navigate to http://localhost:8080/auth
  2. Click “Sign Up”
  3. Enter your details
  4. Confirm email (if email confirmation enabled)

Step 7: Create an Enterprise

After signing in, you’ll need an enterprise to start using the platform.

Using SQL Editor

Step 8: Verify Installation

Check API Health

Expected response:

Check Frontend

Navigate to http://localhost:8080 and verify:
  • ✅ Login page loads
  • ✅ Can sign in
  • ✅ Dashboard appears
  • ✅ No console errors

Common Issues

Problem: Cannot connect to Supabase databaseSolution:
  • Verify SUPABASE_URL and SUPABASE_ANON_KEY are correct
  • Check your internet connection
  • Ensure Supabase project is not paused
Problem: Authentication errors when calling APISolution:
  • Ensure JWT_SECRET matches your Supabase project JWT secret
  • Check that JWT token hasn’t expired
  • Verify token format in Authorization header
Problem: Frontend cannot call backend APISolution:
  • Verify CORS_ORIGINS includes frontend URL
  • Check VITE_API_BASE_URL points to correct backend
  • Clear browser cache

Next Steps

1

Review Architecture

Understand how Risk Legion is built
2

Explore User Roles

Learn about different permission levels
3

Read API Documentation

Integrate with Risk Legion API
4

Deploy to Production

Set up production environment

Getting Help

Documentation

Browse the full documentation

GitHub Issues

Report bugs and request features