Retro terminal-style web client for interacting with Synthetic Soul API agents.
This project has recently undergone a major UI and startup-flow overhaul. This README reflects the current implementation.
- Runs a CRT-style boot sequence, then presents a secure access portal.
- Lets users enter with an existing session, login, or continue as guest.
- Checks backend reachability in the access portal and disables auth actions when the API is unavailable.
- Displays a two-column terminal console UI:
- left: agent profile + diagnostics tabs
- right: terminal chat log + suggestions + input.
- Submits chat requests as async jobs and resolves them via SSE first, polling fallback second.
- Boot sequence (
bootphase). - Access portal (
accessphase), unless a valid active session already exists. - Main console (
readyphase).
Access portal behavior:
- Backend link status is shown as
checking,online, oroffline. LOGIN TO ACCOUNTandCONTINUE AS GUESTare disabled unless status isonline.- Manual retry button and 10-second auto-retry are available while offline.
- React 19
- TypeScript
- Vite 7
- Tailwind CSS 4 (plus custom CSS)
- Chart.js + react-chartjs-2 (legacy visualization modules still present)
- Node.js 20+
- npm 10+ (recommended)
- Install dependencies:
npm install- Configure environment:
Create .env.local:
VITE_SYNTHETIC_SOUL_BASE_URL=http://127.0.0.1:8000/v1
VITE_SYNTHETIC_SOUL_BASE_URL_NO_VERSION=http://127.0.0.1:8000
VITE_SYNTHETIC_SOUL_DM_TYPE=dm- Run development server:
npm run dev- Build production bundle:
npm run build- Preview production bundle:
npm run preview| Variable | Required | Description |
|---|---|---|
VITE_SYNTHETIC_SOUL_BASE_URL |
Yes | API base URL with version segment (example: http://127.0.0.1:8000/v1). |
VITE_SYNTHETIC_SOUL_BASE_URL_NO_VERSION |
Yes | API base URL without /v1, used for static expression images. |
VITE_SYNTHETIC_SOUL_DM_TYPE |
Optional | Message type sent to /messages/submit; dm (default) or group. |
| Script | Purpose |
|---|---|
npm run dev |
Start local Vite dev server. |
npm run build |
Typecheck + production build. |
npm run preview |
Preview production build locally. |
npm run lint |
Run ESLint. |
npm run release:patch |
Bump patch version (no git tag). |
npm run release:minor |
Bump minor version (no git tag). |
npm run release:major |
Bump major version (no git tag). |
The UI expects these backend capabilities:
- Auth endpoints:
POST /auth/guestPOST /auth/loginPOST /auth/claimPOST /auth/refreshPOST /auth/logoutGET /auth/me
- Metadata and status:
GET /meta/version
- Chat flow:
POST /messages/submit(sync or202async job)GET /jobs/:idGET /jobs/:id/events(SSE)GET /messages/conversation
- Agent context:
GET /agents/activeGET /thoughts/latest
Detailed request/response expectations are documented in docs/BACKEND_CONTRACT.md.
src/
App.tsx # API submission + async job orchestration
SyntheticSoul.tsx # Startup phases + main console UI state
auth.tsx # Auth provider, token/refresh, authFetch
AuthMenu.tsx # In-app account menu
components/
HeaderBanner.tsx
AgentConsolePanel.tsx
LatestThoughtTicker.tsx
TerminalChatLog.tsx
SuggestedPromptChips.tsx
TerminalInputBar.tsx
index.css # Global CRT/terminal styling
main.tsx # App bootstrap
Legacy modules still present in src/ (not part of current primary UI path):
AgentPanel.tsxInsightsPanel.tsxNeonRadar.tsxNeonEmotionRadar.tsx
README.md: setup and operational overview.CHANGELOG.md: versioned change history.docs/ARCHITECTURE.md: frontend architecture and data flow.docs/BACKEND_CONTRACT.md: backend expectations for UI compatibility.docs/CONTRIBUTING.md: contributor workflow and release/doc policy.
- Stuck at access portal with auth actions disabled
- Backend link check is failing; verify API availability and
VITE_SYNTHETIC_SOUL_BASE_URL.
- Backend link check is failing; verify API availability and
- Expressions not loading
- Confirm
VITE_SYNTHETIC_SOUL_BASE_URL_NO_VERSIONand static asset paths on backend.
- Confirm
- No chat response after submit
- Inspect
/messages/submit,/jobs/:id, and/jobs/:id/eventsbehavior.
- Inspect
MIT.