# tate-d-lim/flashpoint architecture

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

- Interactive diagram: https://gitdiagram.com/tate-d-lim/flashpoint
- Repository: https://github.com/tate-d-lim/flashpoint

## Overview

Flashpoint helps app teams determine which security requirements apply, which are covered by selected platform tools, and which remain their responsibility. Builders assess app risk, answer applicability questions, assemble and track a project plan, and can view that plan as a hotel; they then export review files or an agent brief. Tool owners maintain versioned coverage claims, while admins review those claims and manage the requirements catalog. Business logic lives in `lib/`; the sampled excerpts show core plan construction and database access, while some feature links rely on README statements or the SOURCE INDEX.

Main entry points: [`app/plan/project-context.tsx`](https://github.com/tate-d-lim/flashpoint/blob/main/app/plan/project-context.tsx) (Project plan), [`lib/data/db.ts`](https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/db.ts) (MongoDB), [`app/start/app/page.tsx`](https://github.com/tate-d-lim/flashpoint/blob/main/app/start/app/page.tsx) (App risk setup), [`app/start/needs/page.tsx`](https://github.com/tate-d-lim/flashpoint/blob/main/app/start/needs/page.tsx) (Applicability questions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_builder["App builder"]
  node_risk_questions["App risk setup<br/>[page.tsx]"]
  node_need_questions["Applicability questions<br/>[page.tsx]"]
  node_project_ui["Project plan"]
  node_task_tracking["Requirement checklist<br/>[checklist.tsx]"]
  node_hotel_view["Hotel plan view<br/>[scene.ts]"]
  node_tool_selection["Tool selection<br/>[tools-panel.tsx]"]
  node_export_api["Plan export routes<br/>[route.ts]"]
  node_oscal_export["OSCAL export<br/>[oscal.ts]"]
  node_ssp_export["Spreadsheet export<br/>[ssp-xlsx.ts]"]
end

subgraph group_planning["Plan engine"]
  node_risk_rules["Risk assessment<br/>[assess.ts]"]
  node_plan_select["Plan input selection<br/>[select.ts]"]
  node_plan_engine["Plan builder<br/>[engine.ts]"]
end

subgraph group_persistence["Project data"]
  node_plan_data["Plan data loader<br/>[plan-data.tsx]"]
  node_project_store["Project repository<br/>[projects.ts]"]
  node_plan_repository["Plan data repository<br/>[plan-data.ts]"]
  node_mongo[("MongoDB<br/>[db.ts]")]
  node_tool_versions["Tool version repository<br/>[tool-versions.ts]"]
  node_catalog_repository["Catalog repository<br/>[catalog.ts]"]
end

subgraph group_governance["Tool governance"]
  node_tool_coverage["Coverage editor"]
  node_admin_review["Coverage approval<br/>[page.tsx]"]
  node_agent_brief["Agent coverage brief<br/>[route.ts]"]
end

subgraph group_catalog["Requirements catalog"]
  node_catalog_admin["Catalog management<br/>[page.tsx]"]
  node_catalog_upload["Catalog upload<br/>[route.ts]"]
  node_catalog_parse["Catalog file parsing<br/>[parse-file.ts]"]
end

node_builder(("App builder"))
node_tool_owner(("Tool owner"))
node_admin(("Administrator"))

node_builder -->|"describes app"| node_risk_questions
node_risk_questions -->|"assesses risk"| node_risk_rules
node_risk_questions -->|"continues setup"| node_need_questions
node_need_questions -->|"loads plan data"| node_plan_data
node_plan_data -->|"opens database"| node_mongo
node_plan_data -->|"loads plan records"| node_plan_repository
node_plan_repository -->|"reads collections"| node_mongo
node_need_questions -->|"selects requirements"| node_plan_select
node_plan_select -->|"prepares plan input"| node_plan_engine
node_plan_engine -->|"builds plan"| node_project_ui
node_builder -->|"picks tools"| node_tool_selection
node_tool_selection -->|"updates plan"| node_project_ui
node_project_ui -->|"shows checklist"| node_task_tracking
node_project_ui -->|"shows hotel view"| node_hotel_view
node_project_ui -->|"saves project"| node_project_store
node_project_store -->|"reads and writes"| node_mongo
node_builder -->|"requests review export"| node_export_api
node_export_api -->|"creates OSCAL"| node_oscal_export
node_export_api -->|"creates spreadsheet"| node_ssp_export
node_tool_owner -->|"edits coverage"| node_tool_coverage
node_tool_coverage -->|"creates versions"| node_tool_versions
node_tool_versions -->|"reads and writes"| node_mongo
node_admin -->|"reviews claims"| node_admin_review
node_admin_review -->|"reviews versions"| node_tool_versions
node_admin -->|"manages catalog"| node_catalog_admin
node_catalog_admin -->|"loads catalog"| node_catalog_repository
node_catalog_upload -->|"parses upload"| node_catalog_parse
node_catalog_upload -->|"stores release"| node_catalog_repository
node_catalog_repository -.->|"reads and writes"| node_mongo
node_tool_owner -.->|"requests brief"| node_agent_brief

click node_risk_questions "https://github.com/tate-d-lim/flashpoint/blob/main/app/start/app/page.tsx"
click node_risk_rules "https://github.com/tate-d-lim/flashpoint/blob/main/lib/risk/assess.ts"
click node_need_questions "https://github.com/tate-d-lim/flashpoint/blob/main/app/start/needs/page.tsx"
click node_plan_data "https://github.com/tate-d-lim/flashpoint/blob/main/app/plan/plan-data.tsx"
click node_plan_select "https://github.com/tate-d-lim/flashpoint/blob/main/lib/plan/select.ts"
click node_plan_engine "https://github.com/tate-d-lim/flashpoint/blob/main/lib/plan/engine.ts"
click node_project_ui "https://github.com/tate-d-lim/flashpoint/blob/main/app/plan/project-context.tsx"
click node_task_tracking "https://github.com/tate-d-lim/flashpoint/blob/main/app/plan/checklist.tsx"
click node_hotel_view "https://github.com/tate-d-lim/flashpoint/blob/main/app/hotel/scene.ts"
click node_tool_selection "https://github.com/tate-d-lim/flashpoint/blob/main/app/plan/tools-panel.tsx"
click node_project_store "https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/repos/projects.ts"
click node_plan_repository "https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/repos/plan-data.ts"
click node_mongo "https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/db.ts"
click node_export_api "https://github.com/tate-d-lim/flashpoint/blob/main/app/api/export/ssp/route.ts"
click node_oscal_export "https://github.com/tate-d-lim/flashpoint/blob/main/lib/export/oscal.ts"
click node_ssp_export "https://github.com/tate-d-lim/flashpoint/blob/main/lib/export/ssp-xlsx.ts"
click node_tool_coverage "https://github.com/tate-d-lim/flashpoint/blob/main/app/tool-owner/tools/%5BtoolId%5D/coverage-editor.tsx"
click node_tool_versions "https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/repos/tool-versions.ts"
click node_admin_review "https://github.com/tate-d-lim/flashpoint/blob/main/app/admin/%5BtoolId%5D/page.tsx"
click node_catalog_admin "https://github.com/tate-d-lim/flashpoint/blob/main/app/admin/catalog/page.tsx"
click node_catalog_upload "https://github.com/tate-d-lim/flashpoint/blob/main/app/admin/catalog/upload/file/route.ts"
click node_catalog_parse "https://github.com/tate-d-lim/flashpoint/blob/main/lib/catalog/parse-file.ts"
click node_catalog_repository "https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/repos/catalog.ts"
click node_agent_brief "https://github.com/tate-d-lim/flashpoint/blob/main/app/api/tool-owner/tools/%5BtoolId%5D/agent-brief/route.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_risk_questions,node_need_questions,node_project_ui,node_task_tracking,node_hotel_view,node_tool_selection,node_export_api,node_oscal_export,node_ssp_export toneBlue
class node_risk_rules,node_plan_select,node_plan_engine toneAmber
class node_plan_data,node_project_store,node_plan_repository,node_mongo,node_tool_versions,node_catalog_repository toneMint
class node_tool_coverage,node_admin_review,node_agent_brief toneRose
class node_catalog_admin,node_catalog_upload,node_catalog_parse,node_builder,node_tool_owner,node_admin toneIndigo
```

## Components

### App builder

- [App risk setup](https://github.com/tate-d-lim/flashpoint/blob/main/app/start/app/page.tsx): `app/start/app/page.tsx`
- [Applicability questions](https://github.com/tate-d-lim/flashpoint/blob/main/app/start/needs/page.tsx): `app/start/needs/page.tsx`
- [Project plan](https://github.com/tate-d-lim/flashpoint/blob/main/app/plan/project-context.tsx): `app/plan/project-context.tsx`
- [Requirement checklist](https://github.com/tate-d-lim/flashpoint/blob/main/app/plan/checklist.tsx): `app/plan/checklist.tsx`
- [Hotel plan view](https://github.com/tate-d-lim/flashpoint/blob/main/app/hotel/scene.ts): `app/hotel/scene.ts`
- [Tool selection](https://github.com/tate-d-lim/flashpoint/blob/main/app/plan/tools-panel.tsx): `app/plan/tools-panel.tsx`
- [Plan export routes](https://github.com/tate-d-lim/flashpoint/blob/main/app/api/export/ssp/route.ts): `app/api/export/ssp/route.ts`
- [OSCAL export](https://github.com/tate-d-lim/flashpoint/blob/main/lib/export/oscal.ts): `lib/export/oscal.ts`
- [Spreadsheet export](https://github.com/tate-d-lim/flashpoint/blob/main/lib/export/ssp-xlsx.ts): `lib/export/ssp-xlsx.ts`

### Plan engine

- [Risk assessment](https://github.com/tate-d-lim/flashpoint/blob/main/lib/risk/assess.ts): `lib/risk/assess.ts`
- [Plan input selection](https://github.com/tate-d-lim/flashpoint/blob/main/lib/plan/select.ts): `lib/plan/select.ts`
- [Plan builder](https://github.com/tate-d-lim/flashpoint/blob/main/lib/plan/engine.ts): `lib/plan/engine.ts`

### Project data

- [Plan data loader](https://github.com/tate-d-lim/flashpoint/blob/main/app/plan/plan-data.tsx): `app/plan/plan-data.tsx`
- [Project repository](https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/repos/projects.ts): `lib/data/repos/projects.ts`
- [Plan data repository](https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/repos/plan-data.ts): `lib/data/repos/plan-data.ts`
- [MongoDB](https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/db.ts): `lib/data/db.ts`
- [Tool version repository](https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/repos/tool-versions.ts): `lib/data/repos/tool-versions.ts`
- [Catalog repository](https://github.com/tate-d-lim/flashpoint/blob/main/lib/data/repos/catalog.ts): `lib/data/repos/catalog.ts`

### Tool governance

- [Coverage editor](https://github.com/tate-d-lim/flashpoint/blob/main/app/tool-owner/tools/%5BtoolId%5D/coverage-editor.tsx): `app/tool-owner/tools/[toolId]/coverage-editor.tsx`
- [Coverage approval](https://github.com/tate-d-lim/flashpoint/blob/main/app/admin/%5BtoolId%5D/page.tsx): `app/admin/[toolId]/page.tsx`
- [Agent coverage brief](https://github.com/tate-d-lim/flashpoint/blob/main/app/api/tool-owner/tools/%5BtoolId%5D/agent-brief/route.ts): `app/api/tool-owner/tools/[toolId]/agent-brief/route.ts`

### Requirements catalog

- [Catalog management](https://github.com/tate-d-lim/flashpoint/blob/main/app/admin/catalog/page.tsx): `app/admin/catalog/page.tsx`
- [Catalog upload](https://github.com/tate-d-lim/flashpoint/blob/main/app/admin/catalog/upload/file/route.ts): `app/admin/catalog/upload/file/route.ts`
- [Catalog file parsing](https://github.com/tate-d-lim/flashpoint/blob/main/lib/catalog/parse-file.ts): `lib/catalog/parse-file.ts`

### Other components

- **App builder**
- **Tool owner**
- **Administrator**

## Connections

- App builder → App risk setup: describes app (evidence: `README.md`)
- App risk setup → Risk assessment: assesses risk (evidence: `app/start/app/page.tsx`)
- App risk setup → Applicability questions: continues setup (evidence: `README.md`)
- Applicability questions → Plan data loader: loads plan data (evidence: `app/start/needs/page.tsx`)
- Plan data loader → MongoDB: opens database (evidence: `app/plan/plan-data.tsx`)
- Plan data loader → Plan data repository: loads plan records (evidence: `app/plan/plan-data.tsx`)
- Plan data repository → MongoDB: reads collections (evidence: `lib/data/repos/plan-data.ts`)
- Applicability questions → Plan input selection: selects requirements (evidence: `app/start/needs/page.tsx`)
- Plan input selection → Plan builder: prepares plan input (evidence: `lib/plan/select.ts`)
- Plan builder → Project plan: builds plan (evidence: `app/plan/project-context.tsx`)
- App builder → Tool selection: picks tools (evidence: `README.md`)
- Tool selection → Project plan: updates plan (evidence: `app/plan/project-context.tsx`)
- Project plan → Requirement checklist: shows checklist (evidence: `README.md`)
- Project plan → Hotel plan view: shows hotel view
- Project plan → Project repository: saves project (evidence: `app/plan/project-context.tsx`)
- Project repository → MongoDB: reads and writes (evidence: `app/projects/page.tsx`)
- App builder → Plan export routes: requests review export (evidence: `README.md`)
- Plan export routes → OSCAL export: creates OSCAL
- Plan export routes → Spreadsheet export: creates spreadsheet (evidence: `app/api/export/ssp/route.ts`)
- Tool owner → Coverage editor: edits coverage (evidence: `README.md`)
- Coverage editor → Tool version repository: creates versions (evidence: `app/tool-owner/tools/[toolId]/coverage-editor.tsx`)
- Tool version repository → MongoDB: reads and writes (evidence: `lib/data/repos/tool-versions.ts`)
- Administrator → Coverage approval: reviews claims (evidence: `README.md`)
- Coverage approval → Tool version repository: reviews versions (evidence: `app/admin/[toolId]/page.tsx`)
- Administrator → Catalog management: manages catalog (evidence: `README.md`)
- Catalog management → Catalog repository: loads catalog (evidence: `app/admin/catalog/page.tsx`)
- Catalog upload → Catalog file parsing: parses upload (evidence: `app/admin/catalog/upload/file/route.ts`)
- Catalog upload → Catalog repository: stores release (evidence: `app/admin/catalog/upload/file/route.ts`)
- Catalog repository → MongoDB: reads and writes
- Tool owner → Agent coverage brief: requests brief
