Orbital 1: Foundation
Establish your sovereign cloud perimeter. In this phase, we provision the database that will serve as the vault for your financial intelligence.
Phase 1.1: The Sovereign Cloud
OMEGA requires a PostgreSQL database to store your historical snapshots and user settings. We use Supabase because it provides an open-source, production-grade Postgres instance with built-in Auth and APIs.
- Navigate to database.new to create a new project.
- Select the region physically closest to your server (Raspberry Pi / VPS) to minimize latency.
- Set a strong database password and store it in your password manager.
CRITICAL: API CREDENTIALS
Once your project is created, go to Project Settings > API.
You need to copy two values:
- Project URL (e.g., https://xyz.supabase.co)
- service_role key (This is your "Master Key". Never share it.)
Phase 1.2: Schema Ignition
Now we must define the structure of your vault. Navigate to the SQL Editor in your Supabase dashboard and execute the following block.
This script creates the necessary tables (`assets`, `user_assets`) and enables Row Level Security (RLS) to ensure your data remains private.
sql
-- 1. Enable RLS ALTER TABLE public.assets ENABLE ROW LEVEL SECURITY; ALTER TABLE public.user_assets ENABLE ROW LEVEL SECURITY; -- 2. Create Tables (Simplified) CREATE TABLE IF NOT EXISTS public.user_assets ( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE NOT NULL, symbol TEXT NOT NULL, balance NUMERIC DEFAULT 0, type TEXT NOT NULL, created_at TIMESTAMPTZ DEFAULT now() ); -- 3. Create Security Policies CREATE POLICY "Users can only access own data" ON public.assets FOR ALL USING (auth.uid() = user_id); CREATE POLICY "Users can only access own user_assets" ON public.user_assets FOR ALL USING (auth.uid() = user_id);