Infrastructure & Process Documentation

DevOps Center

Complete system architecture, service inventory, deployment processes, and operational runbooks for OmegaOS.

System Status

Frontend

Cloudflare Pages

omegaos.co

Backend API

Supabase Edge Functions

ckeykrgdnddjdojkxmyt.supabase.co

Database

Supabase PostgreSQL

RLS Enabled

Email

Resend API

Welcome emails active

Auth

Supabase Auth

Email/password + RLS

🔴

Domain Email

Resend DNS Pending

@omegaos.co verification

Architecture Overview

  Client Browser
       |
       v
  Cloudflare CDN (omegaos.co)
  [Pages: Static HTML/JS]
       |
       +---> Supabase Auth (signup/login)
       |
       +---> Supabase Edge Functions (Deno)
       |       |
       |       +---> /signup (public, creates user + sends welcome email)
       |       +---> /profile (auth'd, get/update profile)
       |       +---> /documents (auth'd, list/upload docs)
       |       +---> /chat (auth'd, AI assistant)
       |       |
       |       +---> Resend API (transactional email)
       |
       +---> Supabase PostgreSQL (RLS-protected)
               |
               +---> clients (profile data)
               +---> client_documents (uploaded files)
               +---> messages (chat history)
    

Service Inventory

ServiceProviderTierCost/moStatus
Frontend Hosting Cloudflare Pages Free $0.00 Live
DNS & CDN Cloudflare Free $0.00 Live
Domain Cloudflare Registrar At-cost ~$0.75 Active
Database Supabase Free $0.00 Live
Edge Functions Supabase Free (500K invocations) $0.00 Live
Auth Supabase Auth Free (50K MAU) $0.00 Live
Transactional Email Resend Free (3K/mo) $0.00 Live
File Storage Supabase Storage Free (1GB) $0.00 Live
Payment Processing Stripe (planned) Pay-as-you-go 2.9% + $0.30/txn Planned
Payroll Integration Gusto Embedded API Partner TBD Planned
Current monthly operating cost: $0.75/mo (domain only). All infrastructure runs on free tiers.

Deployment Process

Frontend (Cloudflare Pages)

All HTML files are in the omega-site/ directory and deployed via Wrangler CLI.

# Deploy all pages
cd omega-site
npx wrangler pages deploy . --project-name omega-pipeline

# Verify deployment
curl -s -o /dev/null -w "%{http_code}" https://omegaos.co/

Backend (Supabase Edge Functions)

Edge functions run on Deno and are deployed via Supabase CLI or dashboard.

# Deploy edge function
npx supabase functions deploy onboarding --project-ref ckeykrgdnddjdojkxmyt

# Set secrets
npx supabase secrets set RESEND_API_KEY=re_xxx --project-ref ckeykrgdnddjdojkxmyt

# Check logs
# Dashboard: supabase.com/dashboard/project/ckeykrgdnddjdojkxmyt/functions/onboarding/logs

Database Schema

clients

ColumnTypeConstraints
iduuid (PK)References auth.users
full_nametext
business_nametext
emailtext
phonetext
entity_typetextCHECK: llc, s-corp, c-corp, sole-proprietorship, partnership, nonprofit
eintext
urgencytextCHECK: immediate, this-month, this-quarter, exploring
services_neededtext[]
onboarding_statustextCHECK: pending, in_progress, in-review, active, archived
created_attimestamptzDEFAULT now()

client_documents

ColumnTypeConstraints
iduuid (PK)DEFAULT gen_random_uuid()
client_iduuid (FK)References clients.id
document_nametextNOT NULL
document_categorytextCHECK: tax-return, bank-statement, profit-loss, balance-sheet, w2, w9, 1099, articles-of-incorporation, ein-letter, insurance-policy, lease-agreement, payroll-report, other
storage_pathtext
uploaded_attimestamptzDEFAULT now()

Row Level Security (RLS)

All tables have RLS enabled. Clients can only access their own records.

-- clients: users see only their own row
CREATE POLICY "Users read own client" ON clients
  FOR SELECT USING (auth.uid() = id);

-- client_documents: users see only their own documents
CREATE POLICY "Users read own docs" ON client_documents
  FOR SELECT USING (client_id = auth.uid());

API Endpoints

EndpointMethodAuthDescription
/functions/v1/onboarding/signupPOSTPublicCreate account, profile, send welcome email
/functions/v1/onboarding/profileGETBearer tokenRetrieve client profile
/functions/v1/onboarding/submit-profilePOSTBearer tokenUpdate client profile fields
/functions/v1/onboarding/documentsGETBearer tokenList uploaded documents
/functions/v1/onboarding/register-documentPOSTBearer tokenRegister a document upload
/functions/v1/onboarding/chatPOSTBearer tokenAI assistant chat message

Project Timeline

Phase 1 — Completed

Core Infrastructure

Cloudflare Pages hosting, Supabase database, auth, edge functions, domain setup (omegaos.co)

Phase 2 — Completed

Client Onboarding

6-step onboarding wizard, document upload, AI chat assistant, welcome email automation

Phase 3 — Completed

Forms & Compliance

Forms library, compliance center, workflow visualization, PDF templates

Phase 4 — In Progress

Operations & Billing

DevOps page, financial tracker, Pay Bill feature, Payroll integration, email templates, M&A directory

Phase 5 — Planned

Advanced Features

Stripe payment processing, Gusto payroll API, CSV/Excel document processing, IRS payment integration

Phase 6 — Planned

Custom Payroll & Automation

In-house payroll calculations, automated tax filing, client reporting dashboards, Podio full migration

Secrets & Credentials Registry

Secrets are stored securely in Supabase Edge Function environment. Never commit secrets to code.
SecretLocationPurposeRotation
SUPABASE_URLEdge Function EnvDatabase connectionStatic
SUPABASE_ANON_KEYEdge Function Env + FrontendPublic API accessStatic
SUPABASE_SERVICE_ROLE_KEYEdge Function EnvAdmin DB operationsRotate quarterly
RESEND_API_KEYEdge Function EnvSend transactional emailRotate quarterly

Operational Runbooks

Add a New Page

  1. Create pagename.html in omega-site/
  2. Follow existing design system (copy CSS variables)
  3. Add nav link to all pages' nav bar
  4. Deploy: npx wrangler pages deploy .
  5. Verify: curl https://omegaos.co/pagename.html
  6. Update this DevOps page's service inventory

Add a New Edge Function Endpoint

  1. Add route handler in onboarding function
  2. Add RLS policy if new table access needed
  3. Test locally with curl
  4. Deploy via Supabase CLI or dashboard
  5. Add endpoint to API documentation above
  6. Update finance tracker with any cost changes

Add a New Microservice

  1. Document purpose and cost in finance tracker
  2. Get approval from Yiorgos if monthly cost > $0
  3. Add to Service Inventory table above
  4. Set up monitoring and logging
  5. Create runbook for the new service
  6. Add audit entry to expenditure log

Rotate a Secret

  1. Generate new key in provider dashboard
  2. Update Supabase secret: npx supabase secrets set KEY=value
  3. Verify edge function still works
  4. Revoke old key in provider dashboard
  5. Log rotation in audit trail

Pending: Domain Email Verification

Action Required: Add these DNS records to Cloudflare for omegaos.co to enable sending from @omegaos.co email addresses.
TypeNameValuePriorityStatus
TXT resend._domainkey p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8yiNGgy3R1Zxyf87liitFRm3MMzNMsNUsY0iMYc2+Pn3w3ROKAR6p5ZeTNz2w4tvP3McYHFlgul308PvUKSS5Eu1qKIeylJ5m1vaD8mimmGzji629sU3jnB20X0SE6yPKkSxDH6h00+lAmnxPXWQKIVmSN0Gr4edhiTKpDl2G7QIDAQAB Pending
MX send feedback-smtp.us-east-1.amazonses.com 10 Pending
TXT send v=spf1 include:amazonses.com ~all Pending
Once these records are added and verified, the edge function will be updated to send from onboarding@omegaos.co instead of onboarding@resend.dev.