# sanjayram3269/proofpoint architecture

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

- Interactive diagram: https://gitdiagram.com/sanjayram3269/proofpoint
- Repository: https://github.com/sanjayram3269/proofpoint

## Overview

ProofPoint ingests environmental imagery, records metadata and provenance, checks duplicates and verification, and supports pairing, comparison, search, and public impact Stories. The principal workflow runs from authenticated upload through server-side analysis and persistence, then into evidence browsing and reporting. The graph follows documented routes and excerpted calls; several page-to-API links are supported by the SOURCE INDEX, while some backend capabilities are documented in the README but their implementation was not sampled.

Main entry points: [`server/src/app.js`](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/app.js) (Express API), [`server/src/controllers/assetController.js`](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/assetController.js) (Asset controller), [`client/src/api/client.js`](https://github.com/sanjayram3269/proofpoint/blob/master/client/src/api/client.js) (API client), [`server/src/controllers/reportController.js`](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/reportController.js) (Story reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Frontend experience"]
  node_app["Route views<br/>[App.jsx]"]
  node_uploadview["Upload view<br/>[Upload.jsx]"]
  node_reportview["Reports view<br/>[Reports.jsx]"]
  node_storyview["Public Stories<br/>[Story.jsx]"]
  node_api_client["API client<br/>[client.js]"]
  node_authctx["Session context<br/>[AuthContext.jsx]"]
  node_projectctx["Project context<br/>[ProjectContext.jsx]"]
end

subgraph group_api["API and identity"]
  node_apiapp["Express API<br/>[app.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_assetroutes["Asset routes<br/>[assetRoutes.js]"]
  node_reportroutes["Report routes<br/>[reportRoutes.js]"]
  node_searchroutes["Search routes<br/>[searchRoutes.js]"]
  node_comparroutes["Compare routes<br/>[compareRoutes.js]"]
  node_pairroutes["Pair routes<br/>[pairRoutes.js]"]
  node_authcontroller["Identity controller<br/>[authController.js]"]
end

subgraph group_evidence["Evidence processing"]
  node_assetcontroller["Asset controller<br/>[assetController.js]"]
  node_exif["EXIF extraction<br/>[exifService.js]"]
  node_hash["Duplicate hashing<br/>[hashService.js]"]
  node_verify["Verification checks<br/>[verifyService.js]"]
end

subgraph group_insight["Analysis and publishing"]
  node_gemini["AI analysis<br/>[gemini.js]"]
  node_searchcontroller["Semantic search"]
  node_comparecontroller["Before/after comparison"]
  node_paircontroller["Suggested pairs<br/>[pairController.js]"]
  node_reportcontroller["Story reports"]
end

subgraph group_state["Persistence and media"]
  node_assetmodel[("Evidence records<br/>[Asset.js]")]
  node_reportmodel[("Report records<br/>[Report.js]")]
  node_projectmodel[("Project records<br/>[Project.js]")]
  node_cloudinary[("Cloudinary media")]
end

node_user(("Field user"))
node_public(("Public visitor"))
node_google{{"Google sign-in"}}

node_user -->|"uses"| node_app
node_public -->|"opens"| node_storyview
node_app -->|"routes to"| node_uploadview
node_app -->|"routes to"| node_reportview
node_app -->|"routes to"| node_storyview
node_uploadview -->|"uploads through"| node_api_client
node_reportview -->|"requests through"| node_api_client
node_projectctx -->|"loads projects"| node_api_client
node_authctx -->|"uses"| node_api_client
node_api_client -.->|"calls API"| node_apiapp
node_apiapp -->|"mounts"| node_authroutes
node_apiapp -->|"mounts"| node_assetroutes
node_apiapp -->|"mounts"| node_reportroutes
node_apiapp -->|"mounts"| node_searchroutes
node_apiapp -->|"mounts"| node_comparroutes
node_apiapp -->|"mounts"| node_pairroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_assetroutes -->|"dispatches"| node_assetcontroller
node_reportroutes -->|"dispatches"| node_reportcontroller
node_searchroutes -->|"dispatches"| node_searchcontroller
node_comparroutes -->|"dispatches"| node_comparecontroller
node_pairroutes -.->|"dispatches"| node_paircontroller
node_authcontroller -.->|"verifies token"| node_google
node_assetcontroller -->|"extracts metadata"| node_exif
node_assetcontroller -->|"checks duplicates"| node_hash
node_assetcontroller -->|"uploads media"| node_cloudinary
node_assetcontroller -->|"analyzes imagery"| node_gemini
node_assetcontroller -->|"verifies evidence"| node_verify
node_assetcontroller -->|"persists records"| node_assetmodel
node_comparecontroller -->|"loads assets"| node_assetmodel
node_comparecontroller -->|"compares imagery"| node_gemini
node_searchcontroller -->|"searches records"| node_assetmodel
node_searchcontroller -->|"embeds query"| node_gemini
node_paircontroller -->|"loads candidates"| node_assetmodel
node_reportcontroller -->|"reads and updates"| node_assetmodel
node_reportcontroller -->|"loads project"| node_projectmodel
node_reportcontroller -->|"generates narrative"| node_gemini
node_reportcontroller -->|"stores report"| node_reportmodel
node_storyview -.->|"loads story"| node_api_client

click node_app "https://github.com/sanjayram3269/proofpoint/blob/master/client/src/App.jsx"
click node_uploadview "https://github.com/sanjayram3269/proofpoint/blob/master/client/src/pages/Upload.jsx"
click node_reportview "https://github.com/sanjayram3269/proofpoint/blob/master/client/src/pages/Reports.jsx"
click node_storyview "https://github.com/sanjayram3269/proofpoint/blob/master/client/src/pages/Story.jsx"
click node_api_client "https://github.com/sanjayram3269/proofpoint/blob/master/client/src/api/client.js"
click node_authctx "https://github.com/sanjayram3269/proofpoint/blob/master/client/src/context/AuthContext.jsx"
click node_projectctx "https://github.com/sanjayram3269/proofpoint/blob/master/client/src/context/ProjectContext.jsx"
click node_apiapp "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/app.js"
click node_authroutes "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/authRoutes.js"
click node_assetroutes "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/assetRoutes.js"
click node_reportroutes "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/reportRoutes.js"
click node_searchroutes "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/searchRoutes.js"
click node_comparroutes "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/compareRoutes.js"
click node_pairroutes "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/pairRoutes.js"
click node_authcontroller "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/authController.js"
click node_assetcontroller "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/assetController.js"
click node_exif "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/services/exifService.js"
click node_hash "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/services/hashService.js"
click node_verify "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/services/verifyService.js"
click node_gemini "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/services/gemini.js"
click node_searchcontroller "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/searchController.js"
click node_comparecontroller "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/compareController.js"
click node_paircontroller "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/pairController.js"
click node_reportcontroller "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/reportController.js"
click node_assetmodel "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/models/Asset.js"
click node_reportmodel "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/models/Report.js"
click node_projectmodel "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/models/Project.js"
click node_cloudinary "https://github.com/sanjayram3269/proofpoint/blob/master/server/src/services/cloudinaryService.js"

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_uploadview,node_reportview,node_storyview,node_api_client,node_authctx,node_projectctx,node_user toneBlue
class node_apiapp,node_authroutes,node_assetroutes,node_reportroutes,node_searchroutes,node_comparroutes,node_pairroutes,node_authcontroller toneAmber
class node_assetcontroller,node_exif,node_hash,node_verify toneMint
class node_gemini,node_searchcontroller,node_comparecontroller,node_paircontroller,node_reportcontroller toneRose
class node_assetmodel,node_reportmodel,node_projectmodel,node_cloudinary,node_public,node_google toneIndigo
```

## Components

### Frontend experience

- [Route views](https://github.com/sanjayram3269/proofpoint/blob/master/client/src/App.jsx): `client/src/App.jsx`
- [Upload view](https://github.com/sanjayram3269/proofpoint/blob/master/client/src/pages/Upload.jsx): `client/src/pages/Upload.jsx`
- [Reports view](https://github.com/sanjayram3269/proofpoint/blob/master/client/src/pages/Reports.jsx): `client/src/pages/Reports.jsx`
- [Public Stories](https://github.com/sanjayram3269/proofpoint/blob/master/client/src/pages/Story.jsx): `client/src/pages/Story.jsx`
- [API client](https://github.com/sanjayram3269/proofpoint/blob/master/client/src/api/client.js): `client/src/api/client.js`
- [Session context](https://github.com/sanjayram3269/proofpoint/blob/master/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Project context](https://github.com/sanjayram3269/proofpoint/blob/master/client/src/context/ProjectContext.jsx): `client/src/context/ProjectContext.jsx`

### API and identity

- [Express API](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/app.js): `server/src/app.js`
- [Auth routes](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/authRoutes.js): `server/src/routes/authRoutes.js`
- [Asset routes](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/assetRoutes.js): `server/src/routes/assetRoutes.js`
- [Report routes](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/reportRoutes.js): `server/src/routes/reportRoutes.js`
- [Search routes](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/searchRoutes.js): `server/src/routes/searchRoutes.js`
- [Compare routes](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/compareRoutes.js): `server/src/routes/compareRoutes.js`
- [Pair routes](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/routes/pairRoutes.js): `server/src/routes/pairRoutes.js`
- [Identity controller](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/authController.js): `server/src/controllers/authController.js`

### Evidence processing

- [Asset controller](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/assetController.js): `server/src/controllers/assetController.js`
- [EXIF extraction](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/services/exifService.js): `server/src/services/exifService.js`
- [Duplicate hashing](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/services/hashService.js): `server/src/services/hashService.js`
- [Verification checks](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/services/verifyService.js): `server/src/services/verifyService.js`

### Analysis and publishing

- [AI analysis](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/services/gemini.js): `server/src/services/gemini.js`
- [Semantic search](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/searchController.js): `server/src/controllers/searchController.js`
- [Before/after comparison](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/compareController.js): `server/src/controllers/compareController.js`
- [Suggested pairs](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/pairController.js): `server/src/controllers/pairController.js`
- [Story reports](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/controllers/reportController.js): `server/src/controllers/reportController.js`

### Persistence and media

- [Evidence records](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/models/Asset.js): `server/src/models/Asset.js`
- [Report records](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/models/Report.js): `server/src/models/Report.js`
- [Project records](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/models/Project.js): `server/src/models/Project.js`
- [Cloudinary media](https://github.com/sanjayram3269/proofpoint/blob/master/server/src/services/cloudinaryService.js): `server/src/services/cloudinaryService.js`

### Other components

- **Field user**
- **Public visitor**
- **Google sign-in**

## Connections

- Field user → Route views: uses (evidence: `client/src/App.jsx`)
- Public visitor → Public Stories: opens
- Route views → Upload view: routes to (evidence: `client/src/App.jsx`)
- Route views → Reports view: routes to (evidence: `client/src/App.jsx`)
- Route views → Public Stories: routes to (evidence: `client/src/App.jsx`)
- Upload view → API client: uploads through (evidence: `client/src/pages/Upload.jsx`)
- Reports view → API client: requests through (evidence: `client/src/pages/Reports.jsx`)
- Project context → API client: loads projects (evidence: `client/src/context/ProjectContext.jsx`)
- Session context → API client: uses (evidence: `client/src/context/AuthContext.jsx`)
- API client → Express API: calls API
- Express API → Auth routes: mounts (evidence: `server/src/app.js`)
- Express API → Asset routes: mounts (evidence: `server/src/app.js`)
- Express API → Report routes: mounts (evidence: `server/src/app.js`)
- Express API → Search routes: mounts (evidence: `server/src/app.js`)
- Express API → Compare routes: mounts (evidence: `server/src/app.js`)
- Express API → Pair routes: mounts (evidence: `server/src/app.js`)
- Auth routes → Identity controller: dispatches (evidence: `server/src/routes/authRoutes.js`)
- Asset routes → Asset controller: dispatches (evidence: `server/src/routes/assetRoutes.js`)
- Report routes → Story reports: dispatches (evidence: `server/src/routes/reportRoutes.js`)
- Search routes → Semantic search: dispatches (evidence: `server/src/routes/searchRoutes.js`)
- Compare routes → Before/after comparison: dispatches (evidence: `server/src/routes/compareRoutes.js`)
- Pair routes → Suggested pairs: dispatches
- Identity controller → Google sign-in: verifies token
- Asset controller → EXIF extraction: extracts metadata (evidence: `server/src/controllers/assetController.js`)
- Asset controller → Duplicate hashing: checks duplicates (evidence: `server/src/controllers/assetController.js`)
- Asset controller → Cloudinary media: uploads media (evidence: `server/src/controllers/assetController.js`)
- Asset controller → AI analysis: analyzes imagery (evidence: `server/src/controllers/assetController.js`)
- Asset controller → Verification checks: verifies evidence (evidence: `server/src/controllers/assetController.js`)
- Asset controller → Evidence records: persists records (evidence: `server/src/controllers/assetController.js`)
- Before/after comparison → Evidence records: loads assets (evidence: `server/src/controllers/compareController.js`)
- Before/after comparison → AI analysis: compares imagery (evidence: `server/src/controllers/compareController.js`)
- Semantic search → Evidence records: searches records (evidence: `server/src/controllers/searchController.js`)
- Semantic search → AI analysis: embeds query (evidence: `server/src/controllers/searchController.js`)
- Suggested pairs → Evidence records: loads candidates (evidence: `server/src/controllers/pairController.js`)
- Story reports → Evidence records: reads and updates (evidence: `server/src/controllers/reportController.js`)
- Story reports → Project records: loads project (evidence: `server/src/controllers/reportController.js`)
- Story reports → AI analysis: generates narrative (evidence: `server/src/controllers/reportController.js`)
- Story reports → Report records: stores report (evidence: `server/src/controllers/reportController.js`)
- Public Stories → API client: loads story
