How kingcorsair/faborchestrator-pwa works
FabOrchestrator PWA is a mobile front end and authenticated proxy to FabOrchestrator, not a manufacturing or data-processing system. The main journey is sign-in, ask a question, stream the upstream answer, and render it; separate branches cover conversation history, pinned reports, diagnostics, and offline behavior. The README and sampled source establish the chat and authentication boundaries. Several screen-to-API details are not shown in the excerpts, so those links are marked unverified rather than asserted as source-confirmed.
Main entry points: client.ts FO HTTP client · chat/route.ts Chat endpoint · login/route.ts Login endpoint · agent-chat.tsx Agent chat
Components 22
User experience
- Cockpit
components/fab/screens/landing.tsx - Ask composer
components/fab/screens/landing-ask.tsx - Chat page state
app/fabinsight/agent-chat-client.tsx - Agent chat
components/fab/screens/agent-chat.tsx - Conversation state
lib/faborch/conversation.ts - Pinned reports
components/fab/screens/reports.tsx
Identity and sessions
- Login screen
components/login-page.tsx - Login endpoint
app/api/auth/login/route.ts - Signed sessions
lib/auth.ts - Route guard
lib/auth-middleware.ts - FO cookie
lib/faborch/session.ts
FabOrchestrator proxy
- Chat endpoint
app/api/faborch/[agent]/chat/route.ts - FO HTTP client
lib/faborch/client.ts - Agent mapping
lib/faborch/agents.ts - Conversation endpoints
app/api/faborch/conversations/route.ts - Conversation detail
app/api/faborch/conversations/[id]/route.ts - Report endpoints
app/api/faborch/reports/route.ts - Report detail
app/api/faborch/reports/[id]/route.ts
Phone support
- Diagnostics
components/fab/screens/diagnostics.tsx - Offline page
app/offline/page.tsx
Other components
- Supervisor
- FabOrchestrator
Connections 28
- Supervisor → Login screen: signs in
README.md - Login screen → Login endpoint: submits credentials
- Login endpoint → FO HTTP client: authenticates with
app/api/auth/login/route.ts - FO HTTP client → FabOrchestrator: forwards login
README.md - Login endpoint → Signed sessions: issues session
app/api/auth/login/route.ts - Login endpoint → FO cookie: sets FO cookie
app/api/auth/login/route.ts - Supervisor → Cockpit: asks question
README.md - Cockpit → Ask composer: renders composer
components/fab/screens/landing.tsx - Ask composer → Chat endpoint: sends question
- Supervisor → Agent chat: asks agent
README.md - Chat page state → Agent chat: renders screen
app/fabinsight/agent-chat-client.tsx - Agent chat → Conversation state: updates state
components/fab/screens/agent-chat.tsx - Agent chat → Chat endpoint: posts turns
README.md - Chat endpoint → Route guard: requires auth
app/api/faborch/[agent]/chat/route.ts - Chat endpoint → Agent mapping: resolves agent
app/api/faborch/[agent]/chat/route.ts - Chat endpoint → FO HTTP client: forwards chat
app/api/faborch/[agent]/chat/route.ts - FO HTTP client → FabOrchestrator: streams request
README.md - Supervisor → Pinned reports: reads reports
README.md - Pinned reports → Report endpoints: loads dashboards
- Pinned reports → Report detail: opens dashboard
- Report endpoints → Route guard: requires auth
app/api/faborch/reports/route.ts - Report endpoints → FO HTTP client: loads pinned reports
lib/faborch/client.ts - Report detail → Route guard: requires auth
app/api/faborch/reports/[id]/route.ts - Supervisor → Conversation endpoints: manages threads
README.md - Conversation endpoints → Route guard: requires auth
app/api/faborch/conversations/route.ts - Conversation endpoints → FO HTTP client: reads or creates
app/api/faborch/conversations/route.ts - Supervisor → Diagnostics: checks status
README.md - Supervisor → Offline page: loses network
README.md