--:--:--
● INFRASTRUCTURE · SAGA.WORX
Technology Stack
All production services, tools and hardware · Updated May 2026
NOK 0
Estimated monthly cost (NOK)
NOK 0
Annual cost (NOK)
USD/NOK rate
10.8
Production — Core
ServiceLayerPurposeCost / moStatus
Claude (Anthropic) AI Powers Night Owl chat, ERP AI assistant, overnight automation, issue resolution, daily briefing. Model: claude-sonnet-4-20250514. Usage Usage-based
Supabase Database PostgreSQL + Auth + Storage + Realtime + Edge Functions. EU Frankfurt. All client data stays in Europe. Project: sagaworx-erp. Free → $25 Free tier
Vercel Hosting Auto-deploy from GitHub on every push. Preview URLs per branch. Global edge network. sagaworx.no + sagaworx_erp_v2.html. Free → $20 Pro trial
Cloudflare DNS & Edge DNS for sagaworx.no. DDoS protection. Email Routing: hello@sagaworx.no → ao@spitsbergeninvest.com. CDN caching. Free Active
Resend Email Transactional email from noreply@sagaworx.no. Night Owl session emails, contact form confirmations, GDPR-compliant branded HTML. Free Active
GitHub (LightsAreOn) Dev Version control. Repos: sagaworx-webpage. CLAUDE.md v3.0 in root for Claude Code CLI. Every push triggers Vercel auto-deploy. Free Active
Scrive E-Signature BankID-verified digital signatures for Norwegian contracts. Legally binding. Used for client agreements and proposals at Closed Won stage. Per doc Active
1Password Security All API keys, secrets and credentials. Never hardcode — always use 1Password or Supabase secrets. ANTHROPIC_API_KEY, RESEND_API_KEY, DB_SERVICE_KEY. ~NOK 40 Active
Edge Functions — Deployed
FunctionTriggerPurposeStatus
night-owl HTTP POST from homepage widget Proxies Claude API. Injects system prompt + knowledge base. Returns streamed response to Night Owl chat widget on sagaworx.no. Deployed
send-contact HTTP POST on Contact Me / form submit Saves contact + chat session to Supabase CRM. Sends branded HTML email to client and plain-text alert to team. Handles GDPR timestamp. Deployed
night-owl-overnight Supabase pg_cron — 02:00 UTC nightly Scans open leads (no activity >3d) → nudge email to team. Scans open issues → AI resolution attempt. Generates daily briefing to Andy. Not deployed
tripletex-sync Manual trigger / scheduled Live API read from Tripletex. Syncs invoices, payments, customer data to accounting_entries table. Requires TRIPLETEX_API_KEY secret. Not deployed
db-backup Supabase pg_cron — 03:00 UTC nightly Exports Supabase database to Cloudflare R2 or similar. Retains 30 days of daily snapshots. Sends status notification to team. Build next
Needed — Not Yet Integrated
ServicePurposeCostPriority
UptimeRobot Free uptime monitoring for sagaworx.no, sagaproductions.no and all client apps. Alerts to hello@sagaworx.no within 5 minutes of downtime. Free P1 — This week
Sentry JavaScript error tracking across all apps. Auto-captures stack traces, user context, replay. Webhook to ERP creates ISS-XXXX automatically on new errors. Free P2 — This week
Cloudflare R2 Object storage for daily database backups. S3-compatible, zero egress fees. Target: nightly pg_dump exports, 30-day retention. ~Free P2 — This month
Supabase Pro Point-in-time recovery (restore to any second in 7 days). Daily automated backups. Required for production reliability. $25/mo. $25/mo P3 — This month
Logflare Structured log pipeline for Supabase Edge Functions. Queryable logs, alerting, retention. Pairs with Sentry for full observability stack. Free P4 — Phase 2
Hardware
ItemAssigned ToPurposeStatus
MacBook Pro / PCAndyPrimary development machine. VS Code + Live Server (localhost:5500). Git Bash for pushes.Active
iPhone / AndroidAndy + PetterMobile testing for responsive designs, Night Owl widget, PWA behaviour.Active
● SITE RELIABILITY ENGINEERING · SAGA.WORX
SRE Workflow
Detect → Capture → Analyse → Act → Resolve → Prevent · Reduce toil through automation

Goal: every failure detected in under 5 minutes, triaged by Night Owl AI, and resolved or escalated with a numbered ISS ticket before Andy sees it. All SO (System Operation) steps are automated. WO (Work Order) steps require human action. The ratio today is roughly 20% SO / 80% WO — target is 70% SO / 30% WO.

The six-step loop
01
Detect
UptimeRobot · Sentry · Cloudflare
Synthetic checks every 5 min. JS error hook on every page. Edge network anomaly detection.
SO — Automated
02
Capture
Sentry · Logflare · Supabase logs
Full stack trace, user context, replay snapshot. Structured logs from Edge Functions.
SO — Automated
03
Analyse
Night Owl AI · Claude API
Night Owl reads the error, classifies severity, writes root cause hypothesis and suggested fix.
SO — Automated
04
Act
ERP Issues · Resend · Slack
Auto-creates ISS-XXXX in ERP. Sends alert to Andy. If fix is safe and known, Night Owl attempts it.
SO — Automated
05
Resolve
Andy / Petter · GitHub · Vercel
Human reviews AI analysis. Approves fix or codes alternative. Push to GitHub — Vercel deploys in 30s.
WO — Human
06
Prevent
Night Owl · ERP · Playbooks
Night Owl writes playbook entry. ISS marked resolved with RCA. Overnight scan checks fix held.
SO — Automated
Night Owl overnight schedule
SO02:00 UTCScan open leads >3d inactive
SO02:05 UTCScan open issues → AI fix attempt
SO02:10 UTCCheck backup status → alert if failed
SO03:00 UTCpg_dump → Cloudflare R2
SO06:00 UTCDaily briefing email to Andy
Alert routing
P1 DownEmail + ISS-XXXX within 5 min
P2 ErrorSentry → ISS in ERP + overnight digest
P3 WarnDaily briefing bullet point
Client reportERP issue form → ISS → assigned Andy
InternalERP + Issue module direct entry
Issue lifecycle (ISS-XXXX)
Open AI attempted In review Resolved
Every issue gets a sequential number (ISS-0001), source tag (client/internal), SO/WO tag, priority, and AI-generated root cause analysis. Resolved issues include the fix description and become playbook candidates.
Backup & recovery strategy
CodeGitHub (every push) · ✓ Done
DB dailypg_dump → R2 · Build next
DB PITRSupabase Pro ($25/mo) · Upgrade
DR testMonthly restore drill · Phase 2
RTO target: <2 hours. RPO target: <24 hours (daily backup) → <1 minute (with PITR).
● ACTION ITEMS · SAGA.WORX SRE
Action Items
Prioritised build list · Check off as completed · Saved locally
Priority 1 — Critical · Do this week
Set up UptimeRobot monitoring
Free account at uptimerobot.com. Add HTTP monitors for sagaworx.no, sagaworx.no/login.html, sagaproductions.no. Set alert email to hello@sagaworx.no. 5-minute check interval.
FreeSO5 min setup
This week
Add Sentry error tracking to all HTML files
Free account at sentry.io. One script tag in index.html, login.html, dashboard.html, sagaworx_erp_v2.html. Auto-captures all JS errors with stack trace. Configure webhook to auto-create ISS in ERP.
FreeSO1 hr
This week
Fix magic link login loop
Update Supabase Site URL to https://sagaworx.no/login.html. Add redirect URL https://sagaworx.no/login.html in Auth settings. Set Supabase password for ao@spitsbergeninvest.com to enable dev bypass.
Blocks loginWO10 min
Today
Priority 2 — Important · This month
Build db-backup Edge Function
pg_dump via Supabase Admin API → upload to Cloudflare R2. Schedule via pg_cron at 03:00 UTC nightly. Retain 30 days. Send status email to hello@sagaworx.no. Night Owl checks status in morning scan.
SO3 hrs buildNear-free
This month
Set up Cloudflare R2 bucket for backups
Create R2 bucket in Cloudflare dashboard. Generate R2 API tokens. Store as Supabase secrets: R2_ACCESS_KEY, R2_SECRET_KEY, R2_BUCKET_NAME. Zero egress fees.
Free tierWO20 min
This month
Deploy night-owl-overnight Edge Function
Lead nudge scan, issue resolution attempt, backup status check, daily briefing. Connect pg_cron in Supabase. Test with manual trigger from ERP Night Owl → Run Now button.
SO2 hrs
This month
Set up Google Workspace for hello@sagaworx.no
MX records already in Cloudflare. Add Google Workspace $6/mo. Enables sending from hello@sagaworx.no in Resend as verified domain. Replaces Cloudflare forwarding.
WO$6/mo30 min
This month
Priority 3 — This quarter
Upgrade Supabase to Pro plan
Unlocks Point-in-time Recovery (PITR) — restore to any second in the last 7 days. Daily automated backups built in. Required for production client data. $25/month.
$25/moPITR5 min
Q3 2026
Deploy Tripletex sync Edge Function
Get API token from Tripletex. Set TRIPLETEX_API_KEY secret in Supabase. Deploy tripletex-sync function. Test live sync in ERP Accounting → Tripletex tab.
SO2 hrs
Q3 2026
Run full ERP v2 schema in Supabase
Run sagaworx_migration.sql first, then sagaworx_erp_v2_schema.sql. Creates all new tables, RLS policies, indexes and seed data. Required for ERP CRM and pipeline to persist.
Blocks ERP dataWO10 min
This week
Add CLAUDE.md v3.0 to repo root
CLAUDE.md is the coding constitution for Claude Code CLI. Auto-read on every session. Ensures brand rules, stack constraints and architecture patterns are always followed.
WO30 min
Q3 2026
Priority 4 — Phase 2
Set up Logflare structured log pipeline
Connect Supabase Edge Function logs to Logflare. Queryable, searchable logs for all overnight operations. Alerts on unusual patterns. Free tier available.
SOFree
Phase 2
Supabase read replica for disaster recovery
Streaming replication to a secondary Supabase project. RTO <30 min. DNS failover via Cloudflare. Full disaster recovery runbook documented in ERP Resources.
DRPhase 2
Phase 2
Synthetic end-to-end monitors
Automated tests that simulate the full user journey: homepage → Night Owl → login → dashboard → ERP. Run every 30 min. Alert on any step failure.
SOPhase 2
Phase 2
SAGA.XTRA — PWA mobile field app
Progressive Web App for field technicians (SAGA SERVICE PARTNER). Offline-capable work orders, issue reporting with photo upload. Push notifications via Supabase Realtime.
GEN 3+PWA
GEN 3
● UPTIME & BACKUP MONITORING · SAGA.WORX
Monitoring Dashboard
All apps · Uptime · Daily backups · Last checked — live status requires UptimeRobot integration

Status below reflects current known state. Once UptimeRobot is connected, uptime percentages and last-check times will update automatically. Backup status updates after the night-owl-overnight Edge Function is deployed and running.

Up / Backed up
Partial / Warning
Down / Failed
Unknown / Not configured
Live Applications
SAGA.WORX Web
sagaworx.no
Live
Homepagesagaworx.no
Login pagesagaworx.no/login.html
Dashboardsagaworx.no/dashboard.html
Night Owl Edge FnDeployed — no monitor
Supabase DBFree tier — no PITR
Daily backupNot configured
SAGA.WORX ERP
sagaworx.no/sagaworx_erp_v2.html
Live
ERP file accessible200 OK
Auth loopNeeds Supabase fix
Schema v2Not fully applied
Error trackingSentry not installed
Overnight functionNot deployed
SAGA.PRODUCTIONS ERP
sagaproductions.no
Live
ERP accessiblesagaproductions.no
Auth workingSupabase magic link
Uptime monitorNot configured
Daily backupNot configured
Error trackingSentry not installed
Facility Management
SAGA SERVICE PARTNER · GEN 3 MVP
In Build
Production URLNot live yet
DatabaseSchema needed
Uptime monitorConfigure at go-live
BackupConfigure at go-live
Governance & Portfolio
Confidential · GEN 4 PILOT
Design
Production URLNot live yet
DatabaseNot provisioned
MonitoringConfigure at go-live
Investment Oversight
Confidential · GEN 5 PEAX · Mobile
Build
App storeReact Native — WIP
BackendSupabase — not provisioned
MonitoringConfigure at go-live
Backup Status — All Projects
ProjectCode BackupDB Daily ExportDB PITRDR PlanLast Verified
SAGA.WORX Web + ERP GitHub ✓ Build next Needs Pro None May 2026
SAGA.PRODUCTIONS ERP GitHub ✓ Build next Needs Pro None May 2026
Facility Management Not started At go-live At go-live At go-live
Governance & Portfolio Not started At go-live At go-live At go-live
Property Management Not started At go-live At go-live At go-live
Investment Oversight Not started At go-live At go-live At go-live
Night Owl Overnight — Backup Verification
Once night-owl-overnight is deployed, it will check backup status for all live projects each morning and include a one-line backup health summary in the daily briefing email. Failed backups trigger an immediate P1 alert to hello@sagaworx.no and auto-create an ISS in the ERP.