# ashvall01/pm-codex architecture

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

- Interactive diagram: https://gitdiagram.com/ashvall01/pm-codex
- Repository: https://github.com/ashvall01/pm-codex

## Overview

PM Codex is a local project-management app backed by the user's Google Sheet, with an optional Gemini assistant and a Claude MCP bridge. The user sets up a project, plans and tracks work, and uses meetings, documents, risks, stakeholders, and a project knowledge base; AI suggestions are reviewed before changes are applied. The graph includes the documented feature areas and the sampled storage, privacy, and integration layers. Unsampled feature wiring is shown only as unverified; source excerpts do not establish every runtime connection.

Main entry points: [`source/src/App.tsx`](https://github.com/ashvall01/pm-codex/blob/main/source/src/App.tsx) (App routing), [`source/src/store/tasksStore.ts`](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/tasksStore.ts) (Task state), [`source/src/store/timelineStore.ts`](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/timelineStore.ts) (Timeline state), [`source/src/store/deliverablesStore.ts`](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/deliverablesStore.ts) (Deliverables state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Project workspace"]
  node_app["App routing<br/>[App.tsx]"]
  node_setup["Setup wizard<br/>[SetupWizard.tsx]"]
  node_timeline["Timeline planning<br/>[Timeline.tsx]"]
  node_deliverables["Deliverables<br/>[Deliverables.tsx]"]
  node_tasks["Tasks and issues<br/>[TasksTracker.tsx]"]
  node_risks["Risk tracking<br/>[Risks.tsx]"]
  node_meetings["Meeting minutes<br/>[Meetings.tsx]"]
  node_other_features["Other project areas"]
end

subgraph group_state["Project state"]
  node_app_state["Project settings state<br/>[appStore.ts]"]
  node_timeline_state["Timeline state<br/>[timelineStore.ts]"]
  node_deliverable_state["Deliverables state"]
  node_task_state["Task state<br/>[tasksStore.ts]"]
  node_billing_state["Billing state<br/>[billingStore.ts]"]
  node_codex_state["Codex knowledge state<br/>[codexStore.ts]"]
  node_documents_state["Documents state<br/>[documentsStore.ts]"]
  node_mom_state["Meeting state<br/>[momStore.ts]"]
  node_risks_state["Risk state<br/>[risksStore.ts]"]
  node_stakeholders_state["Stakeholder state"]
  node_pii_state["Privacy glossary state<br/>[piiStore.ts]"]
  node_acr_state["Change request state<br/>[acrStore.ts]"]
  node_ai_state["AI session state<br/>[aiStore.ts]"]
  node_local_storage[("Browser storage")]
  node_archive["Archive rules<br/>[archive.ts]"]
end

subgraph group_ai["AI assistance"]
  node_context["AI project context<br/>[aiContextEngine.ts]"]
  node_pii_filter["PII sanitization<br/>[piiSanitization.ts]"]
  node_review["Proposal review<br/>[AIReviewModal.tsx]"]
  node_gemini["Gemini assistant<br/>[geminiClient.ts]"]
end

subgraph group_integration["Sync and integrations"]
  node_bridge_client["Claude bridge client<br/>[bridgeClient.ts]"]
  node_bridge_server["MCP bridge server<br/>[server.mjs]"]
  node_local_server["Local app server<br/>[server.mjs]"]
  node_gas_sync["Sheet sync service<br/>[gasSyncService.ts]"]
end

node_user(("Project user"))
node_claude(("Claude desktop"))
node_google_sheet[("User Google Sheet")]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_setup
node_app -->|"routes to"| node_timeline
node_app -->|"routes to"| node_deliverables
node_app -->|"routes to"| node_tasks
node_app -->|"routes to"| node_risks
node_app -.->|"routes to"| node_meetings
node_app -.->|"routes to"| node_other_features
node_tasks -->|"reads and updates"| node_task_state
node_task_state -->|"uses"| node_archive
node_deliverable_state -->|"uses"| node_archive
node_timeline_state -->|"reads"| node_task_state
node_timeline_state -->|"reads"| node_deliverable_state
node_app_state -.->|"persists to"| node_local_storage
node_task_state -.->|"persists to"| node_local_storage
node_timeline_state -.->|"persists to"| node_local_storage
node_deliverable_state -.->|"persists to"| node_local_storage
node_billing_state -.->|"persists to"| node_local_storage
node_codex_state -.->|"persists to"| node_local_storage
node_documents_state -.->|"persists to"| node_local_storage
node_mom_state -.->|"persists to"| node_local_storage
node_risks_state -.->|"persists to"| node_local_storage
node_stakeholders_state -.->|"persists to"| node_local_storage
node_pii_state -.->|"persists to"| node_local_storage
node_acr_state -.->|"persists to"| node_local_storage
node_ai_state -.->|"persists to"| node_local_storage
node_app -->|"tracks changes"| node_gas_sync
node_gas_sync -->|"syncs data"| node_google_sheet
node_user -.->|"requests assistance"| node_context
node_context -->|"sanitizes context"| node_pii_filter
node_pii_filter -->|"reads glossary"| node_pii_state
node_context -.->|"provides context"| node_review
node_review -->|"requests signoff"| node_user
node_user -.->|"optionally uses"| node_gemini
node_local_server -->|"forwards calls"| node_gemini
node_user -->|"optionally starts session"| node_claude
node_claude -->|"requests project tools"| node_bridge_server
node_bridge_client -.->|"communicates with"| node_bridge_server
node_bridge_server -->|"files proposed changes"| node_review

click node_app "https://github.com/ashvall01/pm-codex/blob/main/source/src/App.tsx"
click node_setup "https://github.com/ashvall01/pm-codex/blob/main/source/src/features/SetupWizard/SetupWizard.tsx"
click node_timeline "https://github.com/ashvall01/pm-codex/blob/main/source/src/features/Timeline/Timeline.tsx"
click node_deliverables "https://github.com/ashvall01/pm-codex/blob/main/source/src/features/Deliverables/Deliverables.tsx"
click node_tasks "https://github.com/ashvall01/pm-codex/blob/main/source/src/features/Tasks/TasksTracker.tsx"
click node_risks "https://github.com/ashvall01/pm-codex/blob/main/source/src/features/Risks/Risks.tsx"
click node_meetings "https://github.com/ashvall01/pm-codex/blob/main/source/src/features/Meetings/Meetings.tsx"
click node_other_features "https://github.com/ashvall01/pm-codex/tree/main/source/src/features"
click node_app_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/appStore.ts"
click node_timeline_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/timelineStore.ts"
click node_deliverable_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/deliverablesStore.ts"
click node_task_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/tasksStore.ts"
click node_billing_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/billingStore.ts"
click node_codex_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/codexStore.ts"
click node_documents_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/documentsStore.ts"
click node_mom_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/momStore.ts"
click node_risks_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/risksStore.ts"
click node_stakeholders_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/stakeholdersStore.ts"
click node_pii_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/piiStore.ts"
click node_acr_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/acrStore.ts"
click node_ai_state "https://github.com/ashvall01/pm-codex/blob/main/source/src/store/aiStore.ts"
click node_archive "https://github.com/ashvall01/pm-codex/blob/main/source/src/utils/archive.ts"
click node_context "https://github.com/ashvall01/pm-codex/blob/main/source/src/services/aiContextEngine.ts"
click node_pii_filter "https://github.com/ashvall01/pm-codex/blob/main/source/src/utils/piiSanitization.ts"
click node_review "https://github.com/ashvall01/pm-codex/blob/main/source/src/components/layout/AIReviewModal.tsx"
click node_gemini "https://github.com/ashvall01/pm-codex/blob/main/source/src/services/geminiClient.ts"
click node_bridge_client "https://github.com/ashvall01/pm-codex/blob/main/source/src/services/bridgeClient.ts"
click node_bridge_server "https://github.com/ashvall01/pm-codex/blob/main/bridge/server.mjs"
click node_local_server "https://github.com/ashvall01/pm-codex/blob/main/source/server.mjs"
click node_gas_sync "https://github.com/ashvall01/pm-codex/blob/main/source/src/services/gasSyncService.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_app,node_setup,node_timeline,node_deliverables,node_tasks,node_risks,node_meetings,node_other_features,node_user toneBlue
class node_app_state,node_timeline_state,node_deliverable_state,node_task_state,node_billing_state,node_codex_state,node_documents_state,node_mom_state,node_risks_state,node_stakeholders_state,node_pii_state,node_acr_state,node_ai_state,node_local_storage,node_archive,node_google_sheet toneAmber
class node_context,node_pii_filter,node_review,node_gemini toneMint
class node_bridge_client,node_bridge_server,node_local_server,node_gas_sync toneRose
class node_claude toneIndigo
```

## Components

### Project workspace

- [App routing](https://github.com/ashvall01/pm-codex/blob/main/source/src/App.tsx): `source/src/App.tsx`
- [Setup wizard](https://github.com/ashvall01/pm-codex/blob/main/source/src/features/SetupWizard/SetupWizard.tsx): `source/src/features/SetupWizard/SetupWizard.tsx`
- [Timeline planning](https://github.com/ashvall01/pm-codex/blob/main/source/src/features/Timeline/Timeline.tsx): `source/src/features/Timeline/Timeline.tsx`
- [Deliverables](https://github.com/ashvall01/pm-codex/blob/main/source/src/features/Deliverables/Deliverables.tsx): `source/src/features/Deliverables/Deliverables.tsx`
- [Tasks and issues](https://github.com/ashvall01/pm-codex/blob/main/source/src/features/Tasks/TasksTracker.tsx): `source/src/features/Tasks/TasksTracker.tsx`
- [Risk tracking](https://github.com/ashvall01/pm-codex/blob/main/source/src/features/Risks/Risks.tsx): `source/src/features/Risks/Risks.tsx`
- [Meeting minutes](https://github.com/ashvall01/pm-codex/blob/main/source/src/features/Meetings/Meetings.tsx): `source/src/features/Meetings/Meetings.tsx`
- [Other project areas](https://github.com/ashvall01/pm-codex/tree/main/source/src/features): `source/src/features`

### Project state

- [Project settings state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/appStore.ts): `source/src/store/appStore.ts`
- [Timeline state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/timelineStore.ts): `source/src/store/timelineStore.ts`
- [Deliverables state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/deliverablesStore.ts): `source/src/store/deliverablesStore.ts`
- [Task state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/tasksStore.ts): `source/src/store/tasksStore.ts`
- [Billing state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/billingStore.ts): `source/src/store/billingStore.ts`
- [Codex knowledge state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/codexStore.ts): `source/src/store/codexStore.ts`
- [Documents state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/documentsStore.ts): `source/src/store/documentsStore.ts`
- [Meeting state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/momStore.ts): `source/src/store/momStore.ts`
- [Risk state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/risksStore.ts): `source/src/store/risksStore.ts`
- [Stakeholder state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/stakeholdersStore.ts): `source/src/store/stakeholdersStore.ts`
- [Privacy glossary state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/piiStore.ts): `source/src/store/piiStore.ts`
- [Change request state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/acrStore.ts): `source/src/store/acrStore.ts`
- [AI session state](https://github.com/ashvall01/pm-codex/blob/main/source/src/store/aiStore.ts): `source/src/store/aiStore.ts`
- **Browser storage**
- [Archive rules](https://github.com/ashvall01/pm-codex/blob/main/source/src/utils/archive.ts): `source/src/utils/archive.ts`

### AI assistance

- [AI project context](https://github.com/ashvall01/pm-codex/blob/main/source/src/services/aiContextEngine.ts): `source/src/services/aiContextEngine.ts`
- [PII sanitization](https://github.com/ashvall01/pm-codex/blob/main/source/src/utils/piiSanitization.ts): `source/src/utils/piiSanitization.ts`
- [Proposal review](https://github.com/ashvall01/pm-codex/blob/main/source/src/components/layout/AIReviewModal.tsx): `source/src/components/layout/AIReviewModal.tsx`
- [Gemini assistant](https://github.com/ashvall01/pm-codex/blob/main/source/src/services/geminiClient.ts): `source/src/services/geminiClient.ts`

### Sync and integrations

- [Claude bridge client](https://github.com/ashvall01/pm-codex/blob/main/source/src/services/bridgeClient.ts): `source/src/services/bridgeClient.ts`
- [MCP bridge server](https://github.com/ashvall01/pm-codex/blob/main/bridge/server.mjs): `bridge/server.mjs`
- [Local app server](https://github.com/ashvall01/pm-codex/blob/main/source/server.mjs): `source/server.mjs`
- [Sheet sync service](https://github.com/ashvall01/pm-codex/blob/main/source/src/services/gasSyncService.ts): `source/src/services/gasSyncService.ts`

### Other components

- **Project user**
- **Claude desktop**
- **User Google Sheet**

## Connections

- Project user → App routing: uses (evidence: `README.md`)
- App routing → Setup wizard: routes to (evidence: `source/src/App.tsx`)
- App routing → Timeline planning: routes to (evidence: `source/src/App.tsx`)
- App routing → Deliverables: routes to (evidence: `source/src/App.tsx`)
- App routing → Tasks and issues: routes to (evidence: `source/src/App.tsx`)
- App routing → Risk tracking: routes to (evidence: `source/src/App.tsx`)
- App routing → Meeting minutes: routes to (evidence: `source/src/App.tsx`)
- App routing → Other project areas: routes to (evidence: `source/src/App.tsx`)
- Tasks and issues → Task state: reads and updates (evidence: `source/src/features/Tasks/TasksTracker.tsx`)
- Task state → Archive rules: uses (evidence: `source/src/store/tasksStore.ts`)
- Deliverables state → Archive rules: uses (evidence: `source/src/store/deliverablesStore.ts`)
- Timeline state → Task state: reads (evidence: `source/src/store/timelineStore.ts`)
- Timeline state → Deliverables state: reads (evidence: `source/src/store/timelineStore.ts`)
- Project settings state → Browser storage: persists to
- Task state → Browser storage: persists to
- Timeline state → Browser storage: persists to
- Deliverables state → Browser storage: persists to
- Billing state → Browser storage: persists to
- Codex knowledge state → Browser storage: persists to
- Documents state → Browser storage: persists to
- Meeting state → Browser storage: persists to
- Risk state → Browser storage: persists to
- Stakeholder state → Browser storage: persists to
- Privacy glossary state → Browser storage: persists to
- Change request state → Browser storage: persists to
- AI session state → Browser storage: persists to
- App routing → Sheet sync service: tracks changes (evidence: `source/src/App.tsx`)
- Sheet sync service → User Google Sheet: syncs data (evidence: `README.md`)
- Project user → AI project context: requests assistance
- AI project context → PII sanitization: sanitizes context (evidence: `source/src/services/aiContextEngine.ts`)
- PII sanitization → Privacy glossary state: reads glossary (evidence: `source/src/utils/piiSanitization.ts`)
- AI project context → Proposal review: provides context
- Proposal review → Project user: requests signoff (evidence: `README.md`)
- Project user → Gemini assistant: optionally uses (evidence: `README.md`)
- Local app server → Gemini assistant: forwards calls (evidence: `README.md`)
- Project user → Claude desktop: optionally starts session (evidence: `README.md`)
- Claude desktop → MCP bridge server: requests project tools (evidence: `README.md`)
- Claude bridge client → MCP bridge server: communicates with
- MCP bridge server → Proposal review: files proposed changes (evidence: `README.md`)
