# shahmeer-pro/teamflow architecture

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

- Interactive diagram: https://gitdiagram.com/shahmeer-pro/teamflow
- Repository: https://github.com/shahmeer-pro/teamflow

## Overview

TeamFlow is a project-management application for signing in, organizing workspaces and teams, and managing projects, tasks, and collaboration. The principal workflow runs from the browser through FastAPI routes and service operations to persistent domain data; authentication is a cross-cutting entry stage. README features also include comments, invitations, and member access control. The source index supports the main route/service links, while some frontend-to-backend wiring is not shown, so that relationship is left unverified.

Main entry points: [`app/main.py`](https://github.com/shahmeer-pro/teamflow/blob/main/app/main.py) (FastAPI application), [`app/dependencies/auth_dependency.py`](https://github.com/shahmeer-pro/teamflow/blob/main/app/dependencies/auth_dependency.py) (Request identity), [`app/models`](https://github.com/shahmeer-pro/teamflow/tree/main/app/models) (Users and work entities), [`app/routes/auth.py`](https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/auth.py) (Auth endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_browser_ui["TeamFlow interface<br/>[app.js]"]
end

subgraph group_api["API and auth"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_auth_routes["Auth endpoints<br/>[auth.py]"]
  node_auth_service["Authentication<br/>[auth_service.py]"]
  node_security["Token and password security<br/>[security.py]"]
  node_auth_dependency["Request identity<br/>[auth_dependency.py]"]
  node_user_routes["User endpoints<br/>[users.py]"]
  node_api_schemas["Request and response schemas"]
end

subgraph group_workspace["Workspace management"]
  node_org_routes["Organization endpoints<br/>[organizations.py]"]
  node_org_service["Organization and invitations"]
  node_membership_routes["Membership endpoints<br/>[memberships.py]"]
  node_membership_service["Membership operations"]
end

subgraph group_work["Project work"]
  node_project_routes["Project endpoints<br/>[projects.py]"]
  node_project_service["Project operations<br/>[project_service.py]"]
  node_task_routes["Task endpoints<br/>[tasks.py]"]
  node_task_service["Task operations<br/>[task_service.py]"]
  node_comment_routes["Comment endpoints<br/>[comments.py]"]
  node_comment_service["Comment operations<br/>[comment_service.py]"]
end

subgraph group_data["Persistence"]
  node_domain_models["Users and work entities"]
  node_database[("Async database access<br/>[database.py]")]
  node_sqlite_store[("SQLite database<br/>[teamflow.db]")]
end

node_user_actor(("Team member"))

node_user_actor -->|"uses"| node_browser_ui
node_browser_ui -.->|"calls API"| node_api_app
node_api_app -->|"registers"| node_auth_routes
node_api_app -->|"registers"| node_user_routes
node_api_app -->|"registers"| node_org_routes
node_api_app -->|"registers"| node_project_routes
node_api_app -->|"registers"| node_task_routes
node_api_app -->|"registers"| node_comment_routes
node_api_app -->|"registers"| node_membership_routes
node_auth_routes -->|"delegates"| node_auth_service
node_auth_service -->|"uses"| node_security
node_auth_routes -->|"requires identity"| node_auth_dependency
node_auth_dependency -->|"loads user"| node_domain_models
node_user_routes -->|"requires identity"| node_auth_dependency
node_org_routes -->|"delegates"| node_org_service
node_org_routes -->|"requires identity"| node_auth_dependency
node_membership_routes -->|"delegates"| node_membership_service
node_membership_routes -->|"requires identity"| node_auth_dependency
node_project_routes -->|"delegates"| node_project_service
node_project_routes -->|"requires identity"| node_auth_dependency
node_task_routes -->|"delegates"| node_task_service
node_task_routes -->|"requires identity"| node_auth_dependency
node_comment_routes -->|"delegates"| node_comment_service
node_org_service -->|"reads and writes"| node_domain_models
node_membership_service -->|"reads and writes"| node_domain_models
node_project_service -->|"reads and writes"| node_domain_models
node_task_service -->|"reads and writes"| node_domain_models
node_comment_service -->|"reads and writes"| node_domain_models
node_auth_service -->|"reads and writes"| node_domain_models
node_auth_routes -->|"validates payloads"| node_api_schemas
node_task_routes -->|"validates payloads"| node_api_schemas
node_database -.->|"persists data"| node_sqlite_store
node_api_app -->|"initializes access"| node_database

click node_browser_ui "https://github.com/shahmeer-pro/teamflow/blob/main/app/static/js/app.js"
click node_api_app "https://github.com/shahmeer-pro/teamflow/blob/main/app/main.py"
click node_auth_routes "https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/auth.py"
click node_auth_service "https://github.com/shahmeer-pro/teamflow/blob/main/app/services/auth_service.py"
click node_security "https://github.com/shahmeer-pro/teamflow/blob/main/app/core/security.py"
click node_auth_dependency "https://github.com/shahmeer-pro/teamflow/blob/main/app/dependencies/auth_dependency.py"
click node_user_routes "https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/users.py"
click node_org_routes "https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/organizations.py"
click node_org_service "https://github.com/shahmeer-pro/teamflow/blob/main/app/services/organization_service.py"
click node_membership_routes "https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/memberships.py"
click node_membership_service "https://github.com/shahmeer-pro/teamflow/blob/main/app/services/membership_service.py"
click node_project_routes "https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/projects.py"
click node_project_service "https://github.com/shahmeer-pro/teamflow/blob/main/app/services/project_service.py"
click node_task_routes "https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/tasks.py"
click node_task_service "https://github.com/shahmeer-pro/teamflow/blob/main/app/services/task_service.py"
click node_comment_routes "https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/comments.py"
click node_comment_service "https://github.com/shahmeer-pro/teamflow/blob/main/app/services/comment_service.py"
click node_domain_models "https://github.com/shahmeer-pro/teamflow/tree/main/app/models"
click node_api_schemas "https://github.com/shahmeer-pro/teamflow/tree/main/app/schemas"
click node_database "https://github.com/shahmeer-pro/teamflow/blob/main/app/database.py"
click node_sqlite_store "https://github.com/shahmeer-pro/teamflow/blob/main/teamflow.db"

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_browser_ui toneBlue
class node_api_app,node_auth_routes,node_auth_service,node_security,node_auth_dependency,node_user_routes,node_api_schemas toneAmber
class node_org_routes,node_org_service,node_membership_routes,node_membership_service toneMint
class node_project_routes,node_project_service,node_task_routes,node_task_service,node_comment_routes,node_comment_service toneRose
class node_domain_models,node_database,node_sqlite_store,node_user_actor toneIndigo
```

## Components

### Web client

- [TeamFlow interface](https://github.com/shahmeer-pro/teamflow/blob/main/app/static/js/app.js): `app/static/js/app.js`

### API and auth

- [FastAPI application](https://github.com/shahmeer-pro/teamflow/blob/main/app/main.py): `app/main.py`
- [Auth endpoints](https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/auth.py): `app/routes/auth.py`
- [Authentication](https://github.com/shahmeer-pro/teamflow/blob/main/app/services/auth_service.py): `app/services/auth_service.py`
- [Token and password security](https://github.com/shahmeer-pro/teamflow/blob/main/app/core/security.py): `app/core/security.py`
- [Request identity](https://github.com/shahmeer-pro/teamflow/blob/main/app/dependencies/auth_dependency.py): `app/dependencies/auth_dependency.py`
- [User endpoints](https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/users.py): `app/routes/users.py`
- [Request and response schemas](https://github.com/shahmeer-pro/teamflow/tree/main/app/schemas): `app/schemas`

### Workspace management

- [Organization endpoints](https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/organizations.py): `app/routes/organizations.py`
- [Organization and invitations](https://github.com/shahmeer-pro/teamflow/blob/main/app/services/organization_service.py): `app/services/organization_service.py`
- [Membership endpoints](https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/memberships.py): `app/routes/memberships.py`
- [Membership operations](https://github.com/shahmeer-pro/teamflow/blob/main/app/services/membership_service.py): `app/services/membership_service.py`

### Project work

- [Project endpoints](https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/projects.py): `app/routes/projects.py`
- [Project operations](https://github.com/shahmeer-pro/teamflow/blob/main/app/services/project_service.py): `app/services/project_service.py`
- [Task endpoints](https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/tasks.py): `app/routes/tasks.py`
- [Task operations](https://github.com/shahmeer-pro/teamflow/blob/main/app/services/task_service.py): `app/services/task_service.py`
- [Comment endpoints](https://github.com/shahmeer-pro/teamflow/blob/main/app/routes/comments.py): `app/routes/comments.py`
- [Comment operations](https://github.com/shahmeer-pro/teamflow/blob/main/app/services/comment_service.py): `app/services/comment_service.py`

### Persistence

- [Users and work entities](https://github.com/shahmeer-pro/teamflow/tree/main/app/models): `app/models`
- [Async database access](https://github.com/shahmeer-pro/teamflow/blob/main/app/database.py): `app/database.py`
- [SQLite database](https://github.com/shahmeer-pro/teamflow/blob/main/teamflow.db): `teamflow.db`

### Other components

- **Team member**

## Connections

- Team member → TeamFlow interface: uses (evidence: `README.md`)
- TeamFlow interface → FastAPI application: calls API
- FastAPI application → Auth endpoints: registers (evidence: `app/main.py`)
- FastAPI application → User endpoints: registers (evidence: `app/main.py`)
- FastAPI application → Organization endpoints: registers (evidence: `app/main.py`)
- FastAPI application → Project endpoints: registers (evidence: `app/main.py`)
- FastAPI application → Task endpoints: registers (evidence: `app/main.py`)
- FastAPI application → Comment endpoints: registers (evidence: `app/main.py`)
- FastAPI application → Membership endpoints: registers (evidence: `app/main.py`)
- Auth endpoints → Authentication: delegates (evidence: `app/routes/auth.py`)
- Authentication → Token and password security: uses (evidence: `app/services/auth_service.py`)
- Auth endpoints → Request identity: requires identity (evidence: `app/routes/auth.py`)
- Request identity → Users and work entities: loads user (evidence: `app/dependencies/auth_dependency.py`)
- User endpoints → Request identity: requires identity (evidence: `app/routes/users.py`)
- Organization endpoints → Organization and invitations: delegates (evidence: `app/routes/organizations.py`)
- Organization endpoints → Request identity: requires identity (evidence: `app/routes/organizations.py`)
- Membership endpoints → Membership operations: delegates (evidence: `app/routes/memberships.py`)
- Membership endpoints → Request identity: requires identity (evidence: `app/routes/memberships.py`)
- Project endpoints → Project operations: delegates (evidence: `app/routes/projects.py`)
- Project endpoints → Request identity: requires identity (evidence: `app/routes/projects.py`)
- Task endpoints → Task operations: delegates (evidence: `app/routes/tasks.py`)
- Task endpoints → Request identity: requires identity (evidence: `app/routes/tasks.py`)
- Comment endpoints → Comment operations: delegates (evidence: `app/routes/comments.py`)
- Organization and invitations → Users and work entities: reads and writes (evidence: `app/services/organization_service.py`)
- Membership operations → Users and work entities: reads and writes (evidence: `app/services/membership_service.py`)
- Project operations → Users and work entities: reads and writes (evidence: `app/services/project_service.py`)
- Task operations → Users and work entities: reads and writes (evidence: `app/services/task_service.py`)
- Comment operations → Users and work entities: reads and writes (evidence: `app/services/comment_service.py`)
- Authentication → Users and work entities: reads and writes (evidence: `app/services/auth_service.py`)
- Auth endpoints → Request and response schemas: validates payloads (evidence: `app/routes/auth.py`)
- Task endpoints → Request and response schemas: validates payloads (evidence: `app/routes/tasks.py`)
- Async database access → SQLite database: persists data
- FastAPI application → Async database access: initializes access (evidence: `app/main.py`)
