# rogasper/onesist architecture

> Architecture diagram of the GitHub repository rogasper/onesist, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rogasper/onesist
- Repository: https://github.com/rogasper/onesist

## Overview

Onesist is a system-analyst workspace that manages project repositories, runs local CLI agents, and presents generated specifications and planning artifacts. The principal workflow is to open a project, provide or edit an FSD, invoke an agent, then inspect and maintain resulting API specs, ERDs, tasks, SIT cases, RTM links, diagrams, and documentation. The web UI reaches API routes through the server; task routes also read and update project files and database state. The README documents several capabilities whose implementation files were not sampled, so those links are documented rather than inferred from module names.

Main entry points: [`src/server/agent`](https://github.com/rogasper/onesist/tree/main/src/server/agent) (CLI Agent Engine), [`src/routes/projects.$id.tsx`](https://github.com/rogasper/onesist/blob/main/src/routes/projects.%24id.tsx) (Project Workspace), [`src/server/routes/projects/tasks.ts`](https://github.com/rogasper/onesist/blob/main/src/server/routes/projects/tasks.ts) (Task Routes), [`src/server.ts`](https://github.com/rogasper/onesist/blob/main/src/server.ts) (Web Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Project Workspace"]
  node_dashboard["Projects Dashboard<br/>[index.tsx]"]
  node_project["Project Workspace<br/>[projects.$id.tsx]"]
  node_file_data["File Data Client<br/>[use-file-data.ts]"]
end

subgraph group_artifacts["Analysis Artifacts"]
  node_fsd["FSD Analysis"]
  node_spec["API Specs"]
  node_erd["ERD Studio"]
  node_tasks["Tasks and Phases<br/>[TasksView.tsx]"]
  node_sit["SIT Test Cases"]
  node_rtm["Traceability Matrix"]
  node_canvas["Canvas Sketches"]
  node_docs["Technical Docs"]
  node_wiki["Project Wiki"]
  node_timeline["Timeline Viewer<br/>[TimelineViewer.tsx]"]
end

subgraph group_agents["Agent Execution"]
  node_agent["CLI Agent Engine"]
  node_agent_cli["Agent CLI Runtimes"]
  node_terminal["Agent Terminal<br/>[terminal-server.ts]"]
end

subgraph group_platform["Server and State"]
  node_task_api["Task Routes<br/>[tasks.ts]"]
  node_task_parser["Task File Parser<br/>[task-parser.ts]"]
  node_project_files["Project Files<br/>[file-router.ts]"]
  node_browser["Design Link Browser<br/>[manager.ts]"]
  node_server["Web Server<br/>[server.ts]"]
  node_api["API Router<br/>[api-router.ts]"]
  node_db[("SQLite Database<br/>[client.ts]")]
  node_schema["Data Schema<br/>[schema.ts]"]
  node_event_stream["File Event Stream<br/>[event-stream.ts]"]
end

subgraph group_desktop["Desktop Shell"]
  node_desktop["Tauri Desktop Shell<br/>[lib.rs]"]
  node_landing_content["Landing Content<br/>[content.ts]"]
  node_landing_changelog["Landing Changelog<br/>[use-changelog.ts]"]
  node_landing_tracking["Landing Tracking<br/>[track.ts]"]
end

node_user(("System Analyst"))

node_user -->|"opens project"| node_dashboard
node_dashboard -->|"opens"| node_project
node_project -->|"edits FSD"| node_fsd
node_fsd -->|"starts analysis"| node_agent
node_agent -->|"dispatches to"| node_agent_cli
node_agent -->|"generates"| node_spec
node_agent -->|"generates"| node_erd
node_agent -->|"generates"| node_tasks
node_agent -->|"generates"| node_sit
node_agent -->|"generates"| node_rtm
node_agent -->|"generates"| node_canvas
node_agent -->|"generates"| node_docs
node_project -->|"opens"| node_wiki
node_project -->|"views"| node_timeline
node_project -->|"captures design links"| node_browser
node_tasks -.->|"manages tasks"| node_task_api
node_tasks -->|"uses task details"| node_task_parser
node_task_api -->|"rewrites task sections"| node_task_parser
node_task_api -->|"reads and writes"| node_project_files
node_task_api -->|"persists task state"| node_db
node_server -->|"handles requests"| node_api
node_server -->|"initializes"| node_db
node_server -->|"starts terminal"| node_terminal
node_db -->|"uses schema"| node_schema
node_file_data -->|"subscribes to"| node_event_stream
node_desktop -->|"hosts sidecar"| node_server
node_landing_content -.->|"provides content"| node_landing_changelog
node_landing_changelog -.->|"reports events"| node_landing_tracking

click node_dashboard "https://github.com/rogasper/onesist/blob/main/src/routes/index.tsx"
click node_project "https://github.com/rogasper/onesist/blob/main/src/routes/projects.%24id.tsx"
click node_fsd "https://github.com/rogasper/onesist/tree/main/src/components/fsd"
click node_agent "https://github.com/rogasper/onesist/tree/main/src/server/agent"
click node_agent_cli "https://github.com/rogasper/onesist/tree/main/src/server/agent/cli"
click node_spec "https://github.com/rogasper/onesist/tree/main/src/components/spec"
click node_erd "https://github.com/rogasper/onesist/tree/main/src/components/erd"
click node_tasks "https://github.com/rogasper/onesist/blob/main/src/components/tasks/TasksView.tsx"
click node_task_api "https://github.com/rogasper/onesist/blob/main/src/server/routes/projects/tasks.ts"
click node_task_parser "https://github.com/rogasper/onesist/blob/main/src/lib/task-parser.ts"
click node_project_files "https://github.com/rogasper/onesist/blob/main/src/lib/file-router.ts"
click node_sit "https://github.com/rogasper/onesist/tree/main/src/components/sit"
click node_rtm "https://github.com/rogasper/onesist/tree/main/src/components/rtm"
click node_canvas "https://github.com/rogasper/onesist/tree/main/src/components/canvas"
click node_docs "https://github.com/rogasper/onesist/blob/main/src/routes/projects.%24id.docs.tsx"
click node_wiki "https://github.com/rogasper/onesist/tree/main/src/components/wiki"
click node_timeline "https://github.com/rogasper/onesist/blob/main/src/components/tasks/TimelineViewer.tsx"
click node_browser "https://github.com/rogasper/onesist/blob/main/src/server/browser/manager.ts"
click node_server "https://github.com/rogasper/onesist/blob/main/src/server.ts"
click node_api "https://github.com/rogasper/onesist/blob/main/src/server/api-router.ts"
click node_db "https://github.com/rogasper/onesist/blob/main/src/server/db/client.ts"
click node_schema "https://github.com/rogasper/onesist/blob/main/src/server/db/schema.ts"
click node_file_data "https://github.com/rogasper/onesist/blob/main/src/lib/use-file-data.ts"
click node_event_stream "https://github.com/rogasper/onesist/blob/main/src/lib/event-stream.ts"
click node_terminal "https://github.com/rogasper/onesist/blob/main/src/server/terminal/terminal-server.ts"
click node_desktop "https://github.com/rogasper/onesist/blob/main/src-tauri/src/lib.rs"
click node_landing_content "https://github.com/rogasper/onesist/blob/main/landing/src/content.ts"
click node_landing_changelog "https://github.com/rogasper/onesist/blob/main/landing/src/lib/use-changelog.ts"
click node_landing_tracking "https://github.com/rogasper/onesist/blob/main/landing/src/track.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_project,node_file_data toneBlue
class node_fsd,node_spec,node_erd,node_tasks,node_sit,node_rtm,node_canvas,node_docs,node_wiki,node_timeline toneAmber
class node_agent,node_agent_cli,node_terminal toneMint
class node_task_api,node_task_parser,node_project_files,node_browser,node_server,node_api,node_db,node_schema,node_event_stream toneRose
class node_desktop,node_landing_content,node_landing_changelog,node_landing_tracking,node_user toneIndigo
```

## Components

### Project Workspace

- [Projects Dashboard](https://github.com/rogasper/onesist/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Project Workspace](https://github.com/rogasper/onesist/blob/main/src/routes/projects.%24id.tsx): `src/routes/projects.$id.tsx`
- [File Data Client](https://github.com/rogasper/onesist/blob/main/src/lib/use-file-data.ts): `src/lib/use-file-data.ts`

### Analysis Artifacts

- [FSD Analysis](https://github.com/rogasper/onesist/tree/main/src/components/fsd): `src/components/fsd`
- [API Specs](https://github.com/rogasper/onesist/tree/main/src/components/spec): `src/components/spec`
- [ERD Studio](https://github.com/rogasper/onesist/tree/main/src/components/erd): `src/components/erd`
- [Tasks and Phases](https://github.com/rogasper/onesist/blob/main/src/components/tasks/TasksView.tsx): `src/components/tasks/TasksView.tsx`
- [SIT Test Cases](https://github.com/rogasper/onesist/tree/main/src/components/sit): `src/components/sit`
- [Traceability Matrix](https://github.com/rogasper/onesist/tree/main/src/components/rtm): `src/components/rtm`
- [Canvas Sketches](https://github.com/rogasper/onesist/tree/main/src/components/canvas): `src/components/canvas`
- [Technical Docs](https://github.com/rogasper/onesist/blob/main/src/routes/projects.%24id.docs.tsx): `src/routes/projects.$id.docs.tsx`
- [Project Wiki](https://github.com/rogasper/onesist/tree/main/src/components/wiki): `src/components/wiki`
- [Timeline Viewer](https://github.com/rogasper/onesist/blob/main/src/components/tasks/TimelineViewer.tsx): `src/components/tasks/TimelineViewer.tsx`

### Agent Execution

- [CLI Agent Engine](https://github.com/rogasper/onesist/tree/main/src/server/agent): `src/server/agent`
- [Agent CLI Runtimes](https://github.com/rogasper/onesist/tree/main/src/server/agent/cli): `src/server/agent/cli`
- [Agent Terminal](https://github.com/rogasper/onesist/blob/main/src/server/terminal/terminal-server.ts): `src/server/terminal/terminal-server.ts`

### Server and State

- [Task Routes](https://github.com/rogasper/onesist/blob/main/src/server/routes/projects/tasks.ts): `src/server/routes/projects/tasks.ts`
- [Task File Parser](https://github.com/rogasper/onesist/blob/main/src/lib/task-parser.ts): `src/lib/task-parser.ts`
- [Project Files](https://github.com/rogasper/onesist/blob/main/src/lib/file-router.ts): `src/lib/file-router.ts`
- [Design Link Browser](https://github.com/rogasper/onesist/blob/main/src/server/browser/manager.ts): `src/server/browser/manager.ts`
- [Web Server](https://github.com/rogasper/onesist/blob/main/src/server.ts): `src/server.ts`
- [API Router](https://github.com/rogasper/onesist/blob/main/src/server/api-router.ts): `src/server/api-router.ts`
- [SQLite Database](https://github.com/rogasper/onesist/blob/main/src/server/db/client.ts): `src/server/db/client.ts`
- [Data Schema](https://github.com/rogasper/onesist/blob/main/src/server/db/schema.ts): `src/server/db/schema.ts`
- [File Event Stream](https://github.com/rogasper/onesist/blob/main/src/lib/event-stream.ts): `src/lib/event-stream.ts`

### Desktop Shell

- [Tauri Desktop Shell](https://github.com/rogasper/onesist/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Landing Content](https://github.com/rogasper/onesist/blob/main/landing/src/content.ts): `landing/src/content.ts`
- [Landing Changelog](https://github.com/rogasper/onesist/blob/main/landing/src/lib/use-changelog.ts): `landing/src/lib/use-changelog.ts`
- [Landing Tracking](https://github.com/rogasper/onesist/blob/main/landing/src/track.ts): `landing/src/track.ts`

### Other components

- **System Analyst**

## Connections

- System Analyst → Projects Dashboard: opens project (evidence: `README.md`)
- Projects Dashboard → Project Workspace: opens (evidence: `README.md`)
- Project Workspace → FSD Analysis: edits FSD (evidence: `README.md`)
- FSD Analysis → CLI Agent Engine: starts analysis (evidence: `README.md`)
- CLI Agent Engine → Agent CLI Runtimes: dispatches to (evidence: `README.md`)
- CLI Agent Engine → API Specs: generates (evidence: `README.md`)
- CLI Agent Engine → ERD Studio: generates (evidence: `README.md`)
- CLI Agent Engine → Tasks and Phases: generates (evidence: `README.md`)
- CLI Agent Engine → SIT Test Cases: generates (evidence: `README.md`)
- CLI Agent Engine → Traceability Matrix: generates (evidence: `README.md`)
- CLI Agent Engine → Canvas Sketches: generates (evidence: `README.md`)
- CLI Agent Engine → Technical Docs: generates (evidence: `README.md`)
- Project Workspace → Project Wiki: opens (evidence: `README.md`)
- Project Workspace → Timeline Viewer: views (evidence: `README.md`)
- Project Workspace → Design Link Browser: captures design links (evidence: `src/server/browser/manager.ts`)
- Tasks and Phases → Task Routes: manages tasks
- Tasks and Phases → Task File Parser: uses task details (evidence: `src/components/tasks/TasksView.tsx`)
- Task Routes → Task File Parser: rewrites task sections (evidence: `src/server/routes/projects/tasks.ts`)
- Task Routes → Project Files: reads and writes (evidence: `src/server/routes/projects/tasks.ts`)
- Task Routes → SQLite Database: persists task state (evidence: `src/server/routes/projects/tasks.ts`)
- Web Server → API Router: handles requests (evidence: `src/server.ts`)
- Web Server → SQLite Database: initializes (evidence: `src/server.ts`)
- Web Server → Agent Terminal: starts terminal (evidence: `src/server.ts`)
- SQLite Database → Data Schema: uses schema (evidence: `src/server/db/client.ts`)
- File Data Client → File Event Stream: subscribes to (evidence: `src/lib/use-file-data.ts`)
- Tauri Desktop Shell → Web Server: hosts sidecar (evidence: `README.md`)
- Landing Content → Landing Changelog: provides content
- Landing Changelog → Landing Tracking: reports events
