Coexo/Overview

Developer Guide

Build Reference

Everything needed to build on the coexo platform — design tokens, component patterns, file organization, and implementation rules. This page is the single source of truth for implementation; the workspace style-guide.md is a thin pointer to here.

Design Philosophy

Premium, purposeful, alive.This is not a docs site. It's an interactive architecture visualization — a living system map that feels like you're navigating something powerful. Every design decision serves two masters: beauty and clarity.

Inspirations

Linear.appThe gold standard for dark SaaS UI. Monochrome with surgical use of accent color. Clean typography. Generous whitespace.
Vercel.comPrism-like gradient effects, bold type, dark surfaces, smooth transitions.
Stripe.comLayered depth, subtle gradients, information density done elegantly.
Cursor.comDark developer tool aesthetic, glow effects, interactive diagrams.
Warp.devTerminal-native dark UI with animated gradients and clean hierarchy.

Anti-Patterns — Never Do This

  • Boring docs site aesthetics (Docusaurus, GitBook, ReadTheDocs look)
  • Cluttered layouts with no breathing room
  • Pure black backgrounds (#000000) — too harsh, causes halation
  • Neon/oversaturated accent colors — eye strain on dark backgrounds
  • Decorative animation with no purpose — every motion must communicate something

Color System

Dark UI uses surface elevation to create depth — lighter greys float above darker greys. One accent color, used sparingly. Status colors are desaturated for dark mode comfort.

Surface Elevation

--bg-base#09090bPage background (zinc-950)
--bg-surface#18181bCards, panels, sidebar background (zinc-900)
--bg-elevated#27272aHover states, active items, dropdowns (zinc-800)
--bg-overlay#3f3f46Tooltips, popovers, modal overlays (zinc-700)

Text Hierarchy

Use opacity/weight — not color — to create text hierarchy. Never use pure white (#ffffff) for body text.

--text-primary#fafafaHeadlines, important labels (zinc-50)
--text-secondary#a1a1aaBody text, descriptions (zinc-400)
--text-muted#71717aTimestamps, metadata, disabled (zinc-500)
--text-ghost#52525bWatermarks, ultra-subtle hints (zinc-600)

Borders

--border-subtle#27272aCard borders, dividers (zinc-800)
--border-default#3f3f46Input borders, focused elements (zinc-700)
--border-strong#52525bActive/selected borders (zinc-600)

Accent Color

One accent color, used sparingly. Desaturated to ~80% saturation for dark mode comfort.

--accent#6366f1Primary interactive elements, links, active states (indigo-500)
--accent-hover#818cf8Hover state for accent elements (indigo-400)
--accent-muted#6366f1/20Accent backgrounds, subtle highlights (indigo-500 at 20% opacity)
--accent-glow#6366f1/10Glow effects, ambient light (indigo-500 at 10% opacity)

Status Colors

Used for implementation status indicators in diagrams and component cards. Never use for large backgrounds or text.

--status-live#4ade80Fully implemented and running (green-400)
--status-partial#fbbf24Partially built or in progress (amber-400)
--status-planned#f87171Not yet started (red-400)
--status-external#60a5faExternal systems (blue-400)

Typography

Font Families

--font-sans'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif
--font-mono'Geist Mono', 'SF Mono', 'Fira Code', monospace

Geist is installed via the geist npm package and loaded through next/font/local for optimal performance.

Type Scale

Based on a 1.250 ratio (Major Third), anchored at 16px body. All line-heights divisible by 4.

display48px / 3remw700lh56pxls-0.02emHero headlines, page titles
h136px / 2.25remw600lh44pxls-0.02emSection titles
h228px / 1.75remw600lh36pxls-0.01emSub-section titles
h322px / 1.375remw600lh28pxls-0.01emCard titles, diagram node labels
body16px / 1remw400lh24pxls0Body text, descriptions
body-sm14px / 0.875remw400lh20pxls0Secondary info, metadata
caption12px / 0.75remw500lh16pxls0.02emLabels, badges, timestamps
mono14px / 0.875remw400lh20pxls0Code snippets, technical values

Typography Rules

  • Headlines use --text-primary (zinc-50), weight 600-700
  • Body uses --text-secondary (zinc-400), weight 400
  • Maximum body text width: 65ch (optimal reading length)
  • Negative letter-spacing on headlines (-0.01 to -0.02em) for tighter, more modern feel
  • Positive letter-spacing on captions (+0.02em) for legibility at small sizes

Spacing System

8pt grid with 4pt half-step for fine adjustments. Generous spacing creates the premium feel — when in doubt, add more whitespace, not less.

--space-14pxIcon gaps, inline spacing
--space-28pxTight element spacing
--space-312pxForm fields, compact cards
--space-416pxStandard padding, card internal
--space-520pxBetween related elements
--space-624pxSection internal padding
--space-832pxBetween cards, major elements
--space-1040pxSection gaps
--space-1248pxMajor section dividers
--space-1664pxPage section spacing
--space-2080pxHero/landing section spacing
--space-2496pxTop-level page breathing room

Spacing Principles

  • Internal < External:Padding inside a card should always be less than the gap between cards
  • Group by proximity:Related items sit closer together than unrelated items (Gestalt principle)
  • Scale with importance:More whitespace around more important elements
  • Consistent rhythm:Vertical spacing between sections should follow a predictable pattern

Border Radius

Slightly rounded, never fully circular (except status dots). Consistent across all components.

--radius-sm6pxButtons, badges, small elements
--radius-md8pxCards, inputs, dropdowns
--radius-lg12pxPanels, modals, large containers
--radius-xl16pxHero cards, featured sections
--radius-full9999pxStatus dots, avatars, pills

Shadows & Glow

In dark mode, traditional box-shadows are barely visible. Use subtle borders for card edges, glow effects for interactive/focused elements, and gradient overlays for depth.

--shadow-cardCard shadow — subtle bottom glow
0 1px 2px rgba(0,0,0,0.4), 0 0 0 1px var(--border-subtle)
--shadow-elevatedElevated shadow — for modals/dropdowns
0 4px 16px rgba(0,0,0,0.5), 0 0 0 1px var(--border-default)
--glow-accentAccent glow — for focused/active interactive elements
0 0 20px var(--accent-glow), 0 0 0 1px var(--accent)
--glow-liveStatus glow for live nodes
0 0 12px rgba(74, 222, 128, 0.15)
--glow-partialStatus glow for partial nodes
0 0 12px rgba(251, 191, 36, 0.15)

Motion & Animation

Motion is communication, not decoration. Every animation should answer: "What just changed?" or "Where should I look?"

Timing Tokens

--duration-fast150msHover states, button feedback, tooltips
--duration-normal250msPanel transitions, dropdowns, tabs
--duration-slow400msPage transitions, large reveals
--duration-dramatic800msHero animations, diagram entry, ambient loops

Easing Functions

--ease-defaultStandard ease — most transitions
cubic-bezier(0.4, 0, 0.2, 1)
--ease-enterEntrance — elements appearing (ease-out)
cubic-bezier(0, 0, 0.2, 1)
--ease-exitExit — elements leaving (ease-in)
cubic-bezier(0.4, 0, 1, 1)
--ease-springSpring — interactive, playful feel (for diagram nodes)
cubic-bezier(0.34, 1.56, 0.64, 1)

Motion Patterns

  • Page transitions:Fade + subtle Y-translate (8-12px). Use <AnimatePresence> for route changes.
  • Cards entering view:Staggered fade-up on scroll intersection. 50ms stagger between siblings.
  • Diagram nodes:Scale from 0.95 + fade on first render. Use spring easing.
  • Signal flow dots:CSS offset-path animation along React Flow edge SVG paths. Continuous loop, --duration-dramatic per cycle.
  • Hover effects:Scale 1.02 + glow on cards. Immediate response (150ms).
  • Sidebar items:Subtle background-color fade on hover (150ms).

Motion Rules

  • Respect prefers-reduced-motion — disable all animations when set
  • No animation should run longer than 1s except ambient loops (signal flows)
  • Stagger delays should never exceed 300ms total for a group
  • Loading states use subtle pulse, never spinners

Layout

Page Structure

Top Bar — 48px fixedlogo · breadcrumbs · auth
Sidebar
240px fixed
Main Canvas — scrollable
max-w-[1200px] centered

Sidebar Specs

  • Width: 240px (fixed, collapsible on mobile)
  • Background: --bg-surface
  • Left border: none. Right border: --border-subtle
  • Items: 36px height, --space-2 vertical gap
  • Active item: --bg-elevated background + --accent left accent (2px)
  • Sections: grouped with caption labels, --space-6 between groups

Top Bar Specs

  • Height: 48px (fixed)
  • Background: --bg-base with subtle bottom border
  • Contains: logo (left), breadcrumb trail (center-left), user/auth info (right)
  • Backdrop blur when content scrolls underneath: backdrop-filter: blur(12px)

Content Area

  • Max width: 1200px, centered
  • Padding: --space-8 on desktop, --space-4 on mobile
  • Full-bleed diagrams can break out of max-width constraint

Responsive Breakpoints

sm640pxMobile
md768pxTablet
lg1024pxDesktop (sidebar visible)
xl1280pxWide desktop (primary test target)

Sidebar collapses to hamburger below lg.

Component Patterns

Architecture Node (React Flow)

Category
Node Title
Brief description of what this node does
3 components
live
  • Background: --bg-surface
  • Border: 1px --border-subtle, left border 3px in status color
  • Border radius: --radius-md, padding: --space-4
  • Min width: 200px, max width: 280px
  • Hover: scale 1.02, border → --border-default, shadow → --glow-accent
  • Click: navigates to drill-down view

Breadcrumb Trail

System ContextInput SourcesEmail Triage
  • Separator: › in --text-ghost
  • Hover on ancestors: --accent color
  • Smooth text-color transition on hover (150ms)

Status Badge

Live
Partial
Planned
External
  • Dot: 8px circle with status color
  • Label: caption size, --text-secondary
  • Inline with metadata, not standalone

Card (Content Section)

  • Background: --bg-surface
  • Border: 1px --border-subtle
  • Border radius: --radius-lg
  • Padding: --space-6
  • Margin bottom: --space-8

Vision Subsection Card (Expandable)

For long vision sections that benefit from progressive disclosure — summary always visible, full narrative behind a chevron click.

  • Background: --bg-surface, border: 1px --border-subtle
  • Border radius: --radius-md (8px), padding: --space-6 (24px)
  • Gap between cards: --space-4 (16px)
  • Title: h3 (22px, font-semibold, --text-primary)
  • Summary: body (16px, --text-secondary)
  • Chevron: --text-muted, rotates 90° on expand (250ms, ease-default)
  • Hover: background shifts to --bg-elevated (150ms)
  • Expand animation: height auto-transition + content fade-in (250ms, ease-default)
  • Top border accent: 2px --accent-muted on left side when expanded
  • Max content width: 65ch (same as vision text)

Changelog Entry

2026-04-29

Example changelog entry description here.

  • Date in mono font, --text-muted
  • Description in body-sm, --text-secondary
  • Subtle left border in --accent-muted
  • Entries stack vertically with --space-3 gap

Diagram Conventions (React Flow)

Color Coding

  • Node background: status color at 10% opacity
  • Node border: status color at 60% opacity
  • Node text: always --text-primary (never colored)

Edge Styling

  • Default: 1.5px stroke, --border-default color
  • Animated: signal dots (4px circles) moving along path, accent-colored
  • Hover: edge thickens to 2px, color shifts to --accent

Layout

  • Horizontal flow for Level 1 (left to right = signal flow direction)
  • Vertical grouping for Level 2 (sections stacked, connections between)
  • Free-form for Level 3 (components within a section)

Interaction

  • Click node → smooth zoom transition to next level (Motion animate layout)
  • Hover node → tooltip with brief description + status
  • Minimap visible at Level 1 and 2, hidden at Level 3+

Accessibility

  • ContrastMinimum contrast ratio: 4.5:1 for body text, 3:1 for large text (WCAG AA)
  • Status colorsAll status colors paired with text labels or icons (never color-only)
  • Focus rings2px --accent outline with 2px offset
  • Keyboard navigationFull tab-through for sidebar, breadcrumbs, diagram nodes
  • prefers-reduced-motionDisable all CSS/JS animations, show static diagrams
  • Screen readerDiagram nodes have descriptive aria-labels

File Organization

The project follows Next.js App Router conventions. All content lives in TypeScript data files — never hardcoded in components.

projects/coexo/
style-guide.md ← thin pointer to this page
ARCHITECTURE.md
deploy.sh
Dockerfile, docker-compose.yml
src/
app/
(app)/ ← authenticated layout
page.tsx ← overview
mission/page.tsx
methodology/page.tsx
developer/page.tsx ← this page
blocks/[section]/
runtime/page.tsx
...other pages
components/
ui/ ← Button, Card, Badge
layout/ ← Sidebar, TopBar
diagrams/ ← React Flow components
sections/ ← Content section components
lib/
data/ ← ALL content here
sections.ts ← building block sections
section-content.ts
overview.ts
project-notes.ts
styles/ ← globals.css, Tailwind config
public/ ← Static assets
package.json

Data Architecture

All content lives in TypeScript data files under src/lib/data/. Components read from these files — content is never hardcoded in JSX.

sections.ts

The building block sections — id, slug, name, description, status, connections.

section-content.ts

All component definitions per section — vision statements, notes, and implementation items with status.

overview.ts

Overview page content — hero copy, capabilities, philosophy, stats.

project-notes.ts

In-flight project notes — captured ideas, status, suggested destination.

Rule: When content is added or changed, the data files change — never the component files. Components are reusable shells. Data files are the source of truth.

Section Page Schema (/blocks/[section])

Each Building Block section page follows a consistent structure:

  1. 1.
    Header

    Section title, one-sentence description, overall status badge (live / partial / planned).

  2. 2.
    Vision

    What this section does conceptually (from AA-0957) and why it matters in the larger system. Long sections use visionSections (expandable subsections with summary + full content); shorter ones use the vision string directly.

  3. 3.
    Components Grid

    Each skill, cron, adapter, or tool — name, one-line description, status (🟢 live / 🟡 partial / 🔴 planned / 🔵 external). Click navigates to the component detail page.

  4. 4.
    Notes

    Open ideas and future plans (from AA-0957 📝 Notes sections). Things to build next.

Component Page Schema (/blocks/[section]/[component])

Each component detail page shows:

  1. 1.What it doesPurpose and behavior.
  2. 2.How it worksBrief technical description.
  3. 3.StatusImplementation status with details.
  4. 4.ConfigurationKey config and env vars (names only, never values).
  5. 5.Connected toWhich other components or sections it interacts with.
  6. 6.LinksSkill file path, relevant Case in Dymont DB.

C4 Zoom Navigation

The Building Block View uses C4-inspired progressive zoom — three levels of detail, navigated by clicking deeper.

Level 2: /blocks → Grid of all sections as cards
Level 3: /blocks/[section] → Components inside that section
Level 4: /blocks/[section]/[component] → Individual component detail
  • Sidebar always shows all sections for quick jumping
  • Breadcrumbs show current zoom level: Blocks → Section → Component
  • Cards are clickable — click to zoom in. Back / breadcrumbs to zoom out.
  • Level 1 (System Context) is /context — a different view (external boundaries), not part of the Building Block zoom.

Implementation Rules

These rules apply to anyone writing code in this repo. Violating them breaks the site architecture.

  1. 1.
    Read this page first

    Before any UI work, the design tokens and patterns above are non-negotiable.

  2. 2.
    All content in src/lib/data/

    Never hardcode text in components — structure and content are separated.

  3. 3.
    Use CSS custom properties

    From globals.css — never raw hex values or magic numbers.

  4. 4.
    Test at 1280px viewport as primary

    Verify 640px mobile works too. Don't ship without checking both.

  5. 5.
    Status colors come from data

    Green/amber/red/blue mapped to live/partial/planned/external — never hardcoded per component.

  6. 6.
    Don't delete existing components

    Keep unused components — they're for future use.

  7. 7.
    Run npm run build after all changes

    Fix all TypeScript and build errors until clean before deploying.

  8. 8.
    Respect the arc42 structure

    Don't add pages outside the defined structure without collaborative discussion.

  9. 9.
    Use cases go in Runtime, not Building Blocks

    If a scenario touches multiple blocks, it belongs in the Runtime View.

  10. 10.
    Building Blocks are containers, not features

    Deliverables go on the Roadmap. Structural components go in Building Blocks.

  11. 11.
    When in doubt, more whitespace, less decoration

    Premium feel comes from breathing room and restraint.

Build & Deploy

The local repo on coexo-labs has no git remote — deploys flow over rsync to openclaw-vps, where Docker rebuilds the image and Cloudflare cache is purged.

Local Dev

npm run dev

Runs the Next.js dev server on port 3000.

Check for Errors

npm run build

Fix all TypeScript errors, import issues, and build warnings until the output is clean.

Deploy to coexo.dymont.ai

# 1. Sync source up to openclaw-vps
rsync -av --delete --rsync-path="sudo rsync" ./ openclaw-vps:/root/.openclaw/workspace/projects/coexo/
# 2. Rebuild + purge cache
ssh openclaw-vps 'cd /root/.openclaw/workspace/projects/coexo && sudo ./deploy.sh'

deploy.sh rebuilds the Docker image with no cache, recreates the container, and purges Cloudflare so changes appear immediately.

Test Checklist

  • Test at 1280px — primary viewport
  • Verify 640px mobile works (sidebar collapses, content readable)
  • Check all links navigate correctly
  • Verify status badge colors render correctly
  • Confirm no TypeScript errors in console