Repos & Data Flow
What used to be "three repos plus the CMS" has grown into a small constellation of code repos, three compute nodes, and a Supabase + SQLite + Strapi data layer. This page is the map.
Code repos
All repos live under github.com/clenisa/* unless noted otherwise. Working checkouts are on the Pi (oracle) and the desktop (pop-os); a subset is also deployed to Hetzner (fabric.optimal.miami).
| Repo | Remote | Purpose |
|---|---|---|
| optimalOS | github.com/clenisa/optimalOS | Bun + Hono web OS. Single bundle, dual deployment: legacy mode at optimal.miami (Pi) and Fabric mode at fabric.optimal.miami (Hetzner). Hosts the Loom workflow engine, paired-device daemon, OptimalVault, and Morning Ritual. |
| optimal-cli | github.com/clenisa/optimal-cli | Unified CLI (optimal …). Commander.js + Supabase. Ships as optimal-cli on npm. Owns board, audit-financials, deploy, doctor, finance *, infra *, pair, agent, content, tx, scenario. |
| optimal-docs | this site | VitePress source. Lives on the Pi at /home/oracle/.openclaw/workspace/optimal-docs/. Built via pnpm build and served from .vitepress/dist/ by serve.ts on :3001 (Bun). Drift is monitored by the docs-drift-check Loom cron. |
| dashboard-returnpro | github.com/clenisa/dashboard-returnpro | Next.js 16 ReturnPro FP&A dashboard. Includes the /sales/pallets Pallets For Sale tool. Deployed to Vercel at returnpro.optimal.miami. |
| strapi-cms | github.com/clenisa/strapi-cms | Multi-site headless CMS. Owns blog-post, newsletter, social-post, brand-config. Pi-hosted at strapi.optimal.miami. Social afterCreate lifecycle hook posts directly to X / IG / FB. |
| portfolio-2026 | github.com/clenisa/portfolio-2026 (SSH) | Carlos's personal Next.js portfolio. Vercel-deployed at carloslenis.com. Pulls blog content from Strapi via site=portfolio filter. |
| newsletter-automation | github.com/clenisa/newsletter-automation (SSH) | CRE newsletter generator pipeline (NewsAPI + Groq → Strapi draft → GHL email blast). n8n-orchestrated weekly. |
| newsletter-preview | github.com/clenisa/newsletter-preview (SSH) | Vercel preview site at newsletter.op-hub.com rendering newsletter + social-post drafts per brand for client review. |
| openclaw | parent: /home/oracle/.openclaw/ (Pi) | Agent harness and plugin runtime. Hosts the per-instance workspaces (workspace/optimalOS, workspace/optimal-cli, workspace/optimal-docs), the cron mirror, and local SQLite (memory/main.sqlite, tasks/runs.sqlite). Migrating to a Claude Code plugin (kanban in flight). |
| optistation | github.com/clenisa/optistation (SSH) | Desktop rice — Hyprland + EWW sidebar + Waybar configs for pop-os. EWW widgets mirror the OptimalOS web dashboard. |
Compute nodes
The cluster is three Tailscale-meshed nodes plus the Vercel edge for Next.js front-ends.
| Node | Role | Notable services |
|---|---|---|
| oracle (Pi 5, 16GB) | Legacy hub. Still hosts the public web OS and the docs site, but no longer the single source of execution. | optimalos.service (legacy mode, :3000), strapi.service (:1337), n8n.service (:5678), cloudflared.service, Phoenix in Docker (:6006/:4317), VitePress docs serve.ts (:3001). |
| pop-os (desktop, RTX 3060) | Primary worker. Runs Loom strands that need a GPU or just more headroom than the Pi, and hosts the MOTHER LLM via Ollama. | OptimalOS in worker mode, Ollama, EWW + Hyprland (optistation). |
hetzner-cockpit (Hetzner CCX13, fabric.optimal.miami) | Fabric control plane. Vault + paired-device cockpit. | OptimalOS in Fabric mode (DEPLOYMENT=hetzner-cloud), cloudflared.service (UUID 00633812-…), dormant phoenix.service awaiting CF DNS flip. |
The Pi and the desktop are connected via Tailscale; Hetzner joins the mesh through a dedicated Cloudflare Tunnel. See Tailscale Mesh.
Data stores
| Store | Where | What's in it |
|---|---|---|
OptimalOS Supabase (hbfalrpswysryltysonm.supabase.co) | Cloud | Kanban, activity log, Loom workflow defs + step runs, briefs, triage runs, score history, openclaw instances, Fabric vault tables (6 tables, T2 RLS forced 2026-05-06). |
ReturnPro Supabase (vvutttwunexshxkmygik.supabase.co) | Cloud | stg_financials_raw, confirmed_income_statements, dim tables, fpa_baseline_units, user profiles, Pallets For Sale data + rule audit log. |
Sales (Lovable legacy) Supabase (tgysafeenbcosudycymw.supabase.co) | Cloud | Pallets For Sale rules + trend snapshots, round-tripped with Alejandro's Lovable app. No auth. |
| openclaw SQLite | Pi (~/.openclaw/) | memory/main.sqlite (agent memory + auto-memory), tasks/runs.sqlite (TaskCreate/Update/List history). |
| OptimalOS SQLite | Per compute node (~/.optimalos/optimalos.db) | Local mirror of tasks, briefs, triage runs, score history, Loom runs/step runs. Local-first; cloud sync layered on top. |
| Strapi CMS | Pi (~/strapi-cms) | Newsletter, blog-post, social-post, brand-config content types. Backs strapi.op-hub.com and strapi.optimal.miami. |
See Storage Layers for the full table-level breakdown.
Front-ends
| URL | Backed by | Notes |
|---|---|---|
optimal.miami | optimalOS (Pi, :3000) | Legacy mode. Fabric routes return 410. |
fabric.optimal.miami | optimalOS (Hetzner CCX13) | Fabric cockpit, vault, paired-device pairing. |
docs.optimal.miami | optimal-docs (Pi, :3001 via VitePress) | This site. |
returnpro.optimal.miami | dashboard-returnpro (Vercel) | ReturnPro FP&A dashboard + Pallets For Sale. |
strapi.op-hub.com, strapi.optimal.miami | strapi-cms (Pi, :1337) | CMS admin + API. |
carloslenis.com | portfolio-2026 (Vercel) | Carlos's portfolio + blog. |
newsletter.op-hub.com | newsletter-preview (Vercel) | Client preview site for newsletters + social posts. |
phoenix.optimal.miami | Phoenix Docker (Pi, :6006) | Agent-tracing UI. Hetzner mirror dormant. |
Cross-repo wiring
- CLI → OptimalOS Supabase.
board,agent,content,tx,infra,scenario,pairall read/write OptimalOS Supabase. The OptimalOS web server reads the same tables for the dashboard view. - CLI → ReturnPro Supabase.
finance upload,audit,diagnose,kpis,templateall run against ReturnPro. The Next.js dashboard reads the same tables. - OptimalOS → Loom Supabase tables. Loom workflow definitions and run history live in OptimalOS Supabase under
loom_*. Each compute node mirrors the relevant rows to its local SQLite — losing a node loses nothing. - dashboard-returnpro → Sales Supabase. Pallets For Sale uses a second
createClient(persistSession: false) pointed at the legacy Sales instance; auth still goes through ReturnPro. - Strapi → social platforms. Publishing fires
afterCreate, which calls OpenRouter to generate copy and posts directly to X / IG / FB via the brand-config token. n8n is no longer in the social-distribution path. - n8n still owns: scraping (Topic Monitor), digests (Daily Digest), the ReturnPro pipeline trigger (
optimal finance pipeline), and newsletter email distribution. - Fabric pairing. The Hetzner cockpit mints a short-lived pairing token;
optimal pairon a device redeems it, generates an age keypair, and registers the recipient in OptimalOS Supabase. See Fabric Architecture.