# mansi-upadhyay-12/operations-under-pressure-system architecture

> Architecture diagram of the GitHub repository mansi-upadhyay-12/operations-under-pressure-system, 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/mansi-upadhyay-12/operations-under-pressure-system
- Repository: https://github.com/mansi-upadhyay-12/operations-under-pressure-system

## Overview

Operations Under Pressure is a team-based operational work-item platform. Operators authenticate, view dashboards and filtered queues, create or open items, then claim, edit, comment, assign, or advance them through approval and resolution; the React client sends these actions to FastAPI, whose authorization and work-item services enforce team roles, state transitions, concurrency, idempotency, and audit history. Database-backed outbox jobs are processed asynchronously for notifications. The README documents pagination, filtering, and retry behavior; source excerpts do not expose every route or persistence detail, so those links are cited to the README where appropriate.

Main entry points: [`frontend/src/App.jsx`](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/App.jsx) (App navigation), [`frontend/src/pages/WorkItemDetailPage.jsx`](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/pages/WorkItemDetailPage.jsx) (Item detail), [`backend/app/services/work_item_service.py`](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/services/work_item_service.py) (Workflow and concurrency), [`frontend/src/services/api.js`](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/services/api.js) (REST client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Operator interface"]
  node_app["App navigation<br/>[App.jsx]"]
  node_authui["Session context<br/>[AuthContext.jsx]"]
  node_api_client["REST client<br/>[api.js]"]
  node_dashboard["Dashboard<br/>[DashboardPage.jsx]"]
  node_queue["Work-item queue"]
  node_detail["Item detail"]
  node_create_form["Creation form"]
  node_activity_ui["Activity timeline"]
  node_comments_ui["Comments<br/>[CommentsList.jsx]"]
  node_workflow_ui["Workflow display"]
  node_conflict_ui["Conflict recovery<br/>[ConflictModal.jsx]"]
end

subgraph group_api["API and access"]
  node_backend["FastAPI application<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_team_routes["Team routes<br/>[teams.py]"]
  node_auth_security["JWT security<br/>[security.py]"]
  node_access["Authentication and RBAC<br/>[dependencies.py]"]
end

subgraph group_domain["Work-item operations"]
  node_work_routes["Work-item routes<br/>[work_items.py]"]
  node_work_service["Workflow and concurrency"]
  node_seed["Demo data seeding<br/>[seed_service.py]"]
end

subgraph group_storage["Persistence and history"]
  node_db_session["Database sessions<br/>[database.py]"]
  node_work_store[("Work items<br/>[work_item.py]")]
  node_identity_store[("Users and teams<br/>[team.py]")]
  node_activity_store[("Activity and comments<br/>[activity.py]")]
  node_comment_model[("Comment records<br/>[comment.py]")]
  node_idempotency_store[("Idempotency keys<br/>[idempotency.py]")]
end

subgraph group_async["Background notifications"]
  node_outbox_service["Outbox processing<br/>[outbox_service.py]"]
  node_outbox_store[("Outbox jobs<br/>[outbox.py]")]
  node_worker["Background worker<br/>[worker.py]"]
  node_notification["Notification sink"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_app
node_app -->|"provides session"| node_authui
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_queue
node_app -->|"renders"| node_detail
node_app -->|"renders"| node_create_form
node_authui -->|"calls"| node_api_client
node_dashboard -->|"calls"| node_api_client
node_queue -->|"calls"| node_api_client
node_detail -->|"calls"| node_api_client
node_detail -->|"renders"| node_workflow_ui
node_detail -->|"renders"| node_activity_ui
node_detail -->|"renders"| node_comments_ui
node_detail -->|"uses"| node_conflict_ui
node_create_form -->|"submits through"| node_api_client
node_api_client -->|"REST requests"| node_backend
node_backend -->|"registers routes"| node_auth_routes
node_backend -->|"registers routes"| node_team_routes
node_backend -->|"registers routes"| node_work_routes
node_auth_routes -->|"uses"| node_auth_security
node_auth_routes -->|"authenticates with"| node_access
node_work_routes -->|"checks access"| node_access
node_work_routes -->|"delegates operations"| node_work_service
node_work_service -->|"updates and queries"| node_work_store
node_work_service -->|"records audit events"| node_activity_store
node_work_service -->|"uses comments"| node_comment_model
node_work_service -->|"deduplicates submissions"| node_idempotency_store
node_work_service -->|"enqueues notifications"| node_outbox_service
node_backend -->|"initializes"| node_db_session
node_db_session -->|"maps tables"| node_work_store
node_access -->|"gets sessions"| node_db_session
node_access -->|"loads memberships"| node_identity_store
node_auth_routes -->|"reads users"| node_identity_store
node_team_routes -.->|"serves team data"| node_identity_store
node_seed -->|"creates demo teams"| node_identity_store
node_seed -->|"creates demo items"| node_work_store
node_seed -->|"seeds history"| node_activity_store
node_seed -->|"seeds comments"| node_comment_model
node_outbox_service -->|"stores and polls jobs"| node_outbox_store
node_worker -->|"processes jobs"| node_outbox_service
node_outbox_service -->|"logs notifications"| node_notification

click node_app "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/context/AuthContext.jsx"
click node_api_client "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/services/api.js"
click node_dashboard "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/pages/DashboardPage.jsx"
click node_queue "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/pages/WorkItemListPage.jsx"
click node_detail "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/pages/WorkItemDetailPage.jsx"
click node_create_form "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/components/WorkItemFormModal.jsx"
click node_activity_ui "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/components/ActivityTimeline.jsx"
click node_comments_ui "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/components/CommentsList.jsx"
click node_workflow_ui "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/components/WorkflowStepper.jsx"
click node_conflict_ui "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/components/ConflictModal.jsx"
click node_backend "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/routers/auth.py"
click node_team_routes "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/routers/teams.py"
click node_auth_security "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/auth/security.py"
click node_access "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/auth/dependencies.py"
click node_work_routes "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/routers/work_items.py"
click node_work_service "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/services/work_item_service.py"
click node_seed "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/services/seed_service.py"
click node_db_session "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/database.py"
click node_work_store "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/work_item.py"
click node_identity_store "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/team.py"
click node_activity_store "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/activity.py"
click node_comment_model "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/comment.py"
click node_idempotency_store "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/idempotency.py"
click node_outbox_service "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/services/outbox_service.py"
click node_outbox_store "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/outbox.py"
click node_worker "https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/utils/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_app,node_authui,node_api_client,node_dashboard,node_queue,node_detail,node_create_form,node_activity_ui,node_comments_ui,node_workflow_ui,node_conflict_ui toneBlue
class node_backend,node_auth_routes,node_team_routes,node_auth_security,node_access toneAmber
class node_work_routes,node_work_service,node_seed toneMint
class node_db_session,node_work_store,node_identity_store,node_activity_store,node_comment_model,node_idempotency_store toneRose
class node_outbox_service,node_outbox_store,node_worker,node_notification,node_operator toneIndigo
```

## Components

### Operator interface

- [App navigation](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Session context](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [REST client](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Dashboard](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/pages/DashboardPage.jsx): `frontend/src/pages/DashboardPage.jsx`
- [Work-item queue](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/pages/WorkItemListPage.jsx): `frontend/src/pages/WorkItemListPage.jsx`
- [Item detail](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/pages/WorkItemDetailPage.jsx): `frontend/src/pages/WorkItemDetailPage.jsx`
- [Creation form](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/components/WorkItemFormModal.jsx): `frontend/src/components/WorkItemFormModal.jsx`
- [Activity timeline](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/components/ActivityTimeline.jsx): `frontend/src/components/ActivityTimeline.jsx`
- [Comments](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/components/CommentsList.jsx): `frontend/src/components/CommentsList.jsx`
- [Workflow display](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/components/WorkflowStepper.jsx): `frontend/src/components/WorkflowStepper.jsx`
- [Conflict recovery](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/frontend/src/components/ConflictModal.jsx): `frontend/src/components/ConflictModal.jsx`

### API and access

- [FastAPI application](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication routes](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Team routes](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/routers/teams.py): `backend/app/routers/teams.py`
- [JWT security](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/auth/security.py): `backend/app/auth/security.py`
- [Authentication and RBAC](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/auth/dependencies.py): `backend/app/auth/dependencies.py`

### Work-item operations

- [Work-item routes](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/routers/work_items.py): `backend/app/routers/work_items.py`
- [Workflow and concurrency](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/services/work_item_service.py): `backend/app/services/work_item_service.py`
- [Demo data seeding](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/services/seed_service.py): `backend/app/services/seed_service.py`

### Persistence and history

- [Database sessions](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/database.py): `backend/app/database.py`
- [Work items](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/work_item.py): `backend/app/models/work_item.py`
- [Users and teams](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/team.py): `backend/app/models/team.py`
- [Activity and comments](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/activity.py): `backend/app/models/activity.py`
- [Comment records](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/comment.py): `backend/app/models/comment.py`
- [Idempotency keys](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/idempotency.py): `backend/app/models/idempotency.py`

### Background notifications

- [Outbox processing](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/services/outbox_service.py): `backend/app/services/outbox_service.py`
- [Outbox jobs](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/models/outbox.py): `backend/app/models/outbox.py`
- [Background worker](https://github.com/mansi-upadhyay-12/operations-under-pressure-system/blob/main/backend/app/utils/worker.py): `backend/app/utils/worker.py`
- **Notification sink**

### Other components

- **Operator**

## Connections

- Operator → App navigation: uses
- App navigation → Session context: provides session (evidence: `frontend/src/App.jsx`)
- App navigation → Dashboard: renders (evidence: `frontend/src/App.jsx`)
- App navigation → Work-item queue: renders (evidence: `frontend/src/App.jsx`)
- App navigation → Item detail: renders (evidence: `frontend/src/App.jsx`)
- App navigation → Creation form: renders (evidence: `frontend/src/App.jsx`)
- Session context → REST client: calls (evidence: `frontend/src/context/AuthContext.jsx`)
- Dashboard → REST client: calls (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Work-item queue → REST client: calls (evidence: `frontend/src/pages/WorkItemListPage.jsx`)
- Item detail → REST client: calls (evidence: `frontend/src/pages/WorkItemDetailPage.jsx`)
- Item detail → Workflow display: renders (evidence: `frontend/src/pages/WorkItemDetailPage.jsx`)
- Item detail → Activity timeline: renders (evidence: `frontend/src/pages/WorkItemDetailPage.jsx`)
- Item detail → Comments: renders (evidence: `frontend/src/pages/WorkItemDetailPage.jsx`)
- Item detail → Conflict recovery: uses (evidence: `frontend/src/pages/WorkItemDetailPage.jsx`)
- Creation form → REST client: submits through (evidence: `frontend/src/components/WorkItemFormModal.jsx`)
- REST client → FastAPI application: REST requests (evidence: `frontend/src/services/api.js`)
- FastAPI application → Authentication routes: registers routes (evidence: `backend/app/main.py`)
- FastAPI application → Team routes: registers routes (evidence: `backend/app/main.py`)
- FastAPI application → Work-item routes: registers routes (evidence: `backend/app/main.py`)
- Authentication routes → JWT security: uses (evidence: `backend/app/routers/auth.py`)
- Authentication routes → Authentication and RBAC: authenticates with (evidence: `backend/app/routers/auth.py`)
- Work-item routes → Authentication and RBAC: checks access (evidence: `backend/app/routers/work_items.py`)
- Work-item routes → Workflow and concurrency: delegates operations (evidence: `backend/app/routers/work_items.py`)
- Workflow and concurrency → Work items: updates and queries (evidence: `backend/app/services/work_item_service.py`)
- Workflow and concurrency → Activity and comments: records audit events (evidence: `backend/app/services/work_item_service.py`)
- Workflow and concurrency → Comment records: uses comments (evidence: `backend/app/services/work_item_service.py`)
- Workflow and concurrency → Idempotency keys: deduplicates submissions (evidence: `backend/app/services/work_item_service.py`)
- Workflow and concurrency → Outbox processing: enqueues notifications (evidence: `backend/app/services/work_item_service.py`)
- FastAPI application → Database sessions: initializes (evidence: `backend/app/main.py`)
- Database sessions → Work items: maps tables (evidence: `backend/app/database.py`)
- Authentication and RBAC → Database sessions: gets sessions (evidence: `backend/app/auth/dependencies.py`)
- Authentication and RBAC → Users and teams: loads memberships (evidence: `backend/app/auth/dependencies.py`)
- Authentication routes → Users and teams: reads users (evidence: `backend/app/routers/auth.py`)
- Team routes → Users and teams: serves team data
- Demo data seeding → Users and teams: creates demo teams (evidence: `backend/app/services/seed_service.py`)
- Demo data seeding → Work items: creates demo items (evidence: `backend/app/services/seed_service.py`)
- Demo data seeding → Activity and comments: seeds history (evidence: `backend/app/services/seed_service.py`)
- Demo data seeding → Comment records: seeds comments (evidence: `backend/app/services/seed_service.py`)
- Outbox processing → Outbox jobs: stores and polls jobs (evidence: `backend/app/services/outbox_service.py`)
- Background worker → Outbox processing: processes jobs (evidence: `backend/app/utils/worker.py`)
- Outbox processing → Notification sink: logs notifications (evidence: `backend/app/services/outbox_service.py`)
