# tganeshg/teamman architecture

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

- Interactive diagram: https://gitdiagram.com/tganeshg/teamman
- Repository: https://github.com/tganeshg/teamman

## Overview

PrimeDesk is a LAN-hosted team task and project-management application. Teammates authenticate in the web UI, then work with tasks and related team, checklist, discussion, attachment, and release features; dashboard and report views summarize that work. The frontend pages call a shared API client, which communicates with FastAPI routes backed by SQLAlchemy models and SQLite. The README documents the Mantis portal integration and exports; source-index references identify many route dependencies, but unsampled implementations are represented at their route level rather than inferred in detail.

Main entry points: [`backend/main.py`](https://github.com/tganeshg/teamman/blob/main/backend/main.py) (FastAPI application), [`backend/models.py`](https://github.com/tganeshg/teamman/blob/main/backend/models.py) (Domain models), [`frontend/src/App.tsx`](https://github.com/tganeshg/teamman/blob/main/frontend/src/App.tsx) (App shell), [`frontend/src/api/client.ts`](https://github.com/tganeshg/teamman/blob/main/frontend/src/api/client.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["App shell<br/>[App.tsx]"]
  node_auth_ui["Session context<br/>[AuthContext.tsx]"]
  node_api_client["API client<br/>[client.ts]"]
end

subgraph group_work["Task workflow"]
  node_task_ui["Task workspace<br/>[Tasks.tsx]"]
  node_my_tasks["My task board<br/>[MyTaskBoard.tsx]"]
  node_dashboard_ui["Dashboard view<br/>[Dashboard.tsx]"]
  node_reports_ui["Reports view<br/>[Reports.tsx]"]
  node_todo_ui["Todo threads<br/>[Todo.tsx]"]
  node_task_routes["Task routes<br/>[tasks.py]"]
  node_dashboard_routes["Dashboard routes<br/>[dashboard.py]"]
  node_report_routes["Report routes<br/>[reports.py]"]
  node_todo_routes["Todo routes<br/>[todos.py]"]
  node_release_routes["Release routes<br/>[releases.py]"]
  node_relation_routes["Task relations<br/>[relations.py]"]
  node_comment_routes["Comments<br/>[comments.py]"]
  node_attachment_routes["Attachments<br/>[attachments.py]"]
end

subgraph group_team["Team operations"]
  node_team_ui["Team management<br/>[Team.tsx]"]
  node_settings_ui["Settings view<br/>[Settings.tsx]"]
  node_team_routes["Member routes<br/>[members.py]"]
  node_label_routes["Label routes<br/>[labels.py]"]
end

subgraph group_backend["API and services"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_auth_utils["Auth utilities<br/>[auth_utils.py]"]
  node_portal_routes["Portal integration<br/>[portal.py]"]
  node_portal_fetch["Mantis fetcher<br/>[portal_fetcher.py]"]
  node_crypto["Credential encryption<br/>[crypto.py]"]
  node_api_entry["FastAPI application<br/>[main.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
end

subgraph group_data["Persistence"]
  node_models["Domain models<br/>[models.py]"]
  node_database[("SQLite database<br/>[database.py]")]
end

node_teammate(("Team member"))
node_mantis["Mantis portal"]

node_teammate -->|"uses"| node_app
node_app -->|"checks session"| node_auth_ui
node_app -->|"routes to"| node_task_ui
node_app -->|"routes to"| node_my_tasks
node_app -->|"routes to"| node_dashboard_ui
node_app -->|"routes to"| node_reports_ui
node_app -->|"routes to"| node_todo_ui
node_app -->|"routes to"| node_team_ui
node_app -->|"routes to"| node_settings_ui
node_auth_ui -->|"validates session"| node_api_client
node_task_ui -->|"requests tasks"| node_api_client
node_my_tasks -->|"requests tasks"| node_api_client
node_dashboard_ui -->|"loads summary"| node_api_client
node_reports_ui -->|"loads reports"| node_api_client
node_todo_ui -->|"manages threads"| node_api_client
node_team_ui -->|"manages members"| node_api_client
node_settings_ui -->|"updates settings"| node_api_client
node_api_client -->|"HTTP requests"| node_api_entry
node_api_entry -->|"registers routes"| node_auth_routes
node_api_entry -->|"registers routes"| node_task_routes
node_api_entry -->|"registers routes"| node_dashboard_routes
node_api_entry -->|"registers routes"| node_report_routes
node_api_entry -->|"registers routes"| node_todo_routes
node_api_entry -->|"registers routes"| node_team_routes
node_api_entry -->|"registers routes"| node_label_routes
node_api_entry -->|"registers routes"| node_release_routes
node_api_entry -->|"registers routes"| node_relation_routes
node_api_entry -->|"registers routes"| node_comment_routes
node_api_entry -->|"registers routes"| node_attachment_routes
node_api_entry -->|"registers routes"| node_portal_routes
node_api_entry -->|"decodes token"| node_auth_utils
node_auth_routes -->|"hashes credentials"| node_auth_utils
node_task_routes -->|"queries tasks"| node_models
node_task_routes -->|"validates payloads"| node_schemas
node_dashboard_routes -->|"queries metrics"| node_models
node_report_routes -->|"builds reports"| node_models
node_todo_routes -->|"queries threads"| node_models
node_team_routes -->|"manages members"| node_models
node_label_routes -->|"manages labels"| node_models
node_release_routes -->|"manages releases"| node_models
node_relation_routes -->|"links tasks"| node_models
node_comment_routes -->|"stores comments"| node_models
node_attachment_routes -->|"stores metadata"| node_models
node_portal_routes -->|"encrypts token"| node_crypto
node_portal_routes -->|"fetches issue"| node_portal_fetch
node_portal_fetch -.->|"requests issue data"| node_mantis
node_models -->|"maps entities"| node_database
node_task_routes -->|"opens session"| node_database

click node_app "https://github.com/tganeshg/teamman/blob/main/frontend/src/App.tsx"
click node_auth_ui "https://github.com/tganeshg/teamman/blob/main/frontend/src/AuthContext.tsx"
click node_api_client "https://github.com/tganeshg/teamman/blob/main/frontend/src/api/client.ts"
click node_task_ui "https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Tasks.tsx"
click node_my_tasks "https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/MyTaskBoard.tsx"
click node_dashboard_ui "https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Dashboard.tsx"
click node_reports_ui "https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Reports.tsx"
click node_todo_ui "https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Todo.tsx"
click node_team_ui "https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Team.tsx"
click node_settings_ui "https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Settings.tsx"
click node_auth_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/auth.py"
click node_auth_utils "https://github.com/tganeshg/teamman/blob/main/backend/auth_utils.py"
click node_task_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/tasks.py"
click node_dashboard_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/dashboard.py"
click node_report_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/reports.py"
click node_todo_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/todos.py"
click node_team_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/members.py"
click node_label_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/labels.py"
click node_release_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/releases.py"
click node_relation_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/relations.py"
click node_comment_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/comments.py"
click node_attachment_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/attachments.py"
click node_portal_routes "https://github.com/tganeshg/teamman/blob/main/backend/routers/portal.py"
click node_portal_fetch "https://github.com/tganeshg/teamman/blob/main/backend/services/portal_fetcher.py"
click node_crypto "https://github.com/tganeshg/teamman/blob/main/backend/services/crypto.py"
click node_api_entry "https://github.com/tganeshg/teamman/blob/main/backend/main.py"
click node_schemas "https://github.com/tganeshg/teamman/blob/main/backend/schemas.py"
click node_models "https://github.com/tganeshg/teamman/blob/main/backend/models.py"
click node_database "https://github.com/tganeshg/teamman/blob/main/backend/database.py"

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_auth_ui,node_api_client toneBlue
class node_task_ui,node_my_tasks,node_dashboard_ui,node_reports_ui,node_todo_ui,node_task_routes,node_dashboard_routes,node_report_routes,node_todo_routes,node_release_routes,node_relation_routes,node_comment_routes,node_attachment_routes toneAmber
class node_team_ui,node_settings_ui,node_team_routes,node_label_routes toneMint
class node_auth_routes,node_auth_utils,node_portal_routes,node_portal_fetch,node_crypto,node_api_entry,node_schemas toneRose
class node_models,node_database,node_teammate,node_mantis toneIndigo
```

## Components

### Web application

- [App shell](https://github.com/tganeshg/teamman/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session context](https://github.com/tganeshg/teamman/blob/main/frontend/src/AuthContext.tsx): `frontend/src/AuthContext.tsx`
- [API client](https://github.com/tganeshg/teamman/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`

### Task workflow

- [Task workspace](https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Tasks.tsx): `frontend/src/pages/Tasks.tsx`
- [My task board](https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/MyTaskBoard.tsx): `frontend/src/pages/MyTaskBoard.tsx`
- [Dashboard view](https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Dashboard.tsx): `frontend/src/pages/Dashboard.tsx`
- [Reports view](https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Reports.tsx): `frontend/src/pages/Reports.tsx`
- [Todo threads](https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Todo.tsx): `frontend/src/pages/Todo.tsx`
- [Task routes](https://github.com/tganeshg/teamman/blob/main/backend/routers/tasks.py): `backend/routers/tasks.py`
- [Dashboard routes](https://github.com/tganeshg/teamman/blob/main/backend/routers/dashboard.py): `backend/routers/dashboard.py`
- [Report routes](https://github.com/tganeshg/teamman/blob/main/backend/routers/reports.py): `backend/routers/reports.py`
- [Todo routes](https://github.com/tganeshg/teamman/blob/main/backend/routers/todos.py): `backend/routers/todos.py`
- [Release routes](https://github.com/tganeshg/teamman/blob/main/backend/routers/releases.py): `backend/routers/releases.py`
- [Task relations](https://github.com/tganeshg/teamman/blob/main/backend/routers/relations.py): `backend/routers/relations.py`
- [Comments](https://github.com/tganeshg/teamman/blob/main/backend/routers/comments.py): `backend/routers/comments.py`
- [Attachments](https://github.com/tganeshg/teamman/blob/main/backend/routers/attachments.py): `backend/routers/attachments.py`

### Team operations

- [Team management](https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Team.tsx): `frontend/src/pages/Team.tsx`
- [Settings view](https://github.com/tganeshg/teamman/blob/main/frontend/src/pages/Settings.tsx): `frontend/src/pages/Settings.tsx`
- [Member routes](https://github.com/tganeshg/teamman/blob/main/backend/routers/members.py): `backend/routers/members.py`
- [Label routes](https://github.com/tganeshg/teamman/blob/main/backend/routers/labels.py): `backend/routers/labels.py`

### API and services

- [Authentication routes](https://github.com/tganeshg/teamman/blob/main/backend/routers/auth.py): `backend/routers/auth.py`
- [Auth utilities](https://github.com/tganeshg/teamman/blob/main/backend/auth_utils.py): `backend/auth_utils.py`
- [Portal integration](https://github.com/tganeshg/teamman/blob/main/backend/routers/portal.py): `backend/routers/portal.py`
- [Mantis fetcher](https://github.com/tganeshg/teamman/blob/main/backend/services/portal_fetcher.py): `backend/services/portal_fetcher.py`
- [Credential encryption](https://github.com/tganeshg/teamman/blob/main/backend/services/crypto.py): `backend/services/crypto.py`
- [FastAPI application](https://github.com/tganeshg/teamman/blob/main/backend/main.py): `backend/main.py`
- [API schemas](https://github.com/tganeshg/teamman/blob/main/backend/schemas.py): `backend/schemas.py`

### Persistence

- [Domain models](https://github.com/tganeshg/teamman/blob/main/backend/models.py): `backend/models.py`
- [SQLite database](https://github.com/tganeshg/teamman/blob/main/backend/database.py): `backend/database.py`

### Other components

- **Team member**
- **Mantis portal**

## Connections

- Team member → App shell: uses (evidence: `README.md`)
- App shell → Session context: checks session (evidence: `frontend/src/App.tsx`)
- App shell → Task workspace: routes to (evidence: `frontend/src/App.tsx`)
- App shell → My task board: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Dashboard view: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Reports view: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Todo threads: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Team management: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Settings view: routes to (evidence: `frontend/src/App.tsx`)
- Session context → API client: validates session (evidence: `frontend/src/AuthContext.tsx`)
- Task workspace → API client: requests tasks (evidence: `frontend/src/pages/Tasks.tsx`)
- My task board → API client: requests tasks (evidence: `frontend/src/pages/MyTaskBoard.tsx`)
- Dashboard view → API client: loads summary (evidence: `frontend/src/pages/Dashboard.tsx`)
- Reports view → API client: loads reports (evidence: `frontend/src/pages/Reports.tsx`)
- Todo threads → API client: manages threads (evidence: `frontend/src/pages/Todo.tsx`)
- Team management → API client: manages members (evidence: `frontend/src/pages/Team.tsx`)
- Settings view → API client: updates settings (evidence: `frontend/src/pages/Settings.tsx`)
- API client → FastAPI application: HTTP requests (evidence: `frontend/src/api/client.ts`)
- FastAPI application → Authentication routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Task routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Dashboard routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Report routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Todo routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Member routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Label routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Release routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Task relations: registers routes (evidence: `backend/main.py`)
- FastAPI application → Comments: registers routes (evidence: `backend/main.py`)
- FastAPI application → Attachments: registers routes (evidence: `backend/main.py`)
- FastAPI application → Portal integration: registers routes (evidence: `backend/main.py`)
- FastAPI application → Auth utilities: decodes token (evidence: `backend/main.py`)
- Authentication routes → Auth utilities: hashes credentials (evidence: `backend/routers/auth.py`)
- Task routes → Domain models: queries tasks (evidence: `backend/routers/tasks.py`)
- Task routes → API schemas: validates payloads (evidence: `backend/routers/tasks.py`)
- Dashboard routes → Domain models: queries metrics (evidence: `backend/routers/dashboard.py`)
- Report routes → Domain models: builds reports (evidence: `backend/routers/reports.py`)
- Todo routes → Domain models: queries threads (evidence: `backend/routers/todos.py`)
- Member routes → Domain models: manages members (evidence: `backend/routers/members.py`)
- Label routes → Domain models: manages labels (evidence: `backend/routers/labels.py`)
- Release routes → Domain models: manages releases (evidence: `backend/routers/releases.py`)
- Task relations → Domain models: links tasks (evidence: `backend/routers/relations.py`)
- Comments → Domain models: stores comments (evidence: `backend/routers/comments.py`)
- Attachments → Domain models: stores metadata (evidence: `backend/routers/attachments.py`)
- Portal integration → Credential encryption: encrypts token (evidence: `backend/routers/portal.py`)
- Portal integration → Mantis fetcher: fetches issue (evidence: `backend/routers/portal.py`)
- Mantis fetcher → Mantis portal: requests issue data (evidence: `README.md`)
- Domain models → SQLite database: maps entities (evidence: `backend/models.py`)
- Task routes → SQLite database: opens session (evidence: `backend/routers/tasks.py`)
