# roeechaimo/checkmarx-app architecture

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

- Interactive diagram: https://gitdiagram.com/roeechaimo/checkmarx-app
- Repository: https://github.com/roeechaimo/checkmarx-app

## Overview

Checkmarx App is a frontend for visualizing backend microservices and their resource relationships. The principal workflow fetches microservice and resource data, parses it into graph nodes, derives relationship edges, and renders the graph with a legend. The graph component coordinates these steps; shared context tracks loading, while node configuration and specialized views control presentation. The README identifies a separately run backend, but does not document its API contract. Some core files, including the reducer and API paths, were indexed but not excerpted, so links to them reflect only the visible imports and use.

Main entry points: [`src/components/Graph/Graph.jsx`](https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/Graph/Graph.jsx) (Graph coordinator), [`src/App.jsx`](https://github.com/roeechaimo/checkmarx-app/blob/main/src/App.jsx) (App shell), [`src/node.config.js`](https://github.com/roeechaimo/checkmarx-app/blob/main/src/node.config.js) (Node configuration), [`src/main.jsx`](https://github.com/roeechaimo/checkmarx-app/blob/main/src/main.jsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["App shell<br/>[App.jsx]"]
  node_main["React entry<br/>[main.jsx]"]
end

subgraph group_data["Graph data flow"]
  node_graph["Graph coordinator<br/>[Graph.jsx]"]
  node_paths["API paths<br/>[paths.js]"]
  node_api["API client<br/>[useApi.jsx]"]
  node_parsers["Response parsers<br/>[parsers.js]"]
  node_reducer["Graph state reducer<br/>[reducer.js]"]
  node_nodeutils["Edge builder<br/>[nodeUtils.js]"]
end

subgraph group_presentation["Graph presentation"]
  node_config["Node configuration<br/>[node.config.js]"]
  node_microservice["Microservice node"]
  node_resource["Resource node<br/>[ResourceNode.jsx]"]
  node_legend["Graph legend<br/>[GraphLegend.jsx]"]
  node_image["Image renderer<br/>[Image.jsx]"]
end

subgraph group_support["Shared UI state"]
  node_context["Loading context<br/>[AppContext.jsx]"]
  node_loader["Loading indicator<br/>[Loader.jsx]"]
  node_error["Error fallback<br/>[ErrorFallback.jsx]"]
  node_asyncerror["Async error bridge<br/>[useAsyncError.jsx]"]
end

node_user(("Browser user"))
node_backend["Checkmarx backend"]

node_user -->|"opens app"| node_main
node_main -->|"renders"| node_app
node_main -->|"provides state"| node_context
node_app -->|"renders"| node_graph
node_app -->|"reads loading"| node_context
node_app -->|"shows while loading"| node_loader
node_app -->|"renders"| node_legend
node_app -->|"uses as fallback"| node_error
node_graph -->|"selects endpoints"| node_paths
node_graph -->|"fetches data"| node_api
node_api -->|"requests data"| node_backend
node_api -->|"sets loading"| node_context
node_graph -->|"parses responses"| node_parsers
node_graph -->|"dispatches updates"| node_reducer
node_graph -->|"builds edges"| node_nodeutils
node_graph -->|"uses node types"| node_config
node_config -->|"registers view"| node_microservice
node_config -->|"registers view"| node_resource
node_legend -->|"uses image maps"| node_config
node_legend -->|"renders icons"| node_image
node_resource -->|"renders icons"| node_image
node_graph -->|"forwards errors"| node_asyncerror

click node_app "https://github.com/roeechaimo/checkmarx-app/blob/main/src/App.jsx"
click node_graph "https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/Graph/Graph.jsx"
click node_paths "https://github.com/roeechaimo/checkmarx-app/blob/main/src/api/paths.js"
click node_api "https://github.com/roeechaimo/checkmarx-app/blob/main/src/hooks/useApi.jsx"
click node_parsers "https://github.com/roeechaimo/checkmarx-app/blob/main/src/utils/parsers.js"
click node_reducer "https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/Graph/reducer.js"
click node_nodeutils "https://github.com/roeechaimo/checkmarx-app/blob/main/src/utils/nodeUtils.js"
click node_config "https://github.com/roeechaimo/checkmarx-app/blob/main/src/node.config.js"
click node_microservice "https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/MicroserviceNode/MicroserviceNode.jsx"
click node_resource "https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/ResourceNode/ResourceNode.jsx"
click node_legend "https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/GraphLegend/GraphLegend.jsx"
click node_image "https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/Image/Image.jsx"
click node_context "https://github.com/roeechaimo/checkmarx-app/blob/main/src/contexts/AppContext.jsx"
click node_main "https://github.com/roeechaimo/checkmarx-app/blob/main/src/main.jsx"
click node_loader "https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/Loader/Loader.jsx"
click node_error "https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/ErrorFallback/ErrorFallback.jsx"
click node_asyncerror "https://github.com/roeechaimo/checkmarx-app/blob/main/src/hooks/useAsyncError.jsx"

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_main,node_user toneBlue
class node_graph,node_paths,node_api,node_parsers,node_reducer,node_nodeutils toneAmber
class node_config,node_microservice,node_resource,node_legend,node_image toneMint
class node_context,node_loader,node_error,node_asyncerror toneRose
class node_backend toneIndigo
```

## Components

### Application shell

- [App shell](https://github.com/roeechaimo/checkmarx-app/blob/main/src/App.jsx): `src/App.jsx`
- [React entry](https://github.com/roeechaimo/checkmarx-app/blob/main/src/main.jsx): `src/main.jsx`

### Graph data flow

- [Graph coordinator](https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/Graph/Graph.jsx): `src/components/Graph/Graph.jsx`
- [API paths](https://github.com/roeechaimo/checkmarx-app/blob/main/src/api/paths.js): `src/api/paths.js`
- [API client](https://github.com/roeechaimo/checkmarx-app/blob/main/src/hooks/useApi.jsx): `src/hooks/useApi.jsx`
- [Response parsers](https://github.com/roeechaimo/checkmarx-app/blob/main/src/utils/parsers.js): `src/utils/parsers.js`
- [Graph state reducer](https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/Graph/reducer.js): `src/components/Graph/reducer.js`
- [Edge builder](https://github.com/roeechaimo/checkmarx-app/blob/main/src/utils/nodeUtils.js): `src/utils/nodeUtils.js`

### Graph presentation

- [Node configuration](https://github.com/roeechaimo/checkmarx-app/blob/main/src/node.config.js): `src/node.config.js`
- [Microservice node](https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/MicroserviceNode/MicroserviceNode.jsx): `src/components/MicroserviceNode/MicroserviceNode.jsx`
- [Resource node](https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/ResourceNode/ResourceNode.jsx): `src/components/ResourceNode/ResourceNode.jsx`
- [Graph legend](https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/GraphLegend/GraphLegend.jsx): `src/components/GraphLegend/GraphLegend.jsx`
- [Image renderer](https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/Image/Image.jsx): `src/components/Image/Image.jsx`

### Shared UI state

- [Loading context](https://github.com/roeechaimo/checkmarx-app/blob/main/src/contexts/AppContext.jsx): `src/contexts/AppContext.jsx`
- [Loading indicator](https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/Loader/Loader.jsx): `src/components/Loader/Loader.jsx`
- [Error fallback](https://github.com/roeechaimo/checkmarx-app/blob/main/src/components/ErrorFallback/ErrorFallback.jsx): `src/components/ErrorFallback/ErrorFallback.jsx`
- [Async error bridge](https://github.com/roeechaimo/checkmarx-app/blob/main/src/hooks/useAsyncError.jsx): `src/hooks/useAsyncError.jsx`

### Other components

- **Browser user**
- **Checkmarx backend**

## Connections

- Browser user → React entry: opens app (evidence: `src/main.jsx`)
- React entry → App shell: renders (evidence: `src/main.jsx`)
- React entry → Loading context: provides state (evidence: `src/main.jsx`)
- App shell → Graph coordinator: renders (evidence: `src/App.jsx`)
- App shell → Loading context: reads loading (evidence: `src/App.jsx`)
- App shell → Loading indicator: shows while loading (evidence: `src/App.jsx`)
- App shell → Graph legend: renders (evidence: `src/App.jsx`)
- App shell → Error fallback: uses as fallback (evidence: `src/App.jsx`)
- Graph coordinator → API paths: selects endpoints (evidence: `src/components/Graph/Graph.jsx`)
- Graph coordinator → API client: fetches data (evidence: `src/components/Graph/Graph.jsx`)
- API client → Checkmarx backend: requests data (evidence: `src/hooks/useApi.jsx`)
- API client → Loading context: sets loading (evidence: `src/hooks/useApi.jsx`)
- Graph coordinator → Response parsers: parses responses (evidence: `src/components/Graph/Graph.jsx`)
- Graph coordinator → Graph state reducer: dispatches updates (evidence: `src/components/Graph/Graph.jsx`)
- Graph coordinator → Edge builder: builds edges (evidence: `src/components/Graph/Graph.jsx`)
- Graph coordinator → Node configuration: uses node types (evidence: `src/components/Graph/Graph.jsx`)
- Node configuration → Microservice node: registers view (evidence: `src/node.config.js`)
- Node configuration → Resource node: registers view (evidence: `src/node.config.js`)
- Graph legend → Node configuration: uses image maps (evidence: `src/components/GraphLegend/GraphLegend.jsx`)
- Graph legend → Image renderer: renders icons (evidence: `src/components/GraphLegend/GraphLegend.jsx`)
- Resource node → Image renderer: renders icons (evidence: `src/components/ResourceNode/ResourceNode.jsx`)
- Graph coordinator → Async error bridge: forwards errors (evidence: `src/components/Graph/Graph.jsx`)
