# haneefa96/patent-management-system architecture

> Architecture diagram of the GitHub repository haneefa96/patent-management-system, 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/haneefa96/patent-management-system
- Repository: https://github.com/haneefa96/patent-management-system

## Overview

This is a role-based patent-management portal for a college IP Cell. Its documented workflow runs from applicant submission and disclosure upload, through scrutinizer review and consultant evaluation, to status tracking; administrators manage users, departments, assignments, and metrics. The backend separates patent records, workflow transitions, documents, reviews, authentication, and supporting capabilities. The README describes product behavior, but several implementation details are unsampled, so those subsystem links are documented at a high level; the workflow service’s internal calls are supported by its excerpt.

Main entry points: [`frontend/src/App.jsx`](https://github.com/haneefa96/patent-management-system/blob/main/frontend/src/App.jsx) (Web portal), [`backend/apps/patents/models.py`](https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/patents/models.py) (Patent applications), [`backend/apps/workflow/services.py`](https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/workflow/services.py) (Transition service), [`frontend/src/features/workflow`](https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/workflow) (Review actions and timeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_web["Web portal<br/>[App.jsx]"]
  node_auth_ui["Sign-in and registration"]
  node_patent_ui["Patent submission and tracking"]
  node_workflow_ui["Review actions and timeline"]
  node_dashboard_ui["Role dashboards"]
  node_document_ui["Disclosure upload"]
end

subgraph group_identity["Identity and administration"]
  node_authentication["Accounts and JWT auth"]
  node_departments["Department records"]
end

subgraph group_lifecycle["Patent lifecycle"]
  node_patents[("Patent applications<br/>[models.py]")]
  node_workflow_service["Transition service<br/>[services.py]"]
  node_state_machine["Role-gated transitions<br/>[state_machine.py]"]
  node_workflow_access["Workflow permissions<br/>[permissions.py]"]
  node_workflow_events[("Transition history<br/>[models.py]")]
end

subgraph group_support["Supporting capabilities"]
  node_documents["Attachments and disclosures"]
  node_reviews["Review remarks and feedback"]
  node_audit["Audit log"]
  node_notifications["In-app notifications"]
  node_database[("Configured database<br/>[base.py]")]
end

node_applicant(("Applicant"))
node_scrutinizer(("Scrutinizer"))
node_consultant(("Consultant"))
node_admin(("IP Cell admin"))

node_applicant -->|"uses portal"| node_web
node_scrutinizer -->|"uses portal"| node_web
node_consultant -->|"uses portal"| node_web
node_admin -->|"uses portal"| node_web
node_applicant -->|"submits applications"| node_patent_ui
node_applicant -->|"uploads disclosures"| node_document_ui
node_applicant -->|"tracks status"| node_patent_ui
node_scrutinizer -->|"reviews applications"| node_workflow_ui
node_consultant -->|"evaluates applications"| node_workflow_ui
node_admin -->|"views metrics"| node_dashboard_ui
node_admin -->|"manages codes"| node_departments
node_admin -->|"manages users"| node_authentication
node_workflow_service -->|"locks and updates"| node_patents
node_workflow_service -->|"checks access"| node_workflow_access
node_workflow_service -->|"checks transition"| node_state_machine
node_workflow_service -->|"records event"| node_workflow_events
node_patents -->|"references department"| node_departments
node_workflow_events -->|"references application"| node_patents
node_web -.->|"presents capability"| node_auth_ui
node_web -.->|"presents capability"| node_patent_ui
node_web -.->|"presents capability"| node_workflow_ui
node_web -.->|"presents capability"| node_dashboard_ui
node_web -.->|"presents capability"| node_document_ui
node_reviews -.->|"provides feedback"| node_workflow_ui
node_documents -.->|"attaches disclosures"| node_patents
node_patents -.->|"persists records"| node_database
node_workflow_events -.->|"persists history"| node_database

click node_web "https://github.com/haneefa96/patent-management-system/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/auth"
click node_patent_ui "https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/patents"
click node_workflow_ui "https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/workflow"
click node_dashboard_ui "https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/dashboard"
click node_document_ui "https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/documents"
click node_authentication "https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/authentication"
click node_departments "https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/departments"
click node_patents "https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/patents/models.py"
click node_workflow_service "https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/workflow/services.py"
click node_state_machine "https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/workflow/state_machine.py"
click node_workflow_access "https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/workflow/permissions.py"
click node_workflow_events "https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/workflow/models.py"
click node_documents "https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/documents"
click node_reviews "https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/reviews"
click node_audit "https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/audit"
click node_notifications "https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/notifications"
click node_database "https://github.com/haneefa96/patent-management-system/blob/main/backend/config/settings/base.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_web,node_auth_ui,node_patent_ui,node_workflow_ui,node_dashboard_ui,node_document_ui toneBlue
class node_authentication,node_departments toneAmber
class node_patents,node_workflow_service,node_state_machine,node_workflow_access,node_workflow_events toneMint
class node_documents,node_reviews,node_audit,node_notifications,node_database toneRose
class node_applicant,node_scrutinizer,node_consultant,node_admin toneIndigo
```

## Components

### Web application

- [Web portal](https://github.com/haneefa96/patent-management-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Sign-in and registration](https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/auth): `frontend/src/features/auth`
- [Patent submission and tracking](https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/patents): `frontend/src/features/patents`
- [Review actions and timeline](https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/workflow): `frontend/src/features/workflow`
- [Role dashboards](https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/dashboard): `frontend/src/features/dashboard`
- [Disclosure upload](https://github.com/haneefa96/patent-management-system/tree/main/frontend/src/features/documents): `frontend/src/features/documents`

### Identity and administration

- [Accounts and JWT auth](https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/authentication): `backend/apps/authentication`
- [Department records](https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/departments): `backend/apps/departments`

### Patent lifecycle

- [Patent applications](https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/patents/models.py): `backend/apps/patents/models.py`
- [Transition service](https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/workflow/services.py): `backend/apps/workflow/services.py`
- [Role-gated transitions](https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/workflow/state_machine.py): `backend/apps/workflow/state_machine.py`
- [Workflow permissions](https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/workflow/permissions.py): `backend/apps/workflow/permissions.py`
- [Transition history](https://github.com/haneefa96/patent-management-system/blob/main/backend/apps/workflow/models.py): `backend/apps/workflow/models.py`

### Supporting capabilities

- [Attachments and disclosures](https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/documents): `backend/apps/documents`
- [Review remarks and feedback](https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/reviews): `backend/apps/reviews`
- [Audit log](https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/audit): `backend/apps/audit`
- [In-app notifications](https://github.com/haneefa96/patent-management-system/tree/main/backend/apps/notifications): `backend/apps/notifications`
- [Configured database](https://github.com/haneefa96/patent-management-system/blob/main/backend/config/settings/base.py): `backend/config/settings/base.py`

### Other components

- **Applicant**
- **Scrutinizer**
- **Consultant**
- **IP Cell admin**

## Connections

- Applicant → Web portal: uses portal (evidence: `README.md`)
- Scrutinizer → Web portal: uses portal (evidence: `README.md`)
- Consultant → Web portal: uses portal (evidence: `README.md`)
- IP Cell admin → Web portal: uses portal (evidence: `README.md`)
- Applicant → Patent submission and tracking: submits applications (evidence: `README.md`)
- Applicant → Disclosure upload: uploads disclosures (evidence: `README.md`)
- Applicant → Patent submission and tracking: tracks status (evidence: `README.md`)
- Scrutinizer → Review actions and timeline: reviews applications (evidence: `README.md`)
- Consultant → Review actions and timeline: evaluates applications (evidence: `README.md`)
- IP Cell admin → Role dashboards: views metrics (evidence: `README.md`)
- IP Cell admin → Department records: manages codes (evidence: `README.md`)
- IP Cell admin → Accounts and JWT auth: manages users (evidence: `README.md`)
- Transition service → Patent applications: locks and updates (evidence: `backend/apps/workflow/services.py`)
- Transition service → Workflow permissions: checks access (evidence: `backend/apps/workflow/services.py`)
- Transition service → Role-gated transitions: checks transition (evidence: `backend/apps/workflow/services.py`)
- Transition service → Transition history: records event (evidence: `backend/apps/workflow/services.py`)
- Patent applications → Department records: references department (evidence: `backend/apps/patents/models.py`)
- Transition history → Patent applications: references application (evidence: `backend/apps/workflow/models.py`)
- Web portal → Sign-in and registration: presents capability
- Web portal → Patent submission and tracking: presents capability
- Web portal → Review actions and timeline: presents capability
- Web portal → Role dashboards: presents capability
- Web portal → Disclosure upload: presents capability
- Review remarks and feedback → Review actions and timeline: provides feedback
- Attachments and disclosures → Patent applications: attaches disclosures
- Patent applications → Configured database: persists records
- Transition history → Configured database: persists history
