# anoor3/crosswalk architecture

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

- Interactive diagram: https://gitdiagram.com/anoor3/crosswalk
- Repository: https://github.com/anoor3/crosswalk

## Overview

Crosswalk’s intended product workflow is to discover an unfamiliar API, profile its sample data, map fields to a canonical model, validate and review proposals, generate and test an adapter, then monitor for drift and propose repairs. The implemented runtime evidence here covers canonical models, OpenAPI discovery, profiling, and mock claims APIs; mapping and later lifecycle stages are documented but not implemented in the sampled source, so those links reflect documentation rather than inspected calls.

Main entry points: [`packages/discovery/src/crosswalk_discovery/analyzer.py`](https://github.com/anoor3/crosswalk/blob/main/packages/discovery/src/crosswalk_discovery/analyzer.py) (OpenAPI Discovery), [`packages/profiler/src/crosswalk_profiler/engine.py`](https://github.com/anoor3/crosswalk/blob/main/packages/profiler/src/crosswalk_profiler/engine.py) (Value Profiling), [`packages/mapping`](https://github.com/anoor3/crosswalk/tree/main/packages/mapping) (Field Mapping), [`packages/discovery/src/crosswalk_discovery/catalog.py`](https://github.com/anoor3/crosswalk/blob/main/packages/discovery/src/crosswalk_discovery/catalog.py) (API Catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["API Inputs"]
  node_mock_apis["Mock Claims APIs"]
  node_seed_data["Seed Claims<br/>[seed_data.py]"]
end

subgraph group_analysis["Discovery and Profiling"]
  node_discovery["OpenAPI Discovery<br/>[analyzer.py]"]
  node_ref_resolver["Reference Resolution<br/>[refs.py]"]
  node_schema_flatten["Schema Flattening<br/>[flatten.py]"]
  node_catalog["API Catalog<br/>[catalog.py]"]
  node_profiler["Value Profiling<br/>[engine.py]"]
  node_value_extract["Value Extraction<br/>[extract.py]"]
  node_field_profile["Field Profiles<br/>[profile.py]"]
end

subgraph group_mapping["Mapping and Review"]
  node_canonical["Canonical Model"]
  node_mapping["Field Mapping"]
  node_validation["Candidate Validation"]
  node_human_review["Human Review"]
end

subgraph group_lifecycle["Adapter Lifecycle"]
  node_adapter_generation["Adapter Generation"]
  node_sandbox_test["Sandbox Testing"]
  node_runtime["Integration Runtime"]
  node_drift["Drift Detection"]
  node_repair["Repair Proposal"]
end

node_engineer(("Integration Engineer"))
node_customer_api["Customer API"]

node_seed_data -->|"supplies facts"| node_mock_apis
node_engineer -->|"provides API"| node_customer_api
node_customer_api -->|"provides OpenAPI"| node_discovery
node_discovery -->|"resolves refs"| node_ref_resolver
node_discovery -->|"flattens schemas"| node_schema_flatten
node_discovery -->|"produces catalog"| node_catalog
node_customer_api -->|"provides samples"| node_profiler
node_catalog -.->|"guides profiling"| node_profiler
node_profiler -->|"extracts values"| node_value_extract
node_profiler -->|"produces profiles"| node_field_profile
node_catalog -.->|"documents fields"| node_mapping
node_field_profile -.->|"supplies evidence"| node_mapping
node_canonical -.->|"defines targets"| node_mapping
node_mapping -.->|"proposes candidates"| node_validation
node_field_profile -.->|"checks against data"| node_validation
node_validation -.->|"presents findings"| node_human_review
node_engineer -.->|"confirms mapping"| node_human_review
node_human_review -.->|"approves mapping"| node_adapter_generation
node_adapter_generation -.->|"generates tests"| node_sandbox_test
node_sandbox_test -.->|"clears for deployment"| node_runtime
node_runtime -.->|"observes API"| node_drift
node_drift -.->|"proposes repair"| node_repair
node_repair -.->|"requests approval"| node_human_review
node_mock_apis -.->|"simulates API"| node_customer_api

click node_mock_apis "https://github.com/anoor3/crosswalk/tree/main/apps/mock_apis/src/crosswalk_mock_apis"
click node_seed_data "https://github.com/anoor3/crosswalk/blob/main/apps/mock_apis/src/crosswalk_mock_apis/seed_data.py"
click node_discovery "https://github.com/anoor3/crosswalk/blob/main/packages/discovery/src/crosswalk_discovery/analyzer.py"
click node_ref_resolver "https://github.com/anoor3/crosswalk/blob/main/packages/discovery/src/crosswalk_discovery/refs.py"
click node_schema_flatten "https://github.com/anoor3/crosswalk/blob/main/packages/discovery/src/crosswalk_discovery/flatten.py"
click node_catalog "https://github.com/anoor3/crosswalk/blob/main/packages/discovery/src/crosswalk_discovery/catalog.py"
click node_profiler "https://github.com/anoor3/crosswalk/blob/main/packages/profiler/src/crosswalk_profiler/engine.py"
click node_value_extract "https://github.com/anoor3/crosswalk/blob/main/packages/profiler/src/crosswalk_profiler/extract.py"
click node_field_profile "https://github.com/anoor3/crosswalk/blob/main/packages/profiler/src/crosswalk_profiler/profile.py"
click node_canonical "https://github.com/anoor3/crosswalk/tree/main/packages/canonical/src/crosswalk_canonical"
click node_mapping "https://github.com/anoor3/crosswalk/tree/main/packages/mapping"
click node_validation "https://github.com/anoor3/crosswalk/tree/main/packages/mapping"
click node_human_review "https://github.com/anoor3/crosswalk/tree/main/packages/mapping"
click node_adapter_generation "https://github.com/anoor3/crosswalk/tree/main/packages/adapters"
click node_sandbox_test "https://github.com/anoor3/crosswalk/tree/main/packages/runtime"
click node_runtime "https://github.com/anoor3/crosswalk/tree/main/packages/runtime"
click node_drift "https://github.com/anoor3/crosswalk/tree/main/packages/drift"
click node_repair "https://github.com/anoor3/crosswalk/tree/main/packages/drift"

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_mock_apis,node_seed_data toneBlue
class node_discovery,node_ref_resolver,node_schema_flatten,node_catalog,node_profiler,node_value_extract,node_field_profile toneAmber
class node_canonical,node_mapping,node_validation,node_human_review,node_customer_api toneMint
class node_adapter_generation,node_sandbox_test,node_runtime,node_drift,node_repair toneRose
class node_engineer toneIndigo
```

## Components

### API Inputs

- [Mock Claims APIs](https://github.com/anoor3/crosswalk/tree/main/apps/mock_apis/src/crosswalk_mock_apis): `apps/mock_apis/src/crosswalk_mock_apis`
- [Seed Claims](https://github.com/anoor3/crosswalk/blob/main/apps/mock_apis/src/crosswalk_mock_apis/seed_data.py): `apps/mock_apis/src/crosswalk_mock_apis/seed_data.py`

### Discovery and Profiling

- [OpenAPI Discovery](https://github.com/anoor3/crosswalk/blob/main/packages/discovery/src/crosswalk_discovery/analyzer.py): `packages/discovery/src/crosswalk_discovery/analyzer.py`
- [Reference Resolution](https://github.com/anoor3/crosswalk/blob/main/packages/discovery/src/crosswalk_discovery/refs.py): `packages/discovery/src/crosswalk_discovery/refs.py`
- [Schema Flattening](https://github.com/anoor3/crosswalk/blob/main/packages/discovery/src/crosswalk_discovery/flatten.py): `packages/discovery/src/crosswalk_discovery/flatten.py`
- [API Catalog](https://github.com/anoor3/crosswalk/blob/main/packages/discovery/src/crosswalk_discovery/catalog.py): `packages/discovery/src/crosswalk_discovery/catalog.py`
- [Value Profiling](https://github.com/anoor3/crosswalk/blob/main/packages/profiler/src/crosswalk_profiler/engine.py): `packages/profiler/src/crosswalk_profiler/engine.py`
- [Value Extraction](https://github.com/anoor3/crosswalk/blob/main/packages/profiler/src/crosswalk_profiler/extract.py): `packages/profiler/src/crosswalk_profiler/extract.py`
- [Field Profiles](https://github.com/anoor3/crosswalk/blob/main/packages/profiler/src/crosswalk_profiler/profile.py): `packages/profiler/src/crosswalk_profiler/profile.py`

### Mapping and Review

- [Canonical Model](https://github.com/anoor3/crosswalk/tree/main/packages/canonical/src/crosswalk_canonical): `packages/canonical/src/crosswalk_canonical`
- [Field Mapping](https://github.com/anoor3/crosswalk/tree/main/packages/mapping): `packages/mapping`
- [Candidate Validation](https://github.com/anoor3/crosswalk/tree/main/packages/mapping): `packages/mapping`
- [Human Review](https://github.com/anoor3/crosswalk/tree/main/packages/mapping): `packages/mapping`

### Adapter Lifecycle

- [Adapter Generation](https://github.com/anoor3/crosswalk/tree/main/packages/adapters): `packages/adapters`
- [Sandbox Testing](https://github.com/anoor3/crosswalk/tree/main/packages/runtime): `packages/runtime`
- [Integration Runtime](https://github.com/anoor3/crosswalk/tree/main/packages/runtime): `packages/runtime`
- [Drift Detection](https://github.com/anoor3/crosswalk/tree/main/packages/drift): `packages/drift`
- [Repair Proposal](https://github.com/anoor3/crosswalk/tree/main/packages/drift): `packages/drift`

### Other components

- **Integration Engineer**
- **Customer API**

## Connections

- Seed Claims → Mock Claims APIs: supplies facts
- Integration Engineer → Customer API: provides API
- Customer API → OpenAPI Discovery: provides OpenAPI
- OpenAPI Discovery → Reference Resolution: resolves refs
- OpenAPI Discovery → Schema Flattening: flattens schemas
- OpenAPI Discovery → API Catalog: produces catalog
- Customer API → Value Profiling: provides samples
- API Catalog → Value Profiling: guides profiling
- Value Profiling → Value Extraction: extracts values
- Value Profiling → Field Profiles: produces profiles
- API Catalog → Field Mapping: documents fields
- Field Profiles → Field Mapping: supplies evidence
- Canonical Model → Field Mapping: defines targets
- Field Mapping → Candidate Validation: proposes candidates
- Field Profiles → Candidate Validation: checks against data
- Candidate Validation → Human Review: presents findings
- Integration Engineer → Human Review: confirms mapping
- Human Review → Adapter Generation: approves mapping
- Adapter Generation → Sandbox Testing: generates tests
- Sandbox Testing → Integration Runtime: clears for deployment
- Integration Runtime → Drift Detection: observes API
- Drift Detection → Repair Proposal: proposes repair
- Repair Proposal → Human Review: requests approval
- Mock Claims APIs → Customer API: simulates API
