# muskan-773/opsflow architecture

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

- Interactive diagram: https://gitdiagram.com/muskan-773/opsflow
- Repository: https://github.com/muskan-773/opsflow

## Overview

OpsFlow is a team-scoped operations-work platform. Users sign in, view team dashboards and work items, then create, assign or claim, update, comment on, and move items through approval and resolution; the backend enforces roles and concurrency rules. Mutations also record activity and enqueue transactional outbox jobs for background processing. The graph reflects README-documented capabilities where source excerpts are incomplete; dashed links mark documented but unsampled relationships.

Main entry points: [`frontend/src/App.jsx`](https://github.com/muskan-773/opsflow/blob/main/frontend/src/App.jsx) (React application), [`frontend/src/api/client.js`](https://github.com/muskan-773/opsflow/blob/main/frontend/src/api/client.js) (API client), [`backend/app/services/work_items.py`](https://github.com/muskan-773/opsflow/blob/main/backend/app/services/work_items.py) (Work item workflows), [`frontend/src/pages/DashboardPage.jsx`](https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/DashboardPage.jsx) (Dashboard view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_spa["React application<br/>[App.jsx]"]
  node_auth_ui["Session context<br/>[AuthContext.jsx]"]
  node_api_client["API client<br/>[client.js]"]
  node_login["Login page<br/>[LoginPage.jsx]"]
  node_dashboard_ui["Dashboard view<br/>[DashboardPage.jsx]"]
  node_list_ui["Work item list<br/>[WorkItemsPage.jsx]"]
  node_create_ui["Item creation<br/>[CreateItemPage.jsx]"]
  node_detail_ui["Item detail"]
  node_ui_states["Status displays<br/>[States.jsx]"]
  node_ui_badges["Item badges<br/>[Badges.jsx]"]
end

subgraph group_api["API and domain"]
  node_app_entry["FastAPI application<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_auth_logic["JWT and password auth<br/>[auth.py]"]
  node_item_routes["Work item routes<br/>[work_items.py]"]
  node_item_service["Work item workflows<br/>[work_items.py]"]
  node_permissions["Role permissions<br/>[permissions.py]"]
  node_dashboard_routes["Dashboard routes<br/>[dashboard.py]"]
  node_dashboard_service["Dashboard queries<br/>[dashboard.py]"]
  node_activity["Activity logging<br/>[activity.py]"]
end

subgraph group_data["Persistence"]
  node_database["Session and transactions<br/>[database.py]"]
  node_models["Domain and job models<br/>[models.py]"]
  node_postgres[("PostgreSQL")]
end

subgraph group_async["Async processing"]
  node_outbox_service["Outbox enqueue and processing<br/>[outbox.py]"]
  node_worker["Outbox worker<br/>[worker.py]"]
end

node_user(("Operations user"))

node_user -->|"uses"| node_spa
node_spa -->|"provides session"| node_auth_ui
node_spa -->|"routes to"| node_login
node_spa -->|"routes to"| node_dashboard_ui
node_spa -->|"routes to"| node_list_ui
node_spa -->|"routes to"| node_create_ui
node_spa -->|"routes to"| node_detail_ui
node_auth_ui -->|"calls"| node_api_client
node_login -->|"uses"| node_auth_ui
node_dashboard_ui -->|"fetches dashboard"| node_api_client
node_list_ui -->|"fetches items"| node_api_client
node_create_ui -->|"creates items"| node_api_client
node_detail_ui -->|"updates items"| node_api_client
node_dashboard_ui -->|"renders"| node_ui_states
node_dashboard_ui -->|"renders"| node_ui_badges
node_list_ui -->|"renders"| node_ui_states
node_list_ui -->|"renders"| node_ui_badges
node_detail_ui -->|"renders"| node_ui_states
node_detail_ui -->|"renders"| node_ui_badges
node_api_client -->|"sends API requests"| node_app_entry
node_app_entry -->|"registers"| node_auth_routes
node_app_entry -->|"registers"| node_item_routes
node_app_entry -->|"registers"| node_dashboard_routes
node_auth_routes -->|"authenticates"| node_auth_logic
node_auth_routes -->|"uses sessions"| node_database
node_item_routes -->|"dispatches workflows"| node_item_service
node_item_routes -->|"authenticates requests"| node_auth_logic
node_item_service -->|"checks access"| node_permissions
node_item_service -->|"records events"| node_activity
node_item_service -->|"enqueues jobs"| node_outbox_service
node_item_service -->|"queries and mutates"| node_models
node_dashboard_routes -->|"dispatches queries"| node_dashboard_service
node_dashboard_service -->|"scopes access"| node_permissions
node_dashboard_service -->|"queries"| node_models
node_database -->|"opens sessions"| node_postgres
node_models -->|"uses declarative base"| node_database
node_outbox_service -->|"reads and writes jobs"| node_models
node_worker -->|"processes jobs"| node_outbox_service
node_worker -->|"opens sessions"| node_database
node_outbox_service -.->|"persists outbox"| node_postgres

click node_spa "https://github.com/muskan-773/opsflow/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/muskan-773/opsflow/blob/main/frontend/src/context/AuthContext.jsx"
click node_api_client "https://github.com/muskan-773/opsflow/blob/main/frontend/src/api/client.js"
click node_login "https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/LoginPage.jsx"
click node_dashboard_ui "https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/DashboardPage.jsx"
click node_list_ui "https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/WorkItemsPage.jsx"
click node_create_ui "https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/CreateItemPage.jsx"
click node_detail_ui "https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/WorkItemDetailPage.jsx"
click node_ui_states "https://github.com/muskan-773/opsflow/blob/main/frontend/src/components/States.jsx"
click node_ui_badges "https://github.com/muskan-773/opsflow/blob/main/frontend/src/components/Badges.jsx"
click node_app_entry "https://github.com/muskan-773/opsflow/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/muskan-773/opsflow/blob/main/backend/app/routes/auth.py"
click node_auth_logic "https://github.com/muskan-773/opsflow/blob/main/backend/app/auth.py"
click node_item_routes "https://github.com/muskan-773/opsflow/blob/main/backend/app/routes/work_items.py"
click node_item_service "https://github.com/muskan-773/opsflow/blob/main/backend/app/services/work_items.py"
click node_permissions "https://github.com/muskan-773/opsflow/blob/main/backend/app/permissions.py"
click node_dashboard_routes "https://github.com/muskan-773/opsflow/blob/main/backend/app/routes/dashboard.py"
click node_dashboard_service "https://github.com/muskan-773/opsflow/blob/main/backend/app/services/dashboard.py"
click node_activity "https://github.com/muskan-773/opsflow/blob/main/backend/app/activity.py"
click node_database "https://github.com/muskan-773/opsflow/blob/main/backend/app/database.py"
click node_models "https://github.com/muskan-773/opsflow/blob/main/backend/app/models.py"
click node_outbox_service "https://github.com/muskan-773/opsflow/blob/main/backend/app/services/outbox.py"
click node_worker "https://github.com/muskan-773/opsflow/blob/main/backend/worker.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_spa,node_auth_ui,node_api_client,node_login,node_dashboard_ui,node_list_ui,node_create_ui,node_detail_ui,node_ui_states,node_ui_badges,node_user toneBlue
class node_app_entry,node_auth_routes,node_auth_logic,node_item_routes,node_item_service,node_permissions,node_dashboard_routes,node_dashboard_service,node_activity toneAmber
class node_database,node_models,node_postgres toneMint
class node_outbox_service,node_worker toneRose
```

## Components

### Web client

- [React application](https://github.com/muskan-773/opsflow/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Session context](https://github.com/muskan-773/opsflow/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/muskan-773/opsflow/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`
- [Login page](https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/LoginPage.jsx): `frontend/src/pages/LoginPage.jsx`
- [Dashboard view](https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/DashboardPage.jsx): `frontend/src/pages/DashboardPage.jsx`
- [Work item list](https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/WorkItemsPage.jsx): `frontend/src/pages/WorkItemsPage.jsx`
- [Item creation](https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/CreateItemPage.jsx): `frontend/src/pages/CreateItemPage.jsx`
- [Item detail](https://github.com/muskan-773/opsflow/blob/main/frontend/src/pages/WorkItemDetailPage.jsx): `frontend/src/pages/WorkItemDetailPage.jsx`
- [Status displays](https://github.com/muskan-773/opsflow/blob/main/frontend/src/components/States.jsx): `frontend/src/components/States.jsx`
- [Item badges](https://github.com/muskan-773/opsflow/blob/main/frontend/src/components/Badges.jsx): `frontend/src/components/Badges.jsx`

### API and domain

- [FastAPI application](https://github.com/muskan-773/opsflow/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication routes](https://github.com/muskan-773/opsflow/blob/main/backend/app/routes/auth.py): `backend/app/routes/auth.py`
- [JWT and password auth](https://github.com/muskan-773/opsflow/blob/main/backend/app/auth.py): `backend/app/auth.py`
- [Work item routes](https://github.com/muskan-773/opsflow/blob/main/backend/app/routes/work_items.py): `backend/app/routes/work_items.py`
- [Work item workflows](https://github.com/muskan-773/opsflow/blob/main/backend/app/services/work_items.py): `backend/app/services/work_items.py`
- [Role permissions](https://github.com/muskan-773/opsflow/blob/main/backend/app/permissions.py): `backend/app/permissions.py`
- [Dashboard routes](https://github.com/muskan-773/opsflow/blob/main/backend/app/routes/dashboard.py): `backend/app/routes/dashboard.py`
- [Dashboard queries](https://github.com/muskan-773/opsflow/blob/main/backend/app/services/dashboard.py): `backend/app/services/dashboard.py`
- [Activity logging](https://github.com/muskan-773/opsflow/blob/main/backend/app/activity.py): `backend/app/activity.py`

### Persistence

- [Session and transactions](https://github.com/muskan-773/opsflow/blob/main/backend/app/database.py): `backend/app/database.py`
- [Domain and job models](https://github.com/muskan-773/opsflow/blob/main/backend/app/models.py): `backend/app/models.py`
- **PostgreSQL**

### Async processing

- [Outbox enqueue and processing](https://github.com/muskan-773/opsflow/blob/main/backend/app/services/outbox.py): `backend/app/services/outbox.py`
- [Outbox worker](https://github.com/muskan-773/opsflow/blob/main/backend/worker.py): `backend/worker.py`

### Other components

- **Operations user**

## Connections

- Operations user → React application: uses (evidence: `README.md`)
- React application → Session context: provides session (evidence: `frontend/src/App.jsx`)
- React application → Login page: routes to (evidence: `frontend/src/App.jsx`)
- React application → Dashboard view: routes to (evidence: `frontend/src/App.jsx`)
- React application → Work item list: routes to (evidence: `frontend/src/App.jsx`)
- React application → Item creation: routes to (evidence: `frontend/src/App.jsx`)
- React application → Item detail: routes to (evidence: `frontend/src/App.jsx`)
- Session context → API client: calls (evidence: `frontend/src/context/AuthContext.jsx`)
- Login page → Session context: uses (evidence: `frontend/src/pages/LoginPage.jsx`)
- Dashboard view → API client: fetches dashboard (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Work item list → API client: fetches items (evidence: `frontend/src/pages/WorkItemsPage.jsx`)
- Item creation → API client: creates items (evidence: `frontend/src/pages/CreateItemPage.jsx`)
- Item detail → API client: updates items (evidence: `frontend/src/pages/WorkItemDetailPage.jsx`)
- Dashboard view → Status displays: renders (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Dashboard view → Item badges: renders (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Work item list → Status displays: renders (evidence: `frontend/src/pages/WorkItemsPage.jsx`)
- Work item list → Item badges: renders (evidence: `frontend/src/pages/WorkItemsPage.jsx`)
- Item detail → Status displays: renders (evidence: `frontend/src/pages/WorkItemDetailPage.jsx`)
- Item detail → Item badges: renders (evidence: `frontend/src/pages/WorkItemDetailPage.jsx`)
- API client → FastAPI application: sends API requests (evidence: `README.md`)
- FastAPI application → Authentication routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Work item routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Dashboard routes: registers (evidence: `backend/app/main.py`)
- Authentication routes → JWT and password auth: authenticates (evidence: `backend/app/routes/auth.py`)
- Authentication routes → Session and transactions: uses sessions (evidence: `backend/app/routes/auth.py`)
- Work item routes → Work item workflows: dispatches workflows (evidence: `backend/app/routes/work_items.py`)
- Work item routes → JWT and password auth: authenticates requests (evidence: `backend/app/routes/work_items.py`)
- Work item workflows → Role permissions: checks access (evidence: `backend/app/services/work_items.py`)
- Work item workflows → Activity logging: records events (evidence: `backend/app/services/work_items.py`)
- Work item workflows → Outbox enqueue and processing: enqueues jobs (evidence: `backend/app/services/work_items.py`)
- Work item workflows → Domain and job models: queries and mutates (evidence: `backend/app/services/work_items.py`)
- Dashboard routes → Dashboard queries: dispatches queries (evidence: `backend/app/routes/dashboard.py`)
- Dashboard queries → Role permissions: scopes access (evidence: `backend/app/services/dashboard.py`)
- Dashboard queries → Domain and job models: queries (evidence: `backend/app/services/dashboard.py`)
- Session and transactions → PostgreSQL: opens sessions (evidence: `README.md`)
- Domain and job models → Session and transactions: uses declarative base (evidence: `backend/app/models.py`)
- Outbox enqueue and processing → Domain and job models: reads and writes jobs (evidence: `backend/app/services/outbox.py`)
- Outbox worker → Outbox enqueue and processing: processes jobs (evidence: `backend/worker.py`)
- Outbox worker → Session and transactions: opens sessions (evidence: `backend/worker.py`)
- Outbox enqueue and processing → PostgreSQL: persists outbox (evidence: `README.md`)
