# unknownbeliek/maya architecture

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

- Interactive diagram: https://gitdiagram.com/unknownbeliek/maya
- Repository: https://github.com/unknownbeliek/maya

## Overview

MAYA is a browser-first media-authenticity platform. A user uploads media or supplies a remote video URL; the frontend performs provenance, facial, and audio analysis, combines findings into an explainable score, and presents timestamped evidence with report exports. The optional Express backend resolves remote streams and can invoke Python AV-sync analysis. The README documents these capabilities, while the excerpts show selected calls; some connections to unsampled UI and forensic modules are therefore documented rather than source-verified.

Main entry points: [`frontend/maya-demo/src/pages/AnalysisPage.jsx`](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/pages/AnalysisPage.jsx) (Analysis workflow), [`backend/server.js`](https://github.com/unknownbeliek/maya/blob/main/backend/server.js) (Express API), [`frontend/maya-demo/src/App.jsx`](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/App.jsx) (MAYA app), [`frontend/maya-demo/src/components/fileUploader.jsx`](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/fileUploader.jsx) (File and URL input)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Media interface"]
  node_app["MAYA app<br/>[App.jsx]"]
  node_analysis_page["Analysis workflow<br/>[AnalysisPage.jsx]"]
  node_media_input["File and URL input<br/>[fileUploader.jsx]"]
  node_video_player["Media playback<br/>[VideoPlayer.js]"]
end

subgraph group_analysis["Forensic analysis"]
  node_metadata["Metadata and hashing<br/>[exifParser.js]"]
  node_file_analysis["File forensics<br/>[fileAnalyzer.js]"]
  node_classification["Signal classification<br/>[classifier.js]"]
  node_face_mesh["Facial landmark analysis<br/>[useFaceMesh.js]"]
  node_facial_metrics["Facial metrics<br/>[facial.js]"]
  node_audio_analysis["Audio kinematics<br/>[kinematics.js]"]
  node_sampling["Anomaly sampling<br/>[samplingEngine.js]"]
  node_scoring["Consensus scoring<br/>[scoringEngine.js]"]
end

subgraph group_results["Evidence and reporting"]
  node_dashboard["Score and evidence dashboard<br/>[Scorecard.jsx]"]
  node_timeline["Flagged-moment timeline"]
  node_reports["Forensic reports<br/>[reportGenerator.js]"]
  node_c2pa_export["Certificate export"]
end

subgraph group_backend["Optional backend"]
  node_backend_server["Express API<br/>[server.js]"]
  node_stream_resolution["Stream resolution<br/>[server.js]"]
  node_av_sync["Server AV analysis"]
end

node_user(("Media analyst"))

node_user -->|"opens"| node_app
node_app -->|"renders"| node_analysis_page
node_user -->|"provides media"| node_media_input
node_media_input -.->|"supplies input"| node_analysis_page
node_analysis_page -.->|"presents media"| node_video_player
node_analysis_page -->|"extracts provenance"| node_metadata
node_analysis_page -.->|"analyzes file"| node_file_analysis
node_analysis_page -.->|"classifies signals"| node_classification
node_analysis_page -->|"runs vision analysis"| node_face_mesh
node_face_mesh -->|"computes metrics"| node_facial_metrics
node_analysis_page -->|"analyzes audio"| node_audio_analysis
node_analysis_page -->|"builds timeline zones"| node_sampling
node_analysis_page -->|"scores layers"| node_scoring
node_analysis_page -->|"presents score"| node_dashboard
node_analysis_page -->|"presents anomalies"| node_timeline
node_analysis_page -->|"generates report"| node_reports
node_analysis_page -->|"offers certificate"| node_c2pa_export
node_user -.->|"requests remote analysis"| node_backend_server
node_backend_server -->|"resolves stream"| node_stream_resolution
node_backend_server -->|"runs analyzer"| node_av_sync
node_analysis_page -.->|"requests stream or AV sync"| node_backend_server

click node_app "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/App.jsx"
click node_analysis_page "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/pages/AnalysisPage.jsx"
click node_media_input "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/fileUploader.jsx"
click node_video_player "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/VideoPlayer.js"
click node_metadata "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/exifParser.js"
click node_file_analysis "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/fileAnalyzer.js"
click node_classification "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/classifier.js"
click node_face_mesh "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/hooks/useFaceMesh.js"
click node_facial_metrics "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/analysis/facial.js"
click node_audio_analysis "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/analysis/kinematics.js"
click node_sampling "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/samplingEngine.js"
click node_scoring "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/scoringEngine.js"
click node_dashboard "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/dashboard/Scorecard.jsx"
click node_timeline "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/dashboard/TimelineScrubber.jsx"
click node_reports "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/reportGenerator.js"
click node_c2pa_export "https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/reports/C2PAExportModal.jsx"
click node_backend_server "https://github.com/unknownbeliek/maya/blob/main/backend/server.js"
click node_stream_resolution "https://github.com/unknownbeliek/maya/blob/main/backend/server.js"
click node_av_sync "https://github.com/unknownbeliek/maya/blob/main/backend/av_sync_analyzer.py"

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_analysis_page,node_media_input,node_video_player toneBlue
class node_metadata,node_file_analysis,node_classification,node_face_mesh,node_facial_metrics,node_audio_analysis,node_sampling,node_scoring toneAmber
class node_dashboard,node_timeline,node_reports,node_c2pa_export toneMint
class node_backend_server,node_stream_resolution,node_av_sync toneRose
class node_user toneIndigo
```

## Components

### Media interface

- [MAYA app](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/App.jsx): `frontend/maya-demo/src/App.jsx`
- [Analysis workflow](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/pages/AnalysisPage.jsx): `frontend/maya-demo/src/pages/AnalysisPage.jsx`
- [File and URL input](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/fileUploader.jsx): `frontend/maya-demo/src/components/fileUploader.jsx`
- [Media playback](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/VideoPlayer.js): `frontend/maya-demo/src/components/VideoPlayer.js`

### Forensic analysis

- [Metadata and hashing](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/exifParser.js): `frontend/maya-demo/src/utils/forensics/exifParser.js`
- [File forensics](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/fileAnalyzer.js): `frontend/maya-demo/src/utils/forensics/fileAnalyzer.js`
- [Signal classification](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/classifier.js): `frontend/maya-demo/src/utils/forensics/classifier.js`
- [Facial landmark analysis](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/hooks/useFaceMesh.js): `frontend/maya-demo/src/hooks/useFaceMesh.js`
- [Facial metrics](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/analysis/facial.js): `frontend/maya-demo/src/analysis/facial.js`
- [Audio kinematics](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/analysis/kinematics.js): `frontend/maya-demo/src/analysis/kinematics.js`
- [Anomaly sampling](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/samplingEngine.js): `frontend/maya-demo/src/utils/forensics/samplingEngine.js`
- [Consensus scoring](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/scoringEngine.js): `frontend/maya-demo/src/utils/forensics/scoringEngine.js`

### Evidence and reporting

- [Score and evidence dashboard](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/dashboard/Scorecard.jsx): `frontend/maya-demo/src/components/dashboard/Scorecard.jsx`
- [Flagged-moment timeline](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/dashboard/TimelineScrubber.jsx): `frontend/maya-demo/src/components/dashboard/TimelineScrubber.jsx`
- [Forensic reports](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/utils/forensics/reportGenerator.js): `frontend/maya-demo/src/utils/forensics/reportGenerator.js`
- [Certificate export](https://github.com/unknownbeliek/maya/blob/main/frontend/maya-demo/src/components/reports/C2PAExportModal.jsx): `frontend/maya-demo/src/components/reports/C2PAExportModal.jsx`

### Optional backend

- [Express API](https://github.com/unknownbeliek/maya/blob/main/backend/server.js): `backend/server.js`
- [Stream resolution](https://github.com/unknownbeliek/maya/blob/main/backend/server.js): `backend/server.js`
- [Server AV analysis](https://github.com/unknownbeliek/maya/blob/main/backend/av_sync_analyzer.py): `backend/av_sync_analyzer.py`

### Other components

- **Media analyst**

## Connections

- Media analyst → MAYA app: opens
- MAYA app → Analysis workflow: renders (evidence: `frontend/maya-demo/src/App.jsx`)
- Media analyst → File and URL input: provides media
- File and URL input → Analysis workflow: supplies input
- Analysis workflow → Media playback: presents media
- Analysis workflow → Metadata and hashing: extracts provenance (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Analysis workflow → File forensics: analyzes file (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Analysis workflow → Signal classification: classifies signals (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Analysis workflow → Facial landmark analysis: runs vision analysis (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Facial landmark analysis → Facial metrics: computes metrics (evidence: `frontend/maya-demo/src/hooks/useFaceMesh.js`)
- Analysis workflow → Audio kinematics: analyzes audio (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Analysis workflow → Anomaly sampling: builds timeline zones (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Analysis workflow → Consensus scoring: scores layers (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Analysis workflow → Score and evidence dashboard: presents score (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Analysis workflow → Flagged-moment timeline: presents anomalies (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Analysis workflow → Forensic reports: generates report (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Analysis workflow → Certificate export: offers certificate (evidence: `frontend/maya-demo/src/pages/AnalysisPage.jsx`)
- Media analyst → Express API: requests remote analysis
- Express API → Stream resolution: resolves stream (evidence: `backend/server.js`)
- Express API → Server AV analysis: runs analyzer (evidence: `backend/server.js`)
- Analysis workflow → Express API: requests stream or AV sync
