# alexaarce04/epoch architecture

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

- Interactive diagram: https://gitdiagram.com/alexaarce04/epoch
- Repository: https://github.com/alexaarce04/epoch

## Overview

Epoch is a local forensic evidence explorer. Investigators load bundled public or synthetic recordings, or import JSON/CSV; the app validates and normalizes events, then filters and explores a UTC timeline, inspects and bookmarks events, and exports the visible subset with provenance and view metadata. Curated technique context is available through a local read-only API. Imports and bookmarks remain in browser memory; no evidence is uploaded. The graph follows shown calls and documented capabilities; some timeline rendering details are omitted by the partial page excerpt.

Main entry points: [`app/page.tsx`](https://github.com/alexaarce04/epoch/blob/main/app/page.tsx) (Timeline workspace), [`components/dataset-library.tsx`](https://github.com/alexaarce04/epoch/blob/main/components/dataset-library.tsx) (Dataset library), [`lib/datasets.ts`](https://github.com/alexaarce04/epoch/blob/main/lib/datasets.ts) (Dataset catalog), [`components/dataset-context.tsx`](https://github.com/alexaarce04/epoch/blob/main/components/dataset-context.tsx) (Recording context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Investigation UI"]
  node_workspace["Timeline workspace<br/>[page.tsx]"]
  node_dataset_library["Dataset library"]
  node_dataset_context["Recording context"]
end

subgraph group_workflow["Evidence workflow"]
  node_evidence_model["Evidence validation<br/>[evidence.ts]"]
end

subgraph group_catalog["Curated references"]
  node_dataset_catalog["Dataset catalog<br/>[datasets.ts]"]
  node_technique_catalog["Technique references<br/>[techniques.ts]"]
end

subgraph group_api["Read-only APIs"]
  node_datasets_api["Dataset endpoints<br/>[route.ts]"]
  node_dataset_api_detail["Dataset detail endpoint<br/>[route.ts]"]
  node_technique_api["Technique endpoint<br/>[route.ts]"]
end

subgraph group_presentation["Shared presentation"]
  node_brand["Brand settings<br/>[brand.ts]"]
  node_theme["Theme controls<br/>[theme-provider.tsx]"]
end

node_investigator(("Investigator"))

node_investigator -->|"uses"| node_workspace
node_workspace -->|"validates imports"| node_evidence_model
node_workspace -->|"opens library"| node_dataset_library
node_dataset_library -->|"requests catalog"| node_datasets_api
node_dataset_library -->|"loads recording"| node_dataset_api_detail
node_dataset_library -->|"validates events"| node_evidence_model
node_workspace -->|"loads bundled events"| node_dataset_catalog
node_datasets_api -->|"serves catalog"| node_dataset_catalog
node_dataset_api_detail -->|"looks up dataset"| node_dataset_catalog
node_workspace -->|"shows context"| node_dataset_context
node_dataset_context -->|"requests reference"| node_technique_api
node_technique_api -->|"looks up technique"| node_technique_catalog
node_workspace -->|"uses branding"| node_brand
node_workspace -->|"offers theme toggle"| node_theme

click node_workspace "https://github.com/alexaarce04/epoch/blob/main/app/page.tsx"
click node_dataset_library "https://github.com/alexaarce04/epoch/blob/main/components/dataset-library.tsx"
click node_dataset_context "https://github.com/alexaarce04/epoch/blob/main/components/dataset-context.tsx"
click node_evidence_model "https://github.com/alexaarce04/epoch/blob/main/lib/evidence.ts"
click node_dataset_catalog "https://github.com/alexaarce04/epoch/blob/main/lib/datasets.ts"
click node_technique_catalog "https://github.com/alexaarce04/epoch/blob/main/lib/techniques.ts"
click node_datasets_api "https://github.com/alexaarce04/epoch/blob/main/app/api/datasets/route.ts"
click node_dataset_api_detail "https://github.com/alexaarce04/epoch/blob/main/app/api/datasets/%5Bid%5D/route.ts"
click node_technique_api "https://github.com/alexaarce04/epoch/blob/main/app/api/techniques/%5Bid%5D/route.ts"
click node_brand "https://github.com/alexaarce04/epoch/blob/main/lib/brand.ts"
click node_theme "https://github.com/alexaarce04/epoch/blob/main/components/theme-provider.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_workspace,node_dataset_library,node_dataset_context toneBlue
class node_evidence_model toneAmber
class node_dataset_catalog,node_technique_catalog toneMint
class node_datasets_api,node_dataset_api_detail,node_technique_api toneRose
class node_brand,node_theme,node_investigator toneIndigo
```

## Components

### Investigation UI

- [Timeline workspace](https://github.com/alexaarce04/epoch/blob/main/app/page.tsx): `app/page.tsx`
- [Dataset library](https://github.com/alexaarce04/epoch/blob/main/components/dataset-library.tsx): `components/dataset-library.tsx`
- [Recording context](https://github.com/alexaarce04/epoch/blob/main/components/dataset-context.tsx): `components/dataset-context.tsx`

### Evidence workflow

- [Evidence validation](https://github.com/alexaarce04/epoch/blob/main/lib/evidence.ts): `lib/evidence.ts`

### Curated references

- [Dataset catalog](https://github.com/alexaarce04/epoch/blob/main/lib/datasets.ts): `lib/datasets.ts`
- [Technique references](https://github.com/alexaarce04/epoch/blob/main/lib/techniques.ts): `lib/techniques.ts`

### Read-only APIs

- [Dataset endpoints](https://github.com/alexaarce04/epoch/blob/main/app/api/datasets/route.ts): `app/api/datasets/route.ts`
- [Dataset detail endpoint](https://github.com/alexaarce04/epoch/blob/main/app/api/datasets/%5Bid%5D/route.ts): `app/api/datasets/[id]/route.ts`
- [Technique endpoint](https://github.com/alexaarce04/epoch/blob/main/app/api/techniques/%5Bid%5D/route.ts): `app/api/techniques/[id]/route.ts`

### Shared presentation

- [Brand settings](https://github.com/alexaarce04/epoch/blob/main/lib/brand.ts): `lib/brand.ts`
- [Theme controls](https://github.com/alexaarce04/epoch/blob/main/components/theme-provider.tsx): `components/theme-provider.tsx`

### Other components

- **Investigator**

## Connections

- Investigator → Timeline workspace: uses (evidence: `app/page.tsx`)
- Timeline workspace → Evidence validation: validates imports (evidence: `app/page.tsx`)
- Timeline workspace → Dataset library: opens library (evidence: `app/page.tsx`)
- Dataset library → Dataset endpoints: requests catalog (evidence: `components/dataset-library.tsx`)
- Dataset library → Dataset detail endpoint: loads recording (evidence: `components/dataset-library.tsx`)
- Dataset library → Evidence validation: validates events (evidence: `components/dataset-library.tsx`)
- Timeline workspace → Dataset catalog: loads bundled events (evidence: `app/page.tsx`)
- Dataset endpoints → Dataset catalog: serves catalog (evidence: `app/api/datasets/route.ts`)
- Dataset detail endpoint → Dataset catalog: looks up dataset (evidence: `app/api/datasets/[id]/route.ts`)
- Timeline workspace → Recording context: shows context (evidence: `app/page.tsx`)
- Recording context → Technique endpoint: requests reference (evidence: `components/dataset-context.tsx`)
- Technique endpoint → Technique references: looks up technique (evidence: `app/api/techniques/[id]/route.ts`)
- Timeline workspace → Brand settings: uses branding (evidence: `app/page.tsx`)
- Timeline workspace → Theme controls: offers theme toggle (evidence: `app/page.tsx`)
