RAIA™ Specification
Z.2 Triage Handover (Internal)
Copy the formatted message block below directly into your team's Slack to brief Fook immediately:
← Back to Developer Hub
TEXTBOOK SPECIFICATION
💬 Slack Copy-Paste Handover
Copy the formatted message block below directly into your team's Slack to brief Fook immediately:
Hi Fook,
I’ve had the AI swarm perform a full red-team audit on our GitHub repository sync and current security stance. We are putting you on **Infrastructure Hardening & Security** so I can focus purely on front-end domain UX with the AI.
To make things easy for you, I’ve had the Systems Architect commit a highly detailed, step-by-step handover spec directly into the repo at:
👉 `03_technology/architecture/decisions/TRIAGE-INFRASTRUCTURE-HANDOVER.md`
We’ve also forensically recovered the corrupted local **Hermes Kanban database** and spun up the visual Dashboard at:
👉 **http://31.97.113.196** (fully accessible on port 80).
Here is your prioritised checklist to pull from the board:
1️⃣ **Reconcile "Migration Truth Freeze" (Done/Sync Verified):**
I had the AI run a full schema diff against production. All 183 historical migrations are fully matched. Your task is to review the pending V196, V197, and V199 migrations and ensure future schema changes go through Git/Supabase MCP. I’ve already deployed them to prod natively to unblock our work.
2️⃣ **Evaluate Vercel ➡️ Sovereign VPS (Docker/Coolify) Migration:**
Vercel serverless timeouts are hitting 10s–60s walls, crashing our long-running AI pipelines. Please evaluate containerising the Next.js portal and deploying it via Coolify on our Hostinger VPS for infinite execution timeouts and $0 hosting invoices.
3️⃣ **Bootstrap a Testing Spine (Vitest/Jest):**
We currently have 0% test coverage. Please configure a testing framework in `/11_frontend/portal/` and write standard test cases to verify our Next.js API auth guards, webhook validation signatures, and append-only audit logger.
4️⃣ **Harden GitHub Post-Breach:**
Do NOT migrate to self-hosted Gitea yet (overhead is too high for pre-revenue), but please enforce strict branch protection, signed commits, and hardware-key MFA on our GitHub org.
Let me know once you’ve pulled these tasks on the Kanban dashboard!
Best,
Gene
Assignment 1 • Database
Migration Alignment & Verification
reconcile uncommitted migrations in Git to avoid "truth freeze" during future branch deployment runs.
- Forensic verification confirms Git & Prod are synced.
- Pending enhancements: V196, V197, V199.
- Next steps: Lock SQL Editor, enforce Supabase MCP only.
Assignment 2 • DevOps
Vercel to Hostinger VPS (Coolify)
Migrate Next.js API portal from Vercel Serverless to containerized VPS for infinite timeouts and cost reduction.
- Timeout limits: Vercel Pro (60s) vs VPS (Unlimited).
- Coolify deployment: Open-source SaaS interface on VPS.
- Saves $20/month per seat on Vercel Pro plans.
Assignment 3 • Security
GitHub Hardening (Post-Hack)
Harden current GitHub organization against malicious VS Code extension hacks and repository exfiltration.
- Reject self-hosted Git: Adds heavy maintenance.
- Enforce strict branch protection rules on main.
- Mandate signed commits and YubiKey MFA.
Assignment 4 • Quality
Harness Test Spine (Vitest/Jest)
Build an automated test suite to prevent security regressions and lock down API routes.
- Configure Vitest inside /11_frontend/portal/.
- Test case 1: requireStaffAssetAccess auth guard.
- Test case 2: Webhook signature validation handlers.
📐 Option C: The Unified SPA Hybrid Blueprint
Resolving the friction between highly-interactive spatial Maps and standard tabular dashboards.
1. Visual Home Dashboard (/dashboard)
Our new Operations Command Center acts as the landing pad. It is purely server-side rendered (Next.js), loads in under 150ms, and provides standard, comfortable Reapit-style KPI cards and progress indicators.
2. Lazy-Loaded Map Routing (/map)
The massive Leaflet GIS engine is moved to `/map`. We use Next.js dynamic imports (`next/dynamic`) with `{ ssr: false }`. It remains completely asleep and consumes 0% CPU unless the user actively clicks the map tab.
3. URL State Bridging
If a user clicks on a property card or compliance alert on the dashboard, we transition to `/map?asset_id=UUID`. The Map route parses the URL parameters, instantly centers the camera, and flies open the inspection drawer.