# CrossStackMapper

**Kind:** Class

**Source:** [`atloria-monorepo/packages/doc-automation/src/v2/stages/stage-03-features/cross-stack-mapper.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/doc-automation/src/v2/stages/stage-03-features/cross-stack-mapper.ts#L89)

Cross-Stack Mapper

Maps frontend to backend features to understand full-stack data flow.

**Implements:** `ICrossStackMapper`

## Methods

| Method | Signature | Returns |
|---|---|---|
| `mapCrossStackFeatures` | `mapCrossStackFeatures(chunks: Chunk[], features: UserFeature[])` | `CrossStackMappingResult` |

## Where it refuses work

- `CrossStackMapper` stops the work with an early return when `normalizedApiPath === normalizedEndpoint`.
- `CrossStackMapper` stops the work with an early return when `this.pathsMatchWithParams(normalizedApiPath, normalizedEndpoint)`.
- `CrossStackMapper` stops the work with an early return when `normalizedApiPath.endsWith(normalizedEndpoint)`.
- `CrossStackMapper` stops the work with an early return when `apiParts.length !== endpointParts.length`.
- `CrossStackMapper` stops the work with an early return when `apiPart !== endpointPart`.
- `CrossStackMapper` stops the work with an early return when `seen.has(a.name)`.
