How mohamedessamcs96/virtual-cxo works
Mashura is a B2B decision-support app for SME leaders: a user submits a business question, the AI board proposes options, a deterministic optimization and simulation engine evaluates them, and the app presents a decision package for review and commitment. The README also describes scenario analysis, KPI/data-health views, a decision ledger, onboarding, and demo booking. The graph reflects documented capabilities and indexed references; several route and page implementations were not sampled, so their internal call relationships are not asserted.
Main entry points: orchestrator.ts Board orchestrator · api.ts Client API hooks · route.ts Product API · store.ts JSON file store
Components 32
User experience
- Marketing site
src/app/(marketing) - Demo scheduler
src/app/(marketing)/book-demo/page.tsx - Product workspace
src/components/app-shell.tsx - Decision cockpit
src/app/app/page.tsx - Board session view
src/components/board-session.tsx - Decision package
src/components/decision-package.tsx - Scenario lab
src/app/app/scenario-lab/page.tsx - Decision ledger
src/app/app/ledger/page.tsx - Data health
src/app/app/data-health/page.tsx - Onboarding
src/app/onboarding/page.tsx - Demo requests
src/app/app/demo-requests/page.tsx
API and access
- Client API hooks
src/lib/api.ts - Product API
src/app/api/v1/[...path]/route.ts - Session event stream
src/app/api/v1/board-sessions/[id]/stream/route.ts - Route protection
src/proxy.ts - Signed-cookie auth
src/server/auth.ts - Booking API
src/app/api/bookings/route.ts
Decision engine
- Board orchestrator
src/server/board/orchestrator.ts - Executive agents
src/server/board/agents.ts - Agent runtime
src/server/board/runtime.ts - Structured LLM
src/server/board/llm.ts - State briefing
src/server/board/briefing.ts - Groundedness checks
src/server/board/groundedness.ts - Monte Carlo analysis
src/server/quant/quantify.ts - Budget optimizer
src/server/quant/milp.ts - Quant model
src/server/quant/model.ts - Scenario engine
src/server/quant/scenario.ts - Ask an agent
src/server/board/ask.ts
State and integrations
- JSON file store
src/server/store.ts - Booking logic
src/lib/booking.ts
Other components
- CEO / executive
- Anthropic API
Connections 33
- CEO / executive → Decision cockpit: reviews decisions
- CEO / executive → Marketing site: explores product
- CEO / executive → Demo scheduler: requests demo
- Decision cockpit → Client API hooks: loads data
src/app/app/page.tsx - Onboarding → Client API hooks: submits setup
src/app/onboarding/page.tsx - Client API hooks → Product API: requests API
src/lib/api.ts - Product API → Board orchestrator: runs or reruns board
src/app/api/v1/[...path]/route.ts - Product API → Ask an agent: asks agent
src/app/api/v1/[...path]/route.ts - Product API → Scenario engine: runs scenario
src/app/api/v1/[...path]/route.ts - Product API → JSON file store: reads session
src/app/api/v1/[...path]/route.ts - Session event stream → JSON file store: subscribes events
src/app/api/v1/board-sessions/[id]/stream/route.ts - Board session view → Client API hooks: uses session hooks
src/components/board-session.tsx - Decision cockpit → Board session view: renders session
- Decision package → Client API hooks: uses package API
src/components/decision-package.tsx - Scenario lab → Client API hooks: uses scenario API
- Decision ledger → Client API hooks: uses ledger API
- Data health → Client API hooks: uses health API
- Demo requests → Booking API: views bookings
- Demo scheduler → Booking logic: prepares booking
src/app/(marketing)/book-demo/page.tsx - Booking API → Booking logic: validates booking
src/app/api/bookings/route.ts - Booking API → JSON file store: stores booking
src/app/api/bookings/route.ts - Route protection → Signed-cookie auth: verifies session
src/proxy.ts - Board orchestrator → Agent runtime: runs agents
src/server/board/orchestrator.ts - Board orchestrator → Executive agents: loads prompts
src/server/board/orchestrator.ts - Board orchestrator → State briefing: builds briefing
src/server/board/orchestrator.ts - Board orchestrator → Groundedness checks: checks prose
src/server/board/orchestrator.ts - Board orchestrator → Monte Carlo analysis: quantifies options
src/server/board/orchestrator.ts - Board orchestrator → Quant model: resolves assumptions
src/server/board/orchestrator.ts - Board orchestrator → JSON file store: saves session
src/server/board/orchestrator.ts - Agent runtime → Structured LLM: calls provider
- Structured LLM → Anthropic API: requests structured output
src/server/board/llm.ts - Monte Carlo analysis → Budget optimizer: solves allocation
src/server/quant/quantify.ts - Monte Carlo analysis → Quant model: evaluates model
src/server/quant/quantify.ts