Nerve Center v5 Architecture
Status: Production
Stack: Next.js 16, React 19, Tailwind v4, Framer Motion, SWR
Overview
Section titled “Overview”Nerve Center v5 is the CEO executive dashboard for the entire agent system. It provides real-time visibility into 6 life domains, system health, and agent operations.
Design System
Section titled “Design System”- Cyberpunk glassmorphism (dark backgrounds, glass panels, neon accents)
- Domain-specific color coding (Family=amber, School=blue, Work=teal, Consulting=purple, Growth=emerald, AI Foundry=rose)
- Framer Motion animations throughout
- Time-of-day particle field color shifting
- Mobile-first with PWA support
Core Components (11)
Section titled “Core Components (11)”| Component | Purpose |
|---|---|
| PulseOrb | Animated system heartbeat indicator |
| ParticleField | Background ambient particle animation |
| GlassPanel | Reusable glassmorphism container |
| DomainCard | Domain status card with metrics |
| CommandPalette | Cmd+K search/command interface |
| VitalsBar | Top-bar HUD stats (agents, spend, crons, alerts) |
| TimelineStrip | Horizontal event timeline |
| ChatSlideOver | Slide-over domain agent chat panel |
| Sidebar | Navigation with domain sections |
| NeonBadge | Status badge with glow effect |
| HudStat | Single metric display with trend |
Routes (14+ pages)
Section titled “Routes (14+ pages)”| Route | Description |
|---|---|
| / | CEO Overview — domain cards, timeline, briefing |
| /family | Budget envelopes, habits, chores, calendar, birthday alerts |
| /school | Grade bars with threat pulses, assignment countdown, GPA simulator |
| /consulting | Pipeline kanban, revenue, contacts, funnel |
| /growth | Content calendar, social analytics, newsletter, news feed |
| /health | Body comp, strength goals, nutrition, habits |
| /system | System vitals, MCP health grid, cron status, budget, org chart |
| /crm | 132 contacts, searchable and filterable |
| /activity | Task log timeline (last 7 days) |
| /projects | 25 projects with status and GitHub links |
| /goals | Cross-domain goal tracker with progress bars |
| /nutrition | Calorie progress, macros, food log, 7-day history |
API Routes (10)
Section titled “API Routes (10)”| Endpoint | Data Source |
|---|---|
| /api/domains | Domain configs + reports |
| /api/domains/[id] | Per-domain state files |
| /api/system | Health, MCP health, crontab |
| /api/calendar | Google Calendar via MCP |
| /api/todos | Domain task files |
| /api/chat/[domain] | Claude API streaming (SSE) with domain SOUL.md context |
| /api/crm | Contact directory |
| /api/activity | Task logs |
| /api/projects | Project registry |
| /api/agents/stream | Real-time agent event stream (SSE) |
Data Architecture
Section titled “Data Architecture”Filesystem (local machine) └── domain configs, state files, reports │ ▼ (snapshot-state.sh at build time) │ src/data/snapshots/*.json ← bundled into deploy │ ▼ API routes: try filesystem first, fall back to snapshots │ ▼ (SWR hooks, 60-120s refresh) │ React componentsKey Design Decision
Section titled “Key Design Decision”Cloud hosting (Vercel) cannot read local filesystem at runtime. Solution: a prebuild script bundles all state into JSON snapshots. API routes try live filesystem reads first (works in dev), then fall back to snapshots (works in production). Auto-sync cron rebuilds and redeploys every 4 hours.
Chat Integration
Section titled “Chat Integration”Each domain has a floating chat button. Chat streams via SSE from the /api/chat/[domain] route:
- Loads domain’s SOUL.md for personality
- Loads live state as system context
- Streams Claude Sonnet responses
- Tracks token/cost per message
- Persists last 10 messages in localStorage
- Rate limited: 20 msgs/min per domain