Skip to content

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).

RepoRemotePurpose
optimalOSgithub.com/clenisa/optimalOSBun + 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-cligithub.com/clenisa/optimal-cliUnified 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-docsthis siteVitePress 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-returnprogithub.com/clenisa/dashboard-returnproNext.js 16 ReturnPro FP&A dashboard. Includes the /sales/pallets Pallets For Sale tool. Deployed to Vercel at returnpro.optimal.miami.
strapi-cmsgithub.com/clenisa/strapi-cmsMulti-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-2026github.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-automationgithub.com/clenisa/newsletter-automation (SSH)CRE newsletter generator pipeline (NewsAPI + Groq → Strapi draft → GHL email blast). n8n-orchestrated weekly.
newsletter-previewgithub.com/clenisa/newsletter-preview (SSH)Vercel preview site at newsletter.op-hub.com rendering newsletter + social-post drafts per brand for client review.
openclawparent: /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).
optistationgithub.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.

NodeRoleNotable 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

StoreWhereWhat's in it
OptimalOS Supabase (hbfalrpswysryltysonm.supabase.co)CloudKanban, 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)Cloudstg_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)CloudPallets For Sale rules + trend snapshots, round-tripped with Alejandro's Lovable app. No auth.
openclaw SQLitePi (~/.openclaw/)memory/main.sqlite (agent memory + auto-memory), tasks/runs.sqlite (TaskCreate/Update/List history).
OptimalOS SQLitePer 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 CMSPi (~/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

URLBacked byNotes
optimal.miamioptimalOS (Pi, :3000)Legacy mode. Fabric routes return 410.
fabric.optimal.miamioptimalOS (Hetzner CCX13)Fabric cockpit, vault, paired-device pairing.
docs.optimal.miamioptimal-docs (Pi, :3001 via VitePress)This site.
returnpro.optimal.miamidashboard-returnpro (Vercel)ReturnPro FP&A dashboard + Pallets For Sale.
strapi.op-hub.com, strapi.optimal.miamistrapi-cms (Pi, :1337)CMS admin + API.
carloslenis.comportfolio-2026 (Vercel)Carlos's portfolio + blog.
newsletter.op-hub.comnewsletter-preview (Vercel)Client preview site for newsletters + social posts.
phoenix.optimal.miamiPhoenix Docker (Pi, :6006)Agent-tracing UI. Hetzner mirror dormant.

Cross-repo wiring

  • CLI → OptimalOS Supabase. board, agent, content, tx, infra, scenario, pair all read/write OptimalOS Supabase. The OptimalOS web server reads the same tables for the dashboard view.
  • CLI → ReturnPro Supabase. finance upload, audit, diagnose, kpis, template all 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 pair on a device redeems it, generates an age keypair, and registers the recipient in OptimalOS Supabase. See Fabric Architecture.

Built by Carlos Lenis in Miami