# monapdx/personality-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/monapdx/personality-dashboard
- Repository: https://github.com/monapdx/personality-dashboard

## Overview

#### Purpose and Runtime

Personality Dashboard is a local-first personal identity workspace. A React 18 single-page application renders an editable philosophy/value map, related workflow and tool-planning views, and a project evaluation scorecard. It has no backend, accounts, or network data dependency.

Browser bootstrap and application shell:
- `src/main.jsx`
- `src/App.jsx`
- `src/App.css`

Vite 5 provides development serving and production bundling via `vite.config.js`.

#### Application Shell and Navigation

`App.jsx` owns the top-level page composition, section navigation, shared toolbar placement, and footer. Feature views are client-rendered sections rather than routed server pages, so state remains available throughout the dashboard.

Core sections are implemented in:
- `src/components/IdentityMap.jsx`
- `src/components/PrinciplesLibrary.jsx`
- `src/components/WorkflowBuilder.jsx`
- `src/components/ToolIdeas.jsx`
- `src/components/ProjectEvaluator.jsx`

#### State, Persistence, and Data Boundary

`IdentityContext` is the central domain-state boundary. It initializes editable clusters, workflow, and tool ideas from seed data; exposes mutations to feature components; and synchronizes the resulting model to browser `localStorage` under `identity-core-v1`.

- `src/context/IdentityContext.jsx`
- `src/data/initialData.js`
- `src/utils/ids.js`

The durable model is entirely browser-side. Reload restores local state; clearing storage reverts initialization behavior rather than invoking a remote service.

#### Identity Map and Cluster Editing

The identity map is the primary interaction surface: Identity Core is central, with editable value clusters around it. Selecting a cluster opens readable detail and editing flows. Cluster content includes meaning, principles, stress-test questions, and suggested tools.

- `src/components/IdentityMap.jsx`
- `src/components/ClusterDetail.jsx`
- `src/components/ClusterModal.jsx`

`ClusterModal` is the structured editing boundary; its updates flow through context rather than being maintained as isolated component state. Shared list editing is delegated to `src/components/ListEditor.jsx`.

#### Search and Knowledge Views

The principles library provides a cross-cluster, searchable/filterable projection of the cluster model. It reads the same contextual identity data rather than maintaining a separate principles store.

- `src/components/PrinciplesLibrary.jsx`
- `src/components/DataToolbar.jsx`
- `src/context/IdentityContext.jsx`

This makes cluster edits immediately visible in the library and map.

#### Planning and Evaluation Stages

Workflow Builder turns editable input, process, output, and feedback-loop lists into a personal operating pipeline. Tool Ideas manages cluster-associated product/utility concepts. Project Evaluator accepts a project description and applies the predefined autonomy, energy, portability, refusal, clarity, safety, and memory-preservation dimensions to produce a scorecard and prompts.

- `src/components/WorkflowBuilder.jsx`
- `src/components/ToolIdeas.jsx`
- `src/components/ProjectEvaluator.jsx`
- `src/data/initialData.js`

#### Import/Export and Static Visual Assets

The data toolbar is the portability boundary: JSON export creates backups; JSON import replaces the primary editable collections; Markdown export produces a human-readable snapshot.

- `src/components/DataToolbar.jsx`
- `src/utils/markdownExport.js`
- `src/context/IdentityContext.jsx`

Chart imagery originates in repository-root `charts-graphs/`, is copied into public assets during dev/build by `scripts/sync-charts-graphs.js`, and is referenced through the chart mapping and rendering layer:

- `scripts/sync-charts-graphs.js`
- `src/data/chartImages.js`
- `src/components/ChartsGraphs.jsx`
- `src/components/ChartFigure.jsx`

GitHub Pages deployment is defined by `.github/workflows/deploy-pages.yml`.

Main entry points: [`src/App.jsx`](https://github.com/monapdx/personality-dashboard/blob/main/src/App.jsx) (Application shell), [`src/context/IdentityContext.jsx`](https://github.com/monapdx/personality-dashboard/blob/main/src/context/IdentityContext.jsx) (Identity context), [`src/components/DataToolbar.jsx`](https://github.com/monapdx/personality-dashboard/blob/main/src/components/DataToolbar.jsx) (Data toolbar), [`src/main.jsx`](https://github.com/monapdx/personality-dashboard/blob/main/src/main.jsx) (Browser bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Browser Runtime"]
  node_main["Browser bootstrap<br/>React entry<br/>[main.jsx]"]
  node_app["Application shell<br/>React shell<br/>[App.jsx]"]
end

subgraph group_state["State &amp; Data"]
  node_context{{"Identity context<br/>domain state"}}
  node_seed["Seed model<br/>initial data<br/>[initialData.js]"]
  node_storage[("Browser localStorage<br/>persistence")]
  node_markdown["Markdown export<br/>export formatter<br/>[markdownExport.js]"]
end

subgraph group_features["Dashboard Features"]
  node_identitymap["Identity map<br/>primary view<br/>[IdentityMap.jsx]"]
  node_clusterdetail["Cluster detail<br/>detail view<br/>[ClusterDetail.jsx]"]
  node_clustermodal["Cluster editor<br/>editing boundary<br/>[ClusterModal.jsx]"]
  node_principles["Principles library<br/>knowledge view"]
  node_toolbar["Data toolbar<br/>portability UI<br/>[DataToolbar.jsx]"]
  node_workflow["Workflow builder<br/>planning view"]
  node_tools["Tool ideas<br/>planning view<br/>[ToolIdeas.jsx]"]
  node_evaluator["Project evaluator<br/>scorecard view"]
end

subgraph group_assets["Visual Assets"]
  node_sync["Chart asset sync<br/>asset pipeline"]
  node_chartmap["Chart image mapping<br/>asset registry<br/>[chartImages.js]"]
  node_charts["Charts &amp; figures<br/>visual renderer<br/>[ChartsGraphs.jsx]"]
end

subgraph group_delivery["Build &amp; Deploy"]
  node_vite{{"Vite build server<br/>build tool<br/>[vite.config.js]"}}
  node_deploy["GitHub Pages deploy<br/>deployment workflow<br/>[deploy-pages.yml]"]
end

node_vite -->|"serves and bundles"| node_main
node_main -->|"mounts"| node_app
node_app -->|"provides shared state"| node_context
node_app -->|"renders section"| node_identitymap
node_app -->|"renders section"| node_principles
node_app -->|"renders section"| node_workflow
node_app -->|"renders section"| node_tools
node_app -->|"renders section"| node_evaluator
node_app -->|"places shared toolbar"| node_toolbar
node_context -->|"initializes from"| node_seed
node_context -->|"restores and syncs"| node_storage
node_identitymap -->|"selects cluster"| node_clusterdetail
node_clusterdetail -->|"opens editor"| node_clustermodal
node_clustermodal -->|"submits updates"| node_context
node_principles -->|"reads cluster model"| node_context
node_workflow -->|"edits workflow"| node_context
node_tools -->|"edits tool ideas"| node_context
node_evaluator -->|"uses score dimensions"| node_seed
node_toolbar -->|"imports and exports model"| node_context
node_toolbar -->|"creates snapshot"| node_markdown
node_sync -->|"makes assets available"| node_chartmap
node_chartmap -->|"resolves chart imagery"| node_charts
node_deploy -->|"builds for publishing"| node_vite

click node_vite "https://github.com/monapdx/personality-dashboard/blob/main/vite.config.js"
click node_main "https://github.com/monapdx/personality-dashboard/blob/main/src/main.jsx"
click node_app "https://github.com/monapdx/personality-dashboard/blob/main/src/App.jsx"
click node_context "https://github.com/monapdx/personality-dashboard/blob/main/src/context/IdentityContext.jsx"
click node_seed "https://github.com/monapdx/personality-dashboard/blob/main/src/data/initialData.js"
click node_identitymap "https://github.com/monapdx/personality-dashboard/blob/main/src/components/IdentityMap.jsx"
click node_clusterdetail "https://github.com/monapdx/personality-dashboard/blob/main/src/components/ClusterDetail.jsx"
click node_clustermodal "https://github.com/monapdx/personality-dashboard/blob/main/src/components/ClusterModal.jsx"
click node_principles "https://github.com/monapdx/personality-dashboard/blob/main/src/components/PrinciplesLibrary.jsx"
click node_toolbar "https://github.com/monapdx/personality-dashboard/blob/main/src/components/DataToolbar.jsx"
click node_markdown "https://github.com/monapdx/personality-dashboard/blob/main/src/utils/markdownExport.js"
click node_workflow "https://github.com/monapdx/personality-dashboard/blob/main/src/components/WorkflowBuilder.jsx"
click node_tools "https://github.com/monapdx/personality-dashboard/blob/main/src/components/ToolIdeas.jsx"
click node_evaluator "https://github.com/monapdx/personality-dashboard/blob/main/src/components/ProjectEvaluator.jsx"
click node_sync "https://github.com/monapdx/personality-dashboard/blob/main/scripts/sync-charts-graphs.js"
click node_chartmap "https://github.com/monapdx/personality-dashboard/blob/main/src/data/chartImages.js"
click node_charts "https://github.com/monapdx/personality-dashboard/blob/main/src/components/ChartsGraphs.jsx"
click node_deploy "https://github.com/monapdx/personality-dashboard/blob/main/.github/workflows/deploy-pages.yml"

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_main,node_app toneBlue
class node_context,node_seed,node_storage,node_markdown toneAmber
class node_identitymap,node_clusterdetail,node_clustermodal,node_principles,node_toolbar,node_workflow,node_tools,node_evaluator toneMint
class node_sync,node_chartmap,node_charts toneRose
class node_vite,node_deploy toneIndigo
```

## Components

### Browser Runtime

- [Browser bootstrap](https://github.com/monapdx/personality-dashboard/blob/main/src/main.jsx): React entry · `src/main.jsx`
- [Application shell](https://github.com/monapdx/personality-dashboard/blob/main/src/App.jsx): React shell · Composes sections, navigation, toolbar, and footer. · `src/App.jsx`

### State & Data

- [Identity context](https://github.com/monapdx/personality-dashboard/blob/main/src/context/IdentityContext.jsx): domain state · Owns editable identity, workflow, and tool collections. · `src/context/IdentityContext.jsx`
- [Seed model](https://github.com/monapdx/personality-dashboard/blob/main/src/data/initialData.js): initial data · `src/data/initialData.js`
- **Browser localStorage**: persistence · Stores the model under identity-core-v1.
- [Markdown export](https://github.com/monapdx/personality-dashboard/blob/main/src/utils/markdownExport.js): export formatter · `src/utils/markdownExport.js`

### Dashboard Features

- [Identity map](https://github.com/monapdx/personality-dashboard/blob/main/src/components/IdentityMap.jsx): primary view · `src/components/IdentityMap.jsx`
- [Cluster detail](https://github.com/monapdx/personality-dashboard/blob/main/src/components/ClusterDetail.jsx): detail view · `src/components/ClusterDetail.jsx`
- [Cluster editor](https://github.com/monapdx/personality-dashboard/blob/main/src/components/ClusterModal.jsx): editing boundary · `src/components/ClusterModal.jsx`
- [Principles library](https://github.com/monapdx/personality-dashboard/blob/main/src/components/PrinciplesLibrary.jsx): knowledge view · Searchable projection of cluster principles. · `src/components/PrinciplesLibrary.jsx`
- [Data toolbar](https://github.com/monapdx/personality-dashboard/blob/main/src/components/DataToolbar.jsx): portability UI · Imports JSON and exports JSON or Markdown. · `src/components/DataToolbar.jsx`
- [Workflow builder](https://github.com/monapdx/personality-dashboard/blob/main/src/components/WorkflowBuilder.jsx): planning view · Edits input, process, output, and feedback stages. · `src/components/WorkflowBuilder.jsx`
- [Tool ideas](https://github.com/monapdx/personality-dashboard/blob/main/src/components/ToolIdeas.jsx): planning view · `src/components/ToolIdeas.jsx`
- [Project evaluator](https://github.com/monapdx/personality-dashboard/blob/main/src/components/ProjectEvaluator.jsx): scorecard view · Scores descriptions against predefined identity dimensions. · `src/components/ProjectEvaluator.jsx`

### Visual Assets

- [Chart asset sync](https://github.com/monapdx/personality-dashboard/blob/main/scripts/sync-charts-graphs.js): asset pipeline · Copies repository charts into public assets during dev/build. · `scripts/sync-charts-graphs.js`
- [Chart image mapping](https://github.com/monapdx/personality-dashboard/blob/main/src/data/chartImages.js): asset registry · `src/data/chartImages.js`
- [Charts & figures](https://github.com/monapdx/personality-dashboard/blob/main/src/components/ChartsGraphs.jsx): visual renderer · `src/components/ChartsGraphs.jsx`

### Build & Deploy

- [Vite build server](https://github.com/monapdx/personality-dashboard/blob/main/vite.config.js): build tool · Serves development and bundles the SPA. · `vite.config.js`
- [GitHub Pages deploy](https://github.com/monapdx/personality-dashboard/blob/main/.github/workflows/deploy-pages.yml): deployment workflow · `.github/workflows/deploy-pages.yml`

## Connections

- Vite build server → Browser bootstrap: serves and bundles
- Browser bootstrap → Application shell: mounts
- Application shell → Identity context: provides shared state
- Application shell → Identity map: renders section
- Application shell → Principles library: renders section
- Application shell → Workflow builder: renders section
- Application shell → Tool ideas: renders section
- Application shell → Project evaluator: renders section
- Application shell → Data toolbar: places shared toolbar
- Identity context → Seed model: initializes from
- Identity context → Browser localStorage: restores and syncs
- Identity map → Cluster detail: selects cluster
- Cluster detail → Cluster editor: opens editor
- Cluster editor → Identity context: submits updates
- Principles library → Identity context: reads cluster model
- Workflow builder → Identity context: edits workflow
- Tool ideas → Identity context: edits tool ideas
- Project evaluator → Seed model: uses score dimensions
- Data toolbar → Identity context: imports and exports model
- Data toolbar → Markdown export: creates snapshot
- Chart asset sync → Chart image mapping: makes assets available
- Chart image mapping → Charts & figures: resolves chart imagery
- GitHub Pages deploy → Vite build server: builds for publishing
