How farheenaiml/lineage works
LINEAGE is a full-stack investigation platform for tracing suspected synthetic-identity abuse. Investigators authenticate, create a case, upload media for detection and fingerprinting, add sources and evidence, then examine propagation, attribution gaps, and reports; graph Q&A, geographic analysis, ML intelligence, web discovery, and case automation extend that workflow. The graph follows documented frontend routing/API boundaries and backend registration plus sampled calls. Many route-to-service implementations were not sampled, so uncertain internal links are omitted.
Main entry points: main.py FastAPI application · api.ts Typed API client · App.tsx App routing · web_search.py Image web discovery
Components 27
Investigator app
- App routing
frontend/src/App.tsx - Case state
frontend/src/context/CaseContext.tsx - Typed API client
frontend/src/lib/api.ts - Case workflow screens
frontend/src/screens/Investigations.tsx - Media upload
frontend/src/screens/UploadDetection.tsx - Propagation map
frontend/src/components/geo/PropagationMap.tsx - ML intelligence UI
frontend/src/components/ml/MLIntelligence.tsx - Case automation UI
frontend/src/screens/CaseAutomation.tsx
API and identity
- FastAPI application
backend/app/main.py - Authentication routes
backend/app/routers/auth.py - Session authorization
backend/app/deps.py
Investigation records
- Investigation routes
backend/app/routers/incidents.py - Media routes
backend/app/routers/media.py - Sources and evidence
backend/app/routers/sources.py - Attribution and reports
backend/app/routers/attribution.py - Automation routes
backend/app/routers/automation.py
Analysis capabilities
- Geographic analysis
backend/app/routers/geo.py - Investigation graph
backend/app/routers/graph.py - Graph RAG copilot
backend/app/services/graph_rag.py - ML intelligence
backend/app/routers/ml.py - Image web discovery
backend/app/routers/web_search.py - Face fingerprinting
backend/app/services/face_embedding.py
Storage and graph
- Encrypted media storage
backend/app/services/file_storage.py - SQL records
backend/app/db/session.py - Neo4j graph store
backend/app/services/neo4j_service.py
Other components
- Investigator
- Gemini query service
Connections 34
- Investigator → App routing: uses
frontend/src/App.tsx - App routing → Case state: wraps screens
frontend/src/App.tsx - App routing → Case workflow screens: routes to
frontend/src/App.tsx - App routing → Media upload: routes to
frontend/src/App.tsx - Case state → Typed API client: requests case data
frontend/src/context/CaseContext.tsx - Case workflow screens → Case state: reads case state
frontend/src/screens/Investigations.tsx - Media upload → Case state: uploads through
frontend/src/screens/UploadDetection.tsx - Typed API client → FastAPI application: calls API
frontend/src/lib/api.ts - FastAPI application → Authentication routes: registers routes
backend/app/main.py - FastAPI application → Investigation routes: registers routes
backend/app/main.py - FastAPI application → Media routes: registers routes
backend/app/main.py - FastAPI application → Sources and evidence: registers routes
backend/app/main.py - FastAPI application → Attribution and reports: registers routes
backend/app/main.py - FastAPI application → Geographic analysis: registers routes
backend/app/main.py - FastAPI application → Investigation graph: registers routes
backend/app/main.py - FastAPI application → ML intelligence: registers routes
backend/app/main.py - FastAPI application → Automation routes: registers routes
backend/app/main.py - FastAPI application → Image web discovery: registers routes
backend/app/main.py - FastAPI application → Graph RAG copilot: registers route
backend/app/main.py - Authentication routes → Session authorization: uses authorization
backend/app/routers/auth.py - Session authorization → SQL records: queries user
backend/app/deps.py - Investigation routes → SQL records: reads and writes
backend/app/routers/incidents.py - Geographic analysis → SQL records: reads records
backend/app/routers/geo.py - Image web discovery → Encrypted media storage: reads decrypted media
backend/app/routers/web_search.py - Image web discovery → Gemini query service: requests search queries
backend/app/routers/web_search.py - Image web discovery → SQL records: stores search runs
backend/app/routers/web_search.py - FastAPI application → Neo4j graph store: initializes graph store
backend/app/main.py - Propagation map → Typed API client: requests map data
frontend/src/components/geo/PropagationMap.tsx - ML intelligence UI → Typed API client: requests ML results
frontend/src/components/ml/MLIntelligence.tsx - Case automation UI → Typed API client: requests automation
frontend/src/screens/CaseAutomation.tsx - Media routes → Encrypted media storage: stores encrypted uploads
- Media routes → Face fingerprinting: fingerprints media
- Investigation graph → Neo4j graph store: uses graph persistence
- Investigation graph → Graph RAG copilot: supplies graph context