# vickyverrma/opencre architecture

> Architecture diagram of the GitHub repository vickyverrma/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/vickyverrma/opencre
- Repository: https://github.com/vickyverrma/opencre

## Overview

OpenCRE is a security-requirements catalog and linking platform: users browse or search CREs and standards, inspect their mappings, and use analysis or import capabilities to extend and compare the catalog. The main runtime spans a React client, Flask API, catalog storage, and import/analysis services; separate MCP and OIE workflows extend access and content processing. Several links below are documented in the README; source excerpts are partial, so unsampled implementation details and integrations are not inferred.

Main entry points: [`application/frontend/src/routes.tsx`](https://github.com/vickyverrma/opencre/blob/main/application/frontend/src/routes.tsx) (Page routing), [`application/database/db.py`](https://github.com/vickyverrma/opencre/blob/main/application/database/db.py) (Catalog database), [`application/utils/import_pipeline.py`](https://github.com/vickyverrma/opencre/blob/main/application/utils/import_pipeline.py) (Catalog import), [`application/web/web_main.py`](https://github.com/vickyverrma/opencre/blob/main/application/web/web_main.py) (Flask web API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_frontend["Web application<br/>[App.tsx]"]
  node_routes["Page routing<br/>[routes.tsx]"]
  node_explorer["Catalog explorer<br/>[explorer.tsx]"]
  node_search["Catalog search<br/>[Search.tsx]"]
  node_gap_ui["Gap analysis view<br/>[GapAnalysis.tsx]"]
  node_myopencre["MyOpenCRE view<br/>[MyOpenCRE.tsx]"]
end

subgraph group_api["Application API"]
  node_web["Flask web API<br/>[web_main.py]"]
  node_api_schema["OpenAPI registry"]
  node_cli["CLI entry point<br/>[cre_main.py]"]
end

subgraph group_catalog["Catalog data"]
  node_catalog_db[("Catalog database<br/>[db.py]")]
  node_domain_models["CRE domain model<br/>[cre_defs.py]"]
end

subgraph group_processing["Data processing"]
  node_import_pipeline["Catalog import<br/>[import_pipeline.py]"]
  node_source_parsers["Standards parsers"]
  node_gap_engine["Gap analysis<br/>[gap_analysis.py]"]
  node_prompt_client["Embedding and prompts<br/>[prompt_client.py]"]
  node_oie["OIE orchestration<br/>[pipeline.py]"]
  node_harvester["Repository harvesting<br/>[pipeline.py]"]
  node_noise_filter["Change filtering<br/>[pipeline.py]"]
  node_librarian["Knowledge librarian<br/>[pipeline.py]"]
end

subgraph group_integrations["External interfaces"]
  node_mcp["MCP server<br/>[server.py]"]
  node_rest_client["REST client<br/>[rest_client.py]"]
end

node_user(("OpenCRE user"))
node_public_api["OpenCRE REST API"]

node_user -->|"uses"| node_frontend
node_frontend -->|"renders routes"| node_routes
node_routes -->|"routes to"| node_explorer
node_routes -->|"routes to"| node_search
node_routes -->|"routes to"| node_gap_ui
node_routes -->|"routes to"| node_myopencre
node_frontend -.->|"uses API"| node_web
node_web -->|"reads and writes"| node_catalog_db
node_web -->|"initializes"| node_api_schema
node_cli -->|"connects to"| node_catalog_db
node_import_pipeline -->|"imports parsed data"| node_source_parsers
node_import_pipeline -->|"registers records"| node_catalog_db
node_import_pipeline -->|"registers records"| node_cli
node_import_pipeline -->|"triggers analysis"| node_gap_engine
node_catalog_db -->|"stores"| node_domain_models
node_gap_ui -.->|"requests analysis"| node_gap_engine
node_oie -->|"runs stage"| node_harvester
node_oie -->|"runs stage"| node_noise_filter
node_oie -->|"runs stage"| node_librarian
node_mcp -->|"uses"| node_rest_client
node_rest_client -->|"reads via REST"| node_public_api
node_public_api -.->|"served by"| node_web
node_prompt_client -->|"reads catalog"| node_catalog_db

click node_frontend "https://github.com/vickyverrma/opencre/blob/main/application/frontend/src/App.tsx"
click node_routes "https://github.com/vickyverrma/opencre/blob/main/application/frontend/src/routes.tsx"
click node_explorer "https://github.com/vickyverrma/opencre/blob/main/application/frontend/src/pages/Explorer/explorer.tsx"
click node_search "https://github.com/vickyverrma/opencre/blob/main/application/frontend/src/pages/Search/Search.tsx"
click node_gap_ui "https://github.com/vickyverrma/opencre/blob/main/application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx"
click node_myopencre "https://github.com/vickyverrma/opencre/blob/main/application/frontend/src/pages/MyOpenCRE/MyOpenCRE.tsx"
click node_web "https://github.com/vickyverrma/opencre/blob/main/application/web/web_main.py"
click node_api_schema "https://github.com/vickyverrma/opencre/blob/main/application/web/openapi_registry.py"
click node_cli "https://github.com/vickyverrma/opencre/blob/main/application/cmd/cre_main.py"
click node_catalog_db "https://github.com/vickyverrma/opencre/blob/main/application/database/db.py"
click node_domain_models "https://github.com/vickyverrma/opencre/blob/main/application/defs/cre_defs.py"
click node_import_pipeline "https://github.com/vickyverrma/opencre/blob/main/application/utils/import_pipeline.py"
click node_source_parsers "https://github.com/vickyverrma/opencre/tree/main/application/utils/external_project_parsers"
click node_gap_engine "https://github.com/vickyverrma/opencre/blob/main/application/utils/gap_analysis.py"
click node_prompt_client "https://github.com/vickyverrma/opencre/blob/main/application/prompt_client/prompt_client.py"
click node_oie "https://github.com/vickyverrma/opencre/blob/main/application/utils/oie_orchestrator/pipeline.py"
click node_harvester "https://github.com/vickyverrma/opencre/blob/main/application/utils/harvester/pipeline.py"
click node_noise_filter "https://github.com/vickyverrma/opencre/blob/main/application/utils/noise_filter/pipeline.py"
click node_librarian "https://github.com/vickyverrma/opencre/blob/main/application/utils/librarian/pipeline.py"
click node_mcp "https://github.com/vickyverrma/opencre/blob/main/application/mcp/server.py"
click node_rest_client "https://github.com/vickyverrma/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_explorer,node_search,node_gap_ui,node_myopencre,node_user toneBlue
class node_web,node_api_schema,node_cli toneAmber
class node_catalog_db,node_domain_models,node_public_api toneMint
class node_import_pipeline,node_source_parsers,node_gap_engine,node_prompt_client,node_oie,node_harvester,node_noise_filter,node_librarian toneRose
class node_mcp,node_rest_client toneIndigo
```

## Components

### Web client

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

### Application API

- [Flask web API](https://github.com/vickyverrma/opencre/blob/main/application/web/web_main.py): `application/web/web_main.py`
- [OpenAPI registry](https://github.com/vickyverrma/opencre/blob/main/application/web/openapi_registry.py): `application/web/openapi_registry.py`
- [CLI entry point](https://github.com/vickyverrma/opencre/blob/main/application/cmd/cre_main.py): `application/cmd/cre_main.py`

### Catalog data

- [Catalog database](https://github.com/vickyverrma/opencre/blob/main/application/database/db.py): `application/database/db.py`
- [CRE domain model](https://github.com/vickyverrma/opencre/blob/main/application/defs/cre_defs.py): `application/defs/cre_defs.py`

### Data processing

- [Catalog import](https://github.com/vickyverrma/opencre/blob/main/application/utils/import_pipeline.py): `application/utils/import_pipeline.py`
- [Standards parsers](https://github.com/vickyverrma/opencre/tree/main/application/utils/external_project_parsers): `application/utils/external_project_parsers`
- [Gap analysis](https://github.com/vickyverrma/opencre/blob/main/application/utils/gap_analysis.py): `application/utils/gap_analysis.py`
- [Embedding and prompts](https://github.com/vickyverrma/opencre/blob/main/application/prompt_client/prompt_client.py): `application/prompt_client/prompt_client.py`
- [OIE orchestration](https://github.com/vickyverrma/opencre/blob/main/application/utils/oie_orchestrator/pipeline.py): `application/utils/oie_orchestrator/pipeline.py`
- [Repository harvesting](https://github.com/vickyverrma/opencre/blob/main/application/utils/harvester/pipeline.py): `application/utils/harvester/pipeline.py`
- [Change filtering](https://github.com/vickyverrma/opencre/blob/main/application/utils/noise_filter/pipeline.py): `application/utils/noise_filter/pipeline.py`
- [Knowledge librarian](https://github.com/vickyverrma/opencre/blob/main/application/utils/librarian/pipeline.py): `application/utils/librarian/pipeline.py`

### External interfaces

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

### Other components

- **OpenCRE user**
- **OpenCRE REST API**

## Connections

- OpenCRE user → Web application: uses (evidence: `README.md`)
- Web application → Page routing: renders routes (evidence: `application/frontend/src/App.tsx`)
- Page routing → Catalog explorer: routes to (evidence: `application/frontend/src/routes.tsx`)
- Page routing → Catalog search: routes to (evidence: `application/frontend/src/routes.tsx`)
- Page routing → Gap analysis view: routes to (evidence: `application/frontend/src/routes.tsx`)
- Page routing → MyOpenCRE view: routes to (evidence: `application/frontend/src/routes.tsx`)
- Web application → Flask web API: uses API
- Flask web API → Catalog database: reads and writes (evidence: `application/web/web_main.py`)
- Flask web API → OpenAPI registry: initializes (evidence: `application/__init__.py`)
- CLI entry point → Catalog database: connects to (evidence: `application/cmd/cre_main.py`)
- Catalog import → Standards parsers: imports parsed data (evidence: `application/utils/import_pipeline.py`)
- Catalog import → Catalog database: registers records (evidence: `application/utils/import_pipeline.py`)
- Catalog import → CLI entry point: registers records (evidence: `application/utils/import_pipeline.py`)
- Catalog import → Gap analysis: triggers analysis (evidence: `application/utils/import_pipeline.py`)
- Catalog database → CRE domain model: stores (evidence: `application/database/db.py`)
- Gap analysis view → Gap analysis: requests analysis
- OIE orchestration → Repository harvesting: runs stage (evidence: `application/utils/oie_orchestrator/pipeline.py`)
- OIE orchestration → Change filtering: runs stage (evidence: `application/utils/oie_orchestrator/pipeline.py`)
- OIE orchestration → Knowledge librarian: runs stage (evidence: `application/utils/oie_orchestrator/pipeline.py`)
- MCP server → REST client: uses (evidence: `application/mcp/server.py`)
- REST client → OpenCRE REST API: reads via REST (evidence: `README.md`)
- OpenCRE REST API → Flask web API: served by
- Embedding and prompts → Catalog database: reads catalog (evidence: `application/prompt_client/prompt_client.py`)
