# stratonflorentin-dot/my-view architecture

> Architecture diagram of the GitHub repository stratonflorentin-dot/my-view, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/stratonflorentin-dot/my-view
- Repository: https://github.com/stratonflorentin-dot/my-view

## Overview

MyView Maps is a private, multi-tenant 3D mapping platform. Its primary workflow is project setup and scan-link creation, contributor-guided photo/video capture, server-side GPS and fence validation, asynchronous capture processing, owner review, and publication to maps and APIs. The graph also includes developer access, forms, map viewing, and webhooks. Relationships use README workflow statements or source-index references and shown excerpts; several documented capabilities have directory-level paths because their route implementations were not sampled.

Main entry points: [`src/app/api/captures/route.ts`](https://github.com/stratonflorentin-dot/my-view/blob/main/src/app/api/captures/route.ts) (Capture intake), [`src/lib/pipeline/pipeline.ts`](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/pipeline/pipeline.ts) (Capture pipeline), [`src/lib/pipeline/worker.ts`](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/pipeline/worker.ts) (Job worker), [`src/components/dashboard/ProjectWorkspace.tsx`](https://github.com/stratonflorentin-dot/my-view/blob/main/src/components/dashboard/ProjectWorkspace.tsx) (Project workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_projects["Projects and access"]
  node_workspace["Project workspace"]
  node_links["Scan links<br/>[route.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_tenancy["Project access<br/>[tenancy.ts]"]
end

subgraph group_capture["Contribution and capture"]
  node_contribute["Guided capture<br/>[ContributeFlow.tsx]"]
  node_capture_api["Capture intake<br/>[route.ts]"]
  node_gps_fence["GPS and fence checks<br/>[fence.ts]"]
  node_storage["Media storage<br/>[index.ts]"]
end

subgraph group_processing["Processing and review"]
  node_worker["Job worker<br/>[worker.ts]"]
  node_pipeline["Capture pipeline<br/>[pipeline.ts]"]
  node_engines["Reconstruction engines<br/>[engines.ts]"]
  node_review["Submission review<br/>[route.ts]"]
  node_forms["Custom forms<br/>[forms.ts]"]
end

subgraph group_maps["Maps and developer API"]
  node_map_view["Map viewer<br/>[MapView.tsx]"]
  node_map_api["Map API"]
  node_keys["API keys<br/>[apiKeys.ts]"]
  node_sdk["JavaScript SDK<br/>[mymap.js]"]
end

subgraph group_integrations["Platform integrations"]
  node_database[("Platform data<br/>[schema.ts]")]
  node_webhooks["Webhook delivery<br/>[webhooks.ts]"]
end

node_owner(("Project owner"))
node_contributor(("Contributor"))

node_owner -->|"manages projects"| node_workspace
node_workspace -->|"creates scan links"| node_links
node_contributor -->|"opens scan link"| node_contribute
node_contribute -->|"submits media"| node_capture_api
node_capture_api -->|"validates location"| node_gps_fence
node_capture_api -->|"stores media"| node_storage
node_capture_api -->|"enqueues processing"| node_pipeline
node_capture_api -->|"starts worker"| node_worker
node_worker -->|"runs handlers"| node_pipeline
node_pipeline -->|"reconstructs buildings"| node_engines
node_pipeline -->|"reads media"| node_storage
node_owner -->|"reviews submissions"| node_review
node_review -->|"queues publication"| node_worker
node_review -->|"dispatches events"| node_webhooks
node_pipeline -->|"dispatches events"| node_webhooks
node_worker -->|"signs deliveries"| node_webhooks
node_workspace -.->|"configures forms"| node_forms
node_owner -->|"views published maps"| node_map_view
node_map_api -.->|"protects access"| node_keys
node_sdk -->|"requests map data"| node_map_api
node_auth -->|"resolves project roles"| node_tenancy

click node_workspace "https://github.com/stratonflorentin-dot/my-view/blob/main/src/components/dashboard/ProjectWorkspace.tsx"
click node_links "https://github.com/stratonflorentin-dot/my-view/blob/main/src/app/api/links/route.ts"
click node_auth "https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/auth.ts"
click node_tenancy "https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/tenancy.ts"
click node_contribute "https://github.com/stratonflorentin-dot/my-view/blob/main/src/components/ContributeFlow.tsx"
click node_capture_api "https://github.com/stratonflorentin-dot/my-view/blob/main/src/app/api/captures/route.ts"
click node_gps_fence "https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/fence.ts"
click node_storage "https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/storage/index.ts"
click node_worker "https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/pipeline/worker.ts"
click node_pipeline "https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/pipeline/pipeline.ts"
click node_engines "https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/pipeline/engines.ts"
click node_review "https://github.com/stratonflorentin-dot/my-view/blob/main/src/app/api/submissions/%5Bid%5D/route.ts"
click node_forms "https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/forms.ts"
click node_database "https://github.com/stratonflorentin-dot/my-view/blob/main/src/db/schema.ts"
click node_map_view "https://github.com/stratonflorentin-dot/my-view/blob/main/src/components/map/MapView.tsx"
click node_map_api "https://github.com/stratonflorentin-dot/my-view/tree/main/src/app/api/v1"
click node_keys "https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/apiKeys.ts"
click node_sdk "https://github.com/stratonflorentin-dot/my-view/blob/main/sdk/mymap.js"
click node_webhooks "https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/webhooks.ts"

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_workspace,node_links,node_auth,node_tenancy toneBlue
class node_contribute,node_capture_api,node_gps_fence,node_storage toneAmber
class node_worker,node_pipeline,node_engines,node_review,node_forms toneMint
class node_map_view,node_map_api,node_keys,node_sdk toneRose
class node_database,node_webhooks,node_owner,node_contributor toneIndigo
```

## Components

### Projects and access

- [Project workspace](https://github.com/stratonflorentin-dot/my-view/blob/main/src/components/dashboard/ProjectWorkspace.tsx): `src/components/dashboard/ProjectWorkspace.tsx`
- [Scan links](https://github.com/stratonflorentin-dot/my-view/blob/main/src/app/api/links/route.ts): `src/app/api/links/route.ts`
- [Authentication](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Project access](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/tenancy.ts): `src/lib/tenancy.ts`

### Contribution and capture

- [Guided capture](https://github.com/stratonflorentin-dot/my-view/blob/main/src/components/ContributeFlow.tsx): `src/components/ContributeFlow.tsx`
- [Capture intake](https://github.com/stratonflorentin-dot/my-view/blob/main/src/app/api/captures/route.ts): `src/app/api/captures/route.ts`
- [GPS and fence checks](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/fence.ts): `src/lib/fence.ts`
- [Media storage](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/storage/index.ts): `src/lib/storage/index.ts`

### Processing and review

- [Job worker](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/pipeline/worker.ts): `src/lib/pipeline/worker.ts`
- [Capture pipeline](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/pipeline/pipeline.ts): `src/lib/pipeline/pipeline.ts`
- [Reconstruction engines](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/pipeline/engines.ts): `src/lib/pipeline/engines.ts`
- [Submission review](https://github.com/stratonflorentin-dot/my-view/blob/main/src/app/api/submissions/%5Bid%5D/route.ts): `src/app/api/submissions/[id]/route.ts`
- [Custom forms](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/forms.ts): `src/lib/forms.ts`

### Maps and developer API

- [Map viewer](https://github.com/stratonflorentin-dot/my-view/blob/main/src/components/map/MapView.tsx): `src/components/map/MapView.tsx`
- [Map API](https://github.com/stratonflorentin-dot/my-view/tree/main/src/app/api/v1): `src/app/api/v1`
- [API keys](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/apiKeys.ts): `src/lib/apiKeys.ts`
- [JavaScript SDK](https://github.com/stratonflorentin-dot/my-view/blob/main/sdk/mymap.js): `sdk/mymap.js`

### Platform integrations

- [Platform data](https://github.com/stratonflorentin-dot/my-view/blob/main/src/db/schema.ts): `src/db/schema.ts`
- [Webhook delivery](https://github.com/stratonflorentin-dot/my-view/blob/main/src/lib/webhooks.ts): `src/lib/webhooks.ts`

### Other components

- **Project owner**
- **Contributor**

## Connections

- Project owner → Project workspace: manages projects (evidence: `README.md`)
- Project workspace → Scan links: creates scan links (evidence: `README.md`)
- Contributor → Guided capture: opens scan link (evidence: `README.md`)
- Guided capture → Capture intake: submits media (evidence: `README.md`)
- Capture intake → GPS and fence checks: validates location (evidence: `src/app/api/captures/route.ts`)
- Capture intake → Media storage: stores media (evidence: `src/app/api/captures/route.ts`)
- Capture intake → Capture pipeline: enqueues processing (evidence: `src/app/api/captures/route.ts`)
- Capture intake → Job worker: starts worker (evidence: `src/app/api/captures/route.ts`)
- Job worker → Capture pipeline: runs handlers (evidence: `src/lib/pipeline/worker.ts`)
- Capture pipeline → Reconstruction engines: reconstructs buildings (evidence: `src/lib/pipeline/pipeline.ts`)
- Capture pipeline → Media storage: reads media (evidence: `src/lib/pipeline/pipeline.ts`)
- Project owner → Submission review: reviews submissions (evidence: `README.md`)
- Submission review → Job worker: queues publication (evidence: `src/app/api/submissions/[id]/route.ts`)
- Submission review → Webhook delivery: dispatches events (evidence: `src/app/api/submissions/[id]/route.ts`)
- Capture pipeline → Webhook delivery: dispatches events (evidence: `src/lib/pipeline/pipeline.ts`)
- Job worker → Webhook delivery: signs deliveries (evidence: `src/lib/pipeline/worker.ts`)
- Project workspace → Custom forms: configures forms
- Project owner → Map viewer: views published maps (evidence: `README.md`)
- Map API → API keys: protects access
- JavaScript SDK → Map API: requests map data (evidence: `README.md`)
- Authentication → Project access: resolves project roles (evidence: `src/lib/tenancy.ts`)
