# jabez175/field-pulse architecture

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

- Interactive diagram: https://gitdiagram.com/jabez175/field-pulse
- Repository: https://github.com/jabez175/field-pulse

## Overview

Field Pulse turns field reports, spreadsheets, and supervisor voice logs into reviewed, auditable schedule progress and simulated P6 updates. The principal flow runs from ingestion through extraction, normalization, matching and confidence assessment, planner approval or splitting, then schedule synchronization. The README documents additional analytics, audit, project-memory, delay, and live-schedule capabilities. Several view and service implementations were not sampled, so those branches are included from documented capabilities; their internal call paths are not asserted.

Main entry points: [`src/context/AppContext.tsx`](https://github.com/jabez175/field-pulse/blob/main/src/context/AppContext.tsx) (Application Context), [`server/server.ts`](https://github.com/jabez175/field-pulse/blob/main/server/server.ts) (REST API), [`src/services/matchingService.ts`](https://github.com/jabez175/field-pulse/blob/main/src/services/matchingService.ts) (Schedule Matching), [`src/views/DataIngestionView.tsx`](https://github.com/jabez175/field-pulse/blob/main/src/views/DataIngestionView.tsx) (Field Ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Field Progress Workflow"]
  node_ingestion["Field Ingestion"]
  node_time_agent["Time Agent<br/>[TimeAgentView.tsx]"]
  node_extraction["Event Extraction"]
  node_matching["Schedule Matching<br/>[matchingService.ts]"]
  node_planner["Planner Review"]
end

subgraph group_services["Domain Services"]
  node_normalization["Normalization"]
  node_duplicate["Duplicate Check"]
  node_synonyms["Engineering Synonyms"]
  node_confidence["Match Confidence"]
  node_approval["Approval and Gating<br/>[approvalService.ts]"]
end

subgraph group_persistence["State and Persistence"]
  node_schedule["Baseline Schedule"]
  node_state["Application Context<br/>[AppContext.tsx]"]
  node_browser_store[("Browser Storage<br/>[storageService.ts]")]
end

subgraph group_platform["API and Integration"]
  node_api_client["REST Client<br/>[apiService.ts]"]
  node_api_server["REST API<br/>[server.ts]"]
  node_sqlite[("SQLite Database<br/>[db.ts]")]
  node_p6_adapter["Mock P6 Adapter<br/>[mockP6Adapter.ts]"]
end

subgraph group_operations["Project Controls Views"]
  node_audit["Audit Trail<br/>[AuditTrailView.tsx]"]
  node_evidence["Evidence Trace"]
  node_analytics["Progress Analytics<br/>[AnalyticsView.tsx]"]
  node_live_schedule["Live Schedule"]
  node_memory["Project Memory"]
  node_linker["Schedule Linker"]
end

node_field_user(("Field Supervisor"))
node_p6_service{{"P6 PMIS"}}

node_field_user -->|"submits reports"| node_ingestion
node_field_user -->|"logs progress"| node_time_agent
node_ingestion -->|"ingests records"| node_state
node_state -->|"normalizes records"| node_normalization
node_state -->|"checks duplicates"| node_duplicate
node_state -->|"extracts events"| node_extraction
node_state -->|"matches events"| node_matching
node_matching -->|"uses synonyms"| node_synonyms
node_state -->|"scores matches"| node_confidence
node_state -->|"approves or splits"| node_approval
node_planner -.->|"reviews candidates"| node_state
node_approval -->|"updates progress"| node_schedule
node_state -->|"loads and saves"| node_browser_store
node_state -->|"persists remotely"| node_api_client
node_api_client -->|"sends REST requests"| node_api_server
node_api_server -->|"reads and writes"| node_sqlite
node_api_server -->|"records sync"| node_p6_adapter
node_p6_adapter -.->|"simulates sync"| node_p6_service
node_api_server -->|"records sync audit"| node_audit
node_evidence -.->|"displays trace"| node_state
node_analytics -.->|"presents metrics"| node_state
node_live_schedule -.->|"presents schedule"| node_state
node_memory -.->|"presents memory"| node_state
node_linker -.->|"supports linking"| node_matching

click node_ingestion "https://github.com/jabez175/field-pulse/blob/main/src/views/DataIngestionView.tsx"
click node_time_agent "https://github.com/jabez175/field-pulse/blob/main/src/views/TimeAgentView.tsx"
click node_extraction "https://github.com/jabez175/field-pulse/blob/main/src/services/extractionService.ts"
click node_normalization "https://github.com/jabez175/field-pulse/blob/main/src/services/normalizationService.ts"
click node_duplicate "https://github.com/jabez175/field-pulse/blob/main/src/services/duplicateService.ts"
click node_matching "https://github.com/jabez175/field-pulse/blob/main/src/services/matchingService.ts"
click node_synonyms "https://github.com/jabez175/field-pulse/blob/main/src/data/synonymDictionary.ts"
click node_confidence "https://github.com/jabez175/field-pulse/blob/main/src/services/confidenceService.ts"
click node_planner "https://github.com/jabez175/field-pulse/blob/main/src/views/PlannerReviewQueueView.tsx"
click node_approval "https://github.com/jabez175/field-pulse/blob/main/src/services/approvalService.ts"
click node_schedule "https://github.com/jabez175/field-pulse/blob/main/src/data/baselineSchedule.ts"
click node_state "https://github.com/jabez175/field-pulse/blob/main/src/context/AppContext.tsx"
click node_browser_store "https://github.com/jabez175/field-pulse/blob/main/src/services/storageService.ts"
click node_api_client "https://github.com/jabez175/field-pulse/blob/main/src/services/apiService.ts"
click node_api_server "https://github.com/jabez175/field-pulse/blob/main/server/server.ts"
click node_sqlite "https://github.com/jabez175/field-pulse/blob/main/server/db.ts"
click node_p6_adapter "https://github.com/jabez175/field-pulse/blob/main/src/services/mockP6Adapter.ts"
click node_audit "https://github.com/jabez175/field-pulse/blob/main/src/views/AuditTrailView.tsx"
click node_evidence "https://github.com/jabez175/field-pulse/blob/main/src/components/drawers/EvidenceTraceDrawer.tsx"
click node_analytics "https://github.com/jabez175/field-pulse/blob/main/src/views/AnalyticsView.tsx"
click node_live_schedule "https://github.com/jabez175/field-pulse/blob/main/src/views/LiveScheduleGanttView.tsx"
click node_memory "https://github.com/jabez175/field-pulse/blob/main/src/views/ProjectMemoryView.tsx"
click node_linker "https://github.com/jabez175/field-pulse/blob/main/src/views/ScheduleLinkerView.tsx"

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_ingestion,node_time_agent,node_extraction,node_matching,node_planner toneBlue
class node_normalization,node_duplicate,node_synonyms,node_confidence,node_approval toneAmber
class node_schedule,node_state,node_browser_store toneMint
class node_api_client,node_api_server,node_sqlite,node_p6_adapter toneRose
class node_audit,node_evidence,node_analytics,node_live_schedule,node_memory,node_linker,node_field_user,node_p6_service toneIndigo
```

## Components

### Field Progress Workflow

- [Field Ingestion](https://github.com/jabez175/field-pulse/blob/main/src/views/DataIngestionView.tsx): `src/views/DataIngestionView.tsx`
- [Time Agent](https://github.com/jabez175/field-pulse/blob/main/src/views/TimeAgentView.tsx): `src/views/TimeAgentView.tsx`
- [Event Extraction](https://github.com/jabez175/field-pulse/blob/main/src/services/extractionService.ts): `src/services/extractionService.ts`
- [Schedule Matching](https://github.com/jabez175/field-pulse/blob/main/src/services/matchingService.ts): `src/services/matchingService.ts`
- [Planner Review](https://github.com/jabez175/field-pulse/blob/main/src/views/PlannerReviewQueueView.tsx): `src/views/PlannerReviewQueueView.tsx`

### Domain Services

- [Normalization](https://github.com/jabez175/field-pulse/blob/main/src/services/normalizationService.ts): `src/services/normalizationService.ts`
- [Duplicate Check](https://github.com/jabez175/field-pulse/blob/main/src/services/duplicateService.ts): `src/services/duplicateService.ts`
- [Engineering Synonyms](https://github.com/jabez175/field-pulse/blob/main/src/data/synonymDictionary.ts): `src/data/synonymDictionary.ts`
- [Match Confidence](https://github.com/jabez175/field-pulse/blob/main/src/services/confidenceService.ts): `src/services/confidenceService.ts`
- [Approval and Gating](https://github.com/jabez175/field-pulse/blob/main/src/services/approvalService.ts): `src/services/approvalService.ts`

### State and Persistence

- [Baseline Schedule](https://github.com/jabez175/field-pulse/blob/main/src/data/baselineSchedule.ts): `src/data/baselineSchedule.ts`
- [Application Context](https://github.com/jabez175/field-pulse/blob/main/src/context/AppContext.tsx): `src/context/AppContext.tsx`
- [Browser Storage](https://github.com/jabez175/field-pulse/blob/main/src/services/storageService.ts): `src/services/storageService.ts`

### API and Integration

- [REST Client](https://github.com/jabez175/field-pulse/blob/main/src/services/apiService.ts): `src/services/apiService.ts`
- [REST API](https://github.com/jabez175/field-pulse/blob/main/server/server.ts): `server/server.ts`
- [SQLite Database](https://github.com/jabez175/field-pulse/blob/main/server/db.ts): `server/db.ts`
- [Mock P6 Adapter](https://github.com/jabez175/field-pulse/blob/main/src/services/mockP6Adapter.ts): `src/services/mockP6Adapter.ts`

### Project Controls Views

- [Audit Trail](https://github.com/jabez175/field-pulse/blob/main/src/views/AuditTrailView.tsx): `src/views/AuditTrailView.tsx`
- [Evidence Trace](https://github.com/jabez175/field-pulse/blob/main/src/components/drawers/EvidenceTraceDrawer.tsx): `src/components/drawers/EvidenceTraceDrawer.tsx`
- [Progress Analytics](https://github.com/jabez175/field-pulse/blob/main/src/views/AnalyticsView.tsx): `src/views/AnalyticsView.tsx`
- [Live Schedule](https://github.com/jabez175/field-pulse/blob/main/src/views/LiveScheduleGanttView.tsx): `src/views/LiveScheduleGanttView.tsx`
- [Project Memory](https://github.com/jabez175/field-pulse/blob/main/src/views/ProjectMemoryView.tsx): `src/views/ProjectMemoryView.tsx`
- [Schedule Linker](https://github.com/jabez175/field-pulse/blob/main/src/views/ScheduleLinkerView.tsx): `src/views/ScheduleLinkerView.tsx`

### Other components

- **Field Supervisor**
- **P6 PMIS**

## Connections

- Field Supervisor → Field Ingestion: submits reports (evidence: `README.md`)
- Field Supervisor → Time Agent: logs progress (evidence: `README.md`)
- Field Ingestion → Application Context: ingests records (evidence: `src/views/DataIngestionView.tsx`)
- Application Context → Normalization: normalizes records (evidence: `src/context/AppContext.tsx`)
- Application Context → Duplicate Check: checks duplicates (evidence: `src/context/AppContext.tsx`)
- Application Context → Event Extraction: extracts events (evidence: `src/context/AppContext.tsx`)
- Application Context → Schedule Matching: matches events (evidence: `src/context/AppContext.tsx`)
- Schedule Matching → Engineering Synonyms: uses synonyms (evidence: `src/services/matchingService.ts`)
- Application Context → Match Confidence: scores matches (evidence: `src/context/AppContext.tsx`)
- Application Context → Approval and Gating: approves or splits (evidence: `src/context/AppContext.tsx`)
- Planner Review → Application Context: reviews candidates
- Approval and Gating → Baseline Schedule: updates progress (evidence: `README.md`)
- Application Context → Browser Storage: loads and saves (evidence: `src/context/AppContext.tsx`)
- Application Context → REST Client: persists remotely (evidence: `src/context/AppContext.tsx`)
- REST Client → REST API: sends REST requests (evidence: `README.md`)
- REST API → SQLite Database: reads and writes (evidence: `server/server.ts`)
- REST API → Mock P6 Adapter: records sync (evidence: `server/server.ts`)
- Mock P6 Adapter → P6 PMIS: simulates sync (evidence: `README.md`)
- REST API → Audit Trail: records sync audit (evidence: `server/server.ts`)
- Evidence Trace → Application Context: displays trace
- Progress Analytics → Application Context: presents metrics
- Live Schedule → Application Context: presents schedule
- Project Memory → Application Context: presents memory
- Schedule Linker → Schedule Matching: supports linking
