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
- Visit supabase.com and create a free account
- Create a new project
- 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
Createrisk-legion-frontend/.env:
Backend Environment
Createbackend/.env:
Step 4: Install Dependencies
Frontend
Backend
Step 5: Start Development Servers
Terminal 1: Backend
Terminal 2: Frontend
Step 6: Create Your First User
Option A: Using Supabase Dashboard
- Go to your Supabase project → Authentication → Users
- Click “Add user”
- Enter email and password
- Enable “Auto Confirm User”
Option B: Using Signup Flow
- Navigate to
http://localhost:8080/auth - Click “Sign Up”
- Enter your details
- 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
Check Frontend
Navigate tohttp://localhost:8080 and verify:
- ✅ Login page loads
- ✅ Can sign in
- ✅ Dashboard appears
- ✅ No console errors
Common Issues
Database connection failed
Database connection failed
Problem: Cannot connect to Supabase databaseSolution:
- Verify
SUPABASE_URLandSUPABASE_ANON_KEYare correct - Check your internet connection
- Ensure Supabase project is not paused
JWT verification failed
JWT verification failed
Problem: Authentication errors when calling APISolution:
- Ensure
JWT_SECRETmatches your Supabase project JWT secret - Check that JWT token hasn’t expired
- Verify token format in Authorization header
CORS errors
CORS errors
Problem: Frontend cannot call backend APISolution:
- Verify
CORS_ORIGINSincludes frontend URL - Check
VITE_API_BASE_URLpoints 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