Skip to content

Branes Frontend — Implementation Plan

In progress · updated 2026-10-30 · embodied-ai-architect/docs/plan/branes-frontend-implementation.md

Build a web-based visualization frontend for the branes embodied AI architect platform. The frontend reads design session state from the backend REST API and renders interactive visualizations for Pareto frontiers, constraint analysis, task graphs, optimization trajectories, and multi-level metric drill-down.

Repos:

  • branes-ai/embodied-ai-architect — Backend: REST API + session store
  • branes-ai/branes-frontend — Frontend: React + visualization libraries

Architecture: Ollama-style decoupled REST API with Claude Cowork for prototyping (see docs/designs/frontend-architecture-assessment.md).


Goal: Expose session data via REST endpoints in the branes repo.

Add a thin API server that reads from SessionStore:

src/embodied_ai_architect/api/
├── __init__.py
├── server.py # FastAPI app, CORS, startup
├── routes/
│ ├── sessions.py # Session CRUD + derived views
│ └── health.py # Readiness/liveness
└── schemas.py # Pydantic response models

Endpoints:

MethodPathReturns
GET/api/sessionsList of session summaries
GET/api/sessions/{id}Full session state
GET/api/sessions/{id}/paretoPareto points + knee point
GET/api/sessions/{id}/slacknessConstraint slackness array
GET/api/sessions/{id}/trajectoryOptimization history
GET/api/sessions/{id}/taskgraphTask graph nodes + edges
GET/api/sessions/{id}/workloadPer-operator breakdown
GET/api/healthServer status

CLI entry point:

Terminal window
branes api serve --port 8000

Auto-generated from FastAPI. The frontend uses this to generate TypeScript types via openapi-typescript.

Allow localhost:3000 (dev) and configurable origins (production).

  • Unit tests for each endpoint (mock SessionStore)
  • Integration test: create session → GET via API → verify response

Acceptance criteria: curl http://localhost:8000/api/sessions returns session list; curl .../api/sessions/{id}/pareto returns Pareto data.


Goal: Session list + session detail with Pareto scatter + slackness bars.

branes-frontend/
├── src/
│ ├── api/
│ │ ├── client.ts # Fetch wrapper, base URL config
│ │ └── types.ts # Generated from OpenAPI
│ ├── components/
│ │ ├── SessionList.tsx
│ │ ├── SessionDetail.tsx
│ │ ├── ParetoScatter.tsx
│ │ ├── SlacknessBars.tsx
│ │ └── MetricCard.tsx
│ ├── hooks/
│ │ └── useSession.ts # TanStack Query hooks
│ ├── App.tsx
│ └── main.tsx
├── public/
├── package.json
├── tsconfig.json
├── vite.config.ts
├── tailwind.config.js
└── Dockerfile
  • Table: session ID, goal, status, iteration, platform, saved at
  • Click row → navigate to session detail
  • Auto-refresh every 10s (TanStack Query refetchInterval)

Layout: sidebar navigation + main content area

Panels:

  1. Header: Goal, platform, status, iteration counter
  2. Pareto Scatter: Plotly 3D scatter (power × latency × cost)
    • Non-dominated points highlighted
    • Knee point marked
    • Constraint boundary planes
    • Hover: show design details
  3. Slackness Bars: Horizontal bar chart
    • Green (>20% margin), yellow (5-20%), red (<5% or exceeded)
    • Click bar → drill to that metric
  4. PPA Summary Cards: Power, latency, area, cost with verdict badges
  • Vite dev server with hot reload
  • ESLint + Prettier
  • GitHub Actions CI (lint, typecheck, build)
  • Docker build for deployment

Acceptance criteria: Navigate to session list, click a session, see interactive Pareto scatter plot and constraint slackness dashboard.


Goal: Full visualization suite for design exploration.

  • Cytoscape.js with dagre layout
  • Nodes colored by status (completed/running/failed/pending)
  • Click node → show task result summary
  • Edges show dependencies
  • Recharts line chart with dual Y-axis
  • X: iteration, Y1: power/latency, Y2: cost
  • Vertical markers for strategy applications
  • Hover: show strategy name and before/after metrics
  • ECharts radar with 6 axes (power, latency, area, cost, weight, volume)
  • Overlay multiple design points for comparison
  • Budget envelope shown as reference polygon
  • Toggle between absolute values and % of budget
  • Treemap or collapsible tree showing metric composition: System → Subsystem → Operator → Kernel
  • Color intensity by contribution to selected metric
  • Click to drill down, breadcrumb to drill up
  • Horizontal timeline of design rationale entries
  • Click entry → show decision details (agent, action, rationale)
  • Filter by agent type
  • Stacked waterfall chart: die + package + test + NRE/unit
  • Toggle between unit cost and total cost at volume
  • Sensitivity slider for production volume

Acceptance criteria: All 6 visualization types render with real session data, interactive navigation works.


Goal: Live updates and Claude integration.

  • Backend: SSE endpoint /api/sessions/{id}/stream
  • Sends state updates as optimization runs
  • Frontend: EventSource consumer, updates charts in real-time
  • Side-by-side comparison of two sessions
  • Overlay Pareto frontiers
  • Diff constraint slackness
  • Export charts as PNG/SVG
  • Generate PDF report from session
  • PowerPoint export for stakeholder presentations
  • “Visualize” button sends session data to Claude
  • Claude generates custom artifact visualizations
  • Proven visualizations get promoted to permanent components
  • Mobile-friendly session list
  • Tablet-optimized detail view
  • Dark/light theme

TaskEffortPriorityDependencies
FastAPI server skeleton + health2hP0None
GET /api/sessions1hP0Server skeleton
GET /api/sessions/{id}1hP0Server skeleton
GET /api/sessions/{id}/pareto2hP0Session endpoint
GET /api/sessions/{id}/slackness2hP0Session endpoint
GET /api/sessions/{id}/trajectory1hP1Session endpoint
GET /api/sessions/{id}/taskgraph1hP1Session endpoint
GET /api/sessions/{id}/workload2hP1Session endpoint
branes api serve CLI command1hP0Server skeleton
OpenAPI spec + CORS1hP0Server skeleton
SSE streaming endpoint4hP2Active session tracking
Tests for all endpoints4hP0All endpoints
TaskEffortPriorityDependencies
Vite + React + TS project setup2hP0None
TanStack Query + API client2hP0Project setup
Session list page3hP0API client
Session detail layout3hP0API client
Pareto scatter (Plotly 3D)4hP0Session detail
Slackness bars3hP0Session detail
PPA summary cards2hP0Session detail
Task graph DAG (Cytoscape)4hP1Session detail
Optimization trajectory chart3hP1Session detail
SWaP-C radar chart3hP1Session detail
Drill-down tree6hP2Session detail
Decision timeline3hP2Session detail
Cost waterfall3hP2Session detail
SSE consumer3hP2Streaming endpoint
Docker build2hP1Project setup
GitHub Actions CI2hP0Project setup
Dark/light theme2hP3All components