# teamuq-linebot/project-everyagent architecture

> Architecture diagram of the GitHub repository teamuq-linebot/project-everyagent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/teamuq-linebot/project-everyagent
- Repository: https://github.com/teamuq-linebot/project-everyagent

## Overview

TeamUQ is an Electron desktop app for local project/task management, CLI sessions, work-time monitoring and punch records, with agent-team tools. The main workflow runs from the renderer through preload IPC to main-process session and task services; sessions can launch PTYs, while the monitor scans CLI activity and records punches in SQLite. Other major branches include conversation browsing, project management, settings and agent teams. The excerpts and source index support the principal wiring shown; several feature-to-handler details are unsampled, so those links are omitted.

Main entry points: [`src/renderer/App.tsx`](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/App.tsx) (App Shell), [`src/main/backend.ts`](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/backend.ts) (Backend Facade), [`src/main/backend/services/sessionService.ts`](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/backend/services/sessionService.ts) (Session Service), [`src/main/monitor/MonitorController.ts`](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/monitor/MonitorController.ts) (Monitor Controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_app["App Shell<br/>[App.tsx]"]
  node_kanban["Task Board<br/>[KanbanBoard.tsx]"]
  node_projects["Project Management"]
  node_sessionui["Session Views<br/>[SessionTabHost.tsx]"]
  node_conversationui["Conversation Views"]
  node_settings["Settings<br/>[SettingsPage.tsx]"]
end

subgraph group_ipc["IPC Boundary"]
  node_preload["Preload Bridges<br/>[index.ts]"]
  node_ipcrouter["IPC Router<br/>[router.ts]"]
  node_handlers["IPC Handlers"]
end

subgraph group_runtime["Session Runtime"]
  node_backend["Backend Facade<br/>[backend.ts]"]
  node_sessionservice["Session Service<br/>[sessionService.ts]"]
  node_pty["PTY Manager<br/>[ptyManager.ts]"]
  node_conversation["Conversation Service"]
end

subgraph group_work["Tasks and Worktime"]
  node_taskservice["Task Service<br/>[taskService.ts]"]
  node_taskrepo[("SQLite Repository")]
  node_taskbindings[("Session Bindings<br/>[taskSessions.ts]")]
  node_monitor["Monitor Controller"]
  node_worktime["Worktime Discovery<br/>[worktimeSource.ts]"]
  node_punch["Punch Execution<br/>[punchExecutor.ts]"]
  node_punchservice["Punch Service<br/>[punchService.ts]"]
end

subgraph group_agents["Agent Teams"]
  node_agentui["Agent Teams UI<br/>[AgentTeamsView.tsx]"]
  node_agentservice["Team Registration"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_kanban
node_app -->|"renders"| node_projects
node_app -->|"renders"| node_sessionui
node_app -->|"renders"| node_settings
node_app -->|"renders"| node_agentui
node_conversationui -->|"routes in"| node_app
node_kanban -->|"requests tasks"| node_preload
node_preload -.->|"bridges IPC"| node_ipcrouter
node_ipcrouter -->|"dispatches"| node_handlers
node_ipcrouter -->|"routes calls"| node_backend
node_backend -->|"uses"| node_taskservice
node_backend -->|"uses"| node_taskrepo
node_backend -->|"uses"| node_worktime
node_backend -->|"delegates"| node_sessionservice
node_sessionservice -->|"creates"| node_monitor
node_sessionservice -->|"manages"| node_pty
node_sessionservice -->|"reads bindings"| node_taskbindings
node_sessionui -.->|"requests conversations"| node_conversation
node_conversation -->|"discovers transcripts"| node_worktime
node_monitor -->|"reads workflows"| node_worktime
node_monitor -->|"executes punches"| node_punch
node_monitor -->|"uses"| node_punchservice
node_punch -->|"records via"| node_punchservice
node_taskservice -.->|"uses repository"| node_taskrepo
node_agentui -.->|"manages teams"| node_agentservice

click node_app "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/App.tsx"
click node_kanban "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/Kanban/KanbanBoard.tsx"
click node_projects "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/Management/ProjectManagementView.tsx"
click node_sessionui "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/Session/SessionTabHost.tsx"
click node_conversationui "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/conversation/ConversationRouter.tsx"
click node_settings "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/Settings/SettingsPage.tsx"
click node_agentui "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/AgentTeams/AgentTeamsView.tsx"
click node_preload "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/preload/index.ts"
click node_ipcrouter "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/ipc/router.ts"
click node_handlers "https://github.com/teamuq-linebot/project-everyagent/tree/standalone/src/main/ipc/handlers"
click node_backend "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/backend.ts"
click node_sessionservice "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/backend/services/sessionService.ts"
click node_pty "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/pty/ptyManager.ts"
click node_conversation "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/backend/services/sessionConversationService.ts"
click node_taskservice "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/services/taskService.ts"
click node_taskrepo "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/repo/sqliteTaskRepository.ts"
click node_taskbindings "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/config/taskSessions.ts"
click node_monitor "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/monitor/MonitorController.ts"
click node_worktime "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/worktime/worktimeSource.ts"
click node_punch "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/monitor/punchExecutor.ts"
click node_punchservice "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/services/punchService.ts"
click node_agentservice "https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/services/teamRegistrationService.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_app,node_kanban,node_projects,node_sessionui,node_conversationui,node_settings,node_user toneBlue
class node_preload,node_ipcrouter,node_handlers toneAmber
class node_backend,node_sessionservice,node_pty,node_conversation toneMint
class node_taskservice,node_taskrepo,node_taskbindings,node_monitor,node_worktime,node_punch,node_punchservice toneRose
class node_agentui,node_agentservice toneIndigo
```

## Components

### Desktop UI

- [App Shell](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/App.tsx): `src/renderer/App.tsx`
- [Task Board](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/Kanban/KanbanBoard.tsx): `src/renderer/views/Kanban/KanbanBoard.tsx`
- [Project Management](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/Management/ProjectManagementView.tsx): `src/renderer/views/Management/ProjectManagementView.tsx`
- [Session Views](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/Session/SessionTabHost.tsx): `src/renderer/views/Session/SessionTabHost.tsx`
- [Conversation Views](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/conversation/ConversationRouter.tsx): `src/renderer/views/conversation/ConversationRouter.tsx`
- [Settings](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/Settings/SettingsPage.tsx): `src/renderer/views/Settings/SettingsPage.tsx`

### IPC Boundary

- [Preload Bridges](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/preload/index.ts): `src/preload/index.ts`
- [IPC Router](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/ipc/router.ts): `src/main/ipc/router.ts`
- [IPC Handlers](https://github.com/teamuq-linebot/project-everyagent/tree/standalone/src/main/ipc/handlers): `src/main/ipc/handlers`

### Session Runtime

- [Backend Facade](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/backend.ts): `src/main/backend.ts`
- [Session Service](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/backend/services/sessionService.ts): `src/main/backend/services/sessionService.ts`
- [PTY Manager](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/pty/ptyManager.ts): `src/main/pty/ptyManager.ts`
- [Conversation Service](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/backend/services/sessionConversationService.ts): `src/main/backend/services/sessionConversationService.ts`

### Tasks and Worktime

- [Task Service](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/services/taskService.ts): `src/main/services/taskService.ts`
- [SQLite Repository](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/repo/sqliteTaskRepository.ts): `src/main/repo/sqliteTaskRepository.ts`
- [Session Bindings](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/config/taskSessions.ts): `src/main/config/taskSessions.ts`
- [Monitor Controller](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/monitor/MonitorController.ts): `src/main/monitor/MonitorController.ts`
- [Worktime Discovery](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/worktime/worktimeSource.ts): `src/main/worktime/worktimeSource.ts`
- [Punch Execution](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/monitor/punchExecutor.ts): `src/main/monitor/punchExecutor.ts`
- [Punch Service](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/services/punchService.ts): `src/main/services/punchService.ts`

### Agent Teams

- [Agent Teams UI](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/renderer/views/AgentTeams/AgentTeamsView.tsx): `src/renderer/views/AgentTeams/AgentTeamsView.tsx`
- [Team Registration](https://github.com/teamuq-linebot/project-everyagent/blob/standalone/src/main/services/teamRegistrationService.ts): `src/main/services/teamRegistrationService.ts`

### Other components

- **User**

## Connections

- User → App Shell: uses (evidence: `src/renderer/App.tsx`)
- App Shell → Task Board: renders (evidence: `src/renderer/App.tsx`)
- App Shell → Project Management: renders (evidence: `src/renderer/App.tsx`)
- App Shell → Session Views: renders (evidence: `src/renderer/App.tsx`)
- App Shell → Settings: renders (evidence: `src/renderer/App.tsx`)
- App Shell → Agent Teams UI: renders (evidence: `src/renderer/App.tsx`)
- Conversation Views → App Shell: routes in (evidence: `src/renderer/App.tsx`)
- Task Board → Preload Bridges: requests tasks
- Preload Bridges → IPC Router: bridges IPC
- IPC Router → IPC Handlers: dispatches (evidence: `src/main/ipc/router.ts`)
- IPC Router → Backend Facade: routes calls (evidence: `src/main/ipc/router.ts`)
- Backend Facade → Task Service: uses (evidence: `src/main/backend.ts`)
- Backend Facade → SQLite Repository: uses (evidence: `src/main/backend.ts`)
- Backend Facade → Worktime Discovery: uses (evidence: `src/main/backend.ts`)
- Backend Facade → Session Service: delegates (evidence: `src/main/backend.ts`)
- Session Service → Monitor Controller: creates (evidence: `src/main/backend/services/sessionService.ts`)
- Session Service → PTY Manager: manages (evidence: `src/main/backend/services/sessionService.ts`)
- Session Service → Session Bindings: reads bindings (evidence: `src/main/backend/services/sessionService.ts`)
- Session Views → Conversation Service: requests conversations
- Conversation Service → Worktime Discovery: discovers transcripts (evidence: `src/main/backend/services/sessionConversationService.ts`)
- Monitor Controller → Worktime Discovery: reads workflows (evidence: `src/main/monitor/MonitorController.ts`)
- Monitor Controller → Punch Execution: executes punches (evidence: `src/main/monitor/MonitorController.ts`)
- Monitor Controller → Punch Service: uses (evidence: `src/main/monitor/MonitorController.ts`)
- Punch Execution → Punch Service: records via (evidence: `src/main/monitor/punchExecutor.ts`)
- Task Service → SQLite Repository: uses repository
- Agent Teams UI → Team Registration: manages teams
