# owasp/opencre architecture

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

- Interactive diagram: https://gitdiagram.com/owasp/opencre
- Repository: https://github.com/owasp/opencre

## Overview

OpenCRE is a security-requirements catalog and mapping platform: users browse and search CREs, standards, and their links, while contributors can import mappings and analyze gaps. The repository also includes repository-harvesting and knowledge-curation stages, plus a REST-backed MCP interface. The graph emphasizes those product capabilities and the documented web/API entry points. Some links are supported only by README statements or partial excerpts; uncertain wiring is omitted rather than inferred.

Main entry points: [`application/frontend/src/routes.tsx`](https://github.com/owasp/opencre/blob/main/application/frontend/src/routes.tsx) (Page routing), [`application/database/db.py`](https://github.com/owasp/opencre/blob/main/application/database/db.py) (Catalog database), [`application/utils/import_pipeline.py`](https://github.com/owasp/opencre/blob/main/application/utils/import_pipeline.py) (Mapping import pipeline), [`application/utils/oie_orchestrator/pipeline.py`](https://github.com/owasp/opencre/blob/main/application/utils/oie_orchestrator/pipeline.py) (Curation orchestrator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_frontend["Web application<br/>[App.tsx]"]
  node_routes["Page routing<br/>[routes.tsx]"]
  node_browse["Browse and search<br/>[Search.tsx]"]
  node_explore["CRE explorer<br/>[explorer.tsx]"]
  node_gapui["Gap analysis UI<br/>[GapAnalysis.tsx]"]
  node_myopencre["MyOpenCRE UI<br/>[MyOpenCRE.tsx]"]
end

subgraph group_catalog["Catalog and imports"]
  node_catalogdata["CRE and standards<br/>[cre_defs.py]"]
  node_database[("Catalog database<br/>[db.py]")]
  node_importer["Mapping import pipeline<br/>[import_pipeline.py]"]
  node_parsers["Source parsers"]
end

subgraph group_analysis["Analysis and AI"]
  node_gapengine["Gap analysis<br/>[gap_analysis.py]"]
  node_prompt["Embeddings and prompts<br/>[prompt_client.py]"]
end

subgraph group_curation["Knowledge curation"]
  node_orchestrator["Curation orchestrator<br/>[pipeline.py]"]
  node_harvester["Repository harvester<br/>[pipeline.py]"]
  node_noise["Noise filter<br/>[pipeline.py]"]
  node_librarian["Knowledge librarian<br/>[pipeline.py]"]
end

subgraph group_interfaces["Service interfaces"]
  node_webapi["REST API<br/>[web_main.py]"]
  node_mcp["MCP server<br/>[server.py]"]
  node_mcpclient["REST client<br/>[rest_client.py]"]
end

node_user(("OpenCRE user"))
node_contributor(("Mapping contributor"))

node_user -->|"uses"| node_frontend
node_frontend -->|"renders routes"| node_routes
node_routes -->|"routes to"| node_browse
node_routes -->|"routes to"| node_explore
node_routes -->|"routes to"| node_gapui
node_routes -->|"routes to"| node_myopencre
node_contributor -->|"uploads mappings"| node_webapi
node_webapi -->|"reads and writes"| node_database
node_importer -->|"registers records"| node_database
node_importer -->|"uses parse results"| node_parsers
node_importer -->|"triggers analysis"| node_gapengine
node_importer -->|"generates embeddings"| node_prompt
node_database -->|"stores catalog"| node_catalogdata
node_orchestrator -->|"invokes stage"| node_harvester
node_orchestrator -->|"invokes stage"| node_noise
node_harvester -->|"stages harvest rows"| node_database
node_noise -->|"reads and queues"| node_database
node_orchestrator -.->|"may invoke stage"| node_librarian
node_mcp -->|"uses REST client"| node_mcpclient
node_mcpclient -.->|"calls REST API"| node_webapi

click node_frontend "https://github.com/owasp/opencre/blob/main/application/frontend/src/App.tsx"
click node_routes "https://github.com/owasp/opencre/blob/main/application/frontend/src/routes.tsx"
click node_browse "https://github.com/owasp/opencre/blob/main/application/frontend/src/pages/Search/Search.tsx"
click node_explore "https://github.com/owasp/opencre/blob/main/application/frontend/src/pages/Explorer/explorer.tsx"
click node_gapui "https://github.com/owasp/opencre/blob/main/application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx"
click node_myopencre "https://github.com/owasp/opencre/blob/main/application/frontend/src/pages/MyOpenCRE/MyOpenCRE.tsx"
click node_webapi "https://github.com/owasp/opencre/blob/main/application/web/web_main.py"
click node_catalogdata "https://github.com/owasp/opencre/blob/main/application/defs/cre_defs.py"
click node_database "https://github.com/owasp/opencre/blob/main/application/database/db.py"
click node_importer "https://github.com/owasp/opencre/blob/main/application/utils/import_pipeline.py"
click node_parsers "https://github.com/owasp/opencre/tree/main/application/utils/external_project_parsers/parsers"
click node_gapengine "https://github.com/owasp/opencre/blob/main/application/utils/gap_analysis.py"
click node_prompt "https://github.com/owasp/opencre/blob/main/application/prompt_client/prompt_client.py"
click node_orchestrator "https://github.com/owasp/opencre/blob/main/application/utils/oie_orchestrator/pipeline.py"
click node_harvester "https://github.com/owasp/opencre/blob/main/application/utils/harvester/pipeline.py"
click node_noise "https://github.com/owasp/opencre/blob/main/application/utils/noise_filter/pipeline.py"
click node_librarian "https://github.com/owasp/opencre/blob/main/application/utils/librarian/pipeline.py"
click node_mcp "https://github.com/owasp/opencre/blob/main/application/mcp/server.py"
click node_mcpclient "https://github.com/owasp/opencre/blob/main/application/mcp/rest_client.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_frontend,node_routes,node_browse,node_explore,node_gapui,node_myopencre,node_user toneBlue
class node_catalogdata,node_database,node_importer,node_parsers toneAmber
class node_gapengine,node_prompt toneMint
class node_orchestrator,node_harvester,node_noise,node_librarian toneRose
class node_webapi,node_mcp,node_mcpclient,node_contributor toneIndigo
```

## Components

### Web experience

- [Web application](https://github.com/owasp/opencre/blob/main/application/frontend/src/App.tsx): `application/frontend/src/App.tsx`
- [Page routing](https://github.com/owasp/opencre/blob/main/application/frontend/src/routes.tsx): `application/frontend/src/routes.tsx`
- [Browse and search](https://github.com/owasp/opencre/blob/main/application/frontend/src/pages/Search/Search.tsx): `application/frontend/src/pages/Search/Search.tsx`
- [CRE explorer](https://github.com/owasp/opencre/blob/main/application/frontend/src/pages/Explorer/explorer.tsx): `application/frontend/src/pages/Explorer/explorer.tsx`
- [Gap analysis UI](https://github.com/owasp/opencre/blob/main/application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx): `application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx`
- [MyOpenCRE UI](https://github.com/owasp/opencre/blob/main/application/frontend/src/pages/MyOpenCRE/MyOpenCRE.tsx): `application/frontend/src/pages/MyOpenCRE/MyOpenCRE.tsx`

### Catalog and imports

- [CRE and standards](https://github.com/owasp/opencre/blob/main/application/defs/cre_defs.py): `application/defs/cre_defs.py`
- [Catalog database](https://github.com/owasp/opencre/blob/main/application/database/db.py): `application/database/db.py`
- [Mapping import pipeline](https://github.com/owasp/opencre/blob/main/application/utils/import_pipeline.py): `application/utils/import_pipeline.py`
- [Source parsers](https://github.com/owasp/opencre/tree/main/application/utils/external_project_parsers/parsers): `application/utils/external_project_parsers/parsers`

### Analysis and AI

- [Gap analysis](https://github.com/owasp/opencre/blob/main/application/utils/gap_analysis.py): `application/utils/gap_analysis.py`
- [Embeddings and prompts](https://github.com/owasp/opencre/blob/main/application/prompt_client/prompt_client.py): `application/prompt_client/prompt_client.py`

### Knowledge curation

- [Curation orchestrator](https://github.com/owasp/opencre/blob/main/application/utils/oie_orchestrator/pipeline.py): `application/utils/oie_orchestrator/pipeline.py`
- [Repository harvester](https://github.com/owasp/opencre/blob/main/application/utils/harvester/pipeline.py): `application/utils/harvester/pipeline.py`
- [Noise filter](https://github.com/owasp/opencre/blob/main/application/utils/noise_filter/pipeline.py): `application/utils/noise_filter/pipeline.py`
- [Knowledge librarian](https://github.com/owasp/opencre/blob/main/application/utils/librarian/pipeline.py): `application/utils/librarian/pipeline.py`

### Service interfaces

- [REST API](https://github.com/owasp/opencre/blob/main/application/web/web_main.py): `application/web/web_main.py`
- [MCP server](https://github.com/owasp/opencre/blob/main/application/mcp/server.py): `application/mcp/server.py`
- [REST client](https://github.com/owasp/opencre/blob/main/application/mcp/rest_client.py): `application/mcp/rest_client.py`

### Other components

- **OpenCRE user**
- **Mapping contributor**

## Connections

- OpenCRE user → Web application: uses (evidence: `README.md`)
- Web application → Page routing: renders routes (evidence: `application/frontend/src/App.tsx`)
- Page routing → Browse and search: routes to (evidence: `application/frontend/src/routes.tsx`)
- Page routing → CRE explorer: routes to (evidence: `application/frontend/src/routes.tsx`)
- Page routing → Gap analysis UI: routes to (evidence: `application/frontend/src/routes.tsx`)
- Page routing → MyOpenCRE UI: routes to (evidence: `application/frontend/src/routes.tsx`)
- Mapping contributor → REST API: uploads mappings (evidence: `README.md`)
- REST API → Catalog database: reads and writes (evidence: `application/web/web_main.py`)
- Mapping import pipeline → Catalog database: registers records (evidence: `application/utils/import_pipeline.py`)
- Mapping import pipeline → Source parsers: uses parse results (evidence: `application/utils/import_pipeline.py`)
- Mapping import pipeline → Gap analysis: triggers analysis (evidence: `application/utils/import_pipeline.py`)
- Mapping import pipeline → Embeddings and prompts: generates embeddings (evidence: `application/utils/import_pipeline.py`)
- Catalog database → CRE and standards: stores catalog (evidence: `application/database/db.py`)
- Curation orchestrator → Repository harvester: invokes stage (evidence: `application/utils/oie_orchestrator/pipeline.py`)
- Curation orchestrator → Noise filter: invokes stage (evidence: `application/utils/oie_orchestrator/pipeline.py`)
- Repository harvester → Catalog database: stages harvest rows (evidence: `application/utils/harvester/pipeline.py`)
- Noise filter → Catalog database: reads and queues (evidence: `application/utils/noise_filter/pipeline.py`)
- Curation orchestrator → Knowledge librarian: may invoke stage
- MCP server → REST client: uses REST client (evidence: `application/mcp/server.py`)
- REST client → REST API: calls REST API
