How sridesiyan/mycelium works
Purpose and Entry Point
MYCELIUM is a client-side investigative intelligence workstation for converting fragmented drug-trafficking evidence into explainable, investigator-reviewed leads, hypotheses, and dossiers. The Next.js App Router entry is src/app/page.tsx, wrapped by global layout and styling in src/app/layout.tsx and src/app/globals.css.
Workstation Shell and Navigation
The workstation composes the principal analyst UI: tactical controls, intelligence rail, inspectors, command palette, status strip, and investigation dock. Its central assembly point is src/workstation/InvestigationWorkstation.tsx; shared shell framing is in src/components/layout/Shell.tsx. Persistent cross-module UI/state coordination is managed through src/store/intelligence.ts.
Evidence Model and Seeded Investigation
The domain model represents evidence, entities, relationships, cases/leads, and hypotheses through typed contracts in src/types/evidence.ts, src/types/entity.ts, and src/types/hypothesis.ts. The current application is seeded with an Orchid-47 scenario and mock fixtures rather than live source ingestion: src/data/orchid47Scene.ts and src/data/mock/fixtures.ts. This is the data boundary to replace when connecting operational sources.
Source Normalization Adapters
Source-specific adapters isolate external-data semantics from intelligence logic: blockchain, dark-web, OSINT, entity-resolution, graph, hypothesis, and temporal sources are represented under src/services/adapters/. Examples include src/services/adapters/blockchainAdapter.ts, src/services/adapters/darkwebAdapter.ts, and src/services/adapters/entityResolutionAdapter.ts. The adapter index, src/services/adapters/index.ts, is the integration seam for provider implementations.
Intelligence Pipeline and Decision Gates
The analytical flow is evidence sufficiency → multi-signal resolution → knowledge graph → competing hypotheses → explainable leads/dossier. Core stages reside in src/services/intelligence/sufficiencyGating.ts, src/services/intelligence/multiSignalResolution.ts, src/services/intelligence/knowledgeGraphEngine.ts, src/services/intelligence/explainableLeadEngine.ts, and src/services/intelligence/dossierGenerator.ts. Supporting decision algorithms include src/lib/sufficiency-gate.ts and src/lib/ach-engine.ts. These modules must preserve citations, alternatives, confidence rationale, and investigator review boundaries rather than produce automated attribution.
Investigation Views and Analyst Interaction
Feature views present each investigative lens—cases, evidence, entities, leads, graph, hypotheses, provenance, timeline, blockchain, and dark-web intelligence. Major orchestration surfaces include src/features/command-center/CommandCenter.tsx, src/features/investigation/GuidedInvestigation12Step.tsx, and src/features/investigation/InteractiveInvestigationFlow.tsx. The right-side contextual review boundary is implemented in src/components/investigation/RightContextInspector.tsx and src/panels/RightInvestigatorInspector.tsx.
Graph Visualization, Runtime, and Deployment
The graph is rendered as an interactive Three.js/WebGL scene with a UI component boundary and fallback-oriented visualization design: src/scenes/IntelligenceGraphScene.tsx, src/components/3d/EvidenceConstellation3D.tsx, and src/features/graph/GraphView.tsx. Runtime is Next.js 16, React 19, TypeScript, Zustand, and native Three.js; deployment targets Vercel via vercel.json. The repository currently exposes a static App Router surface, with external investigative systems expected to enter through adapters rather than direct UI coupling.
Main entry points: InvestigationWorkstation.tsx Investigation Workstation · knowledgeGraphEngine.ts Knowledge Graph Engine · explainableLeadEngine.ts Explainable Lead Engine · index.ts Source Adapter Index
Components 23
App Shell
- Next.js App Entry
src/app/page.tsx - Global Layout & Styles
src/app/layout.tsx - Investigation Workstation · Central assembly for the investigative workstation.
src/workstation/InvestigationWorkstation.tsx - Shell Frame
src/components/layout/Shell.tsx - Intelligence Store · Coordinates persistent cross-module UI state.
src/store/intelligence.ts
Data & Integration
- Evidence Domain Model · Evidence, entities, relationships, leads, and hypotheses.
src/types/evidence.ts - Orchid-47 Seed Data · Current data boundary before operational source ingestion.
src/data/orchid47Scene.ts - Mock Fixtures
src/data/mock/fixtures.ts - Source Adapter Index · Provider implementations enter intelligence logic here.
src/services/adapters/index.ts - Blockchain Adapter
src/services/adapters/blockchainAdapter.ts - Dark-web Adapter
src/services/adapters/darkwebAdapter.ts - Entity Resolution Adapter
src/services/adapters/entityResolutionAdapter.ts
Intelligence Pipeline
- Evidence Sufficiency Gate · Checks whether evidence supports further analysis.
src/services/intelligence/sufficiencyGating.ts - Multi-signal Resolution
src/services/intelligence/multiSignalResolution.ts - Knowledge Graph Engine
src/services/intelligence/knowledgeGraphEngine.ts - Competing Hypotheses · Maintains alternative explanations and confidence rationale.
src/lib/ach-engine.ts - Explainable Lead Engine · Produces cited, reviewable leads rather than attribution.
src/services/intelligence/explainableLeadEngine.ts - Dossier Generator
src/services/intelligence/dossierGenerator.ts
Investigation UI
- Investigation Views · Guided and interactive case, evidence, entity, lead, and hypothesis views.
src/features/investigation/GuidedInvestigation12Step.tsx - Command Center
src/features/command-center/CommandCenter.tsx - Right Context Inspector · Contextual human-review boundary for findings.
src/components/investigation/RightContextInspector.tsx
Graph Visualization
- Graph View
src/features/graph/GraphView.tsx - Intelligence Graph Scene · Interactive visualization with fallback-oriented design.
src/scenes/IntelligenceGraphScene.tsx
Connections 27
- Next.js App Entry → Global Layout & Styles: wrapped by
- Next.js App Entry → Investigation Workstation: renders
- Global Layout & Styles → Shell Frame: frames
- Shell Frame → Investigation Workstation: hosts
- Investigation Workstation → Intelligence Store: coordinates through
- Orchid-47 Seed Data → Mock Fixtures: uses
- Orchid-47 Seed Data → Evidence Domain Model: conforms to
- Mock Fixtures → Evidence Domain Model: conforms to
- Blockchain Adapter → Source Adapter Index: registers through
- Dark-web Adapter → Source Adapter Index: registers through
- Entity Resolution Adapter → Source Adapter Index: registers through
- Source Adapter Index → Evidence Sufficiency Gate: normalizes source data for
- Orchid-47 Seed Data → Evidence Sufficiency Gate: currently supplies
- Evidence Sufficiency Gate → Multi-signal Resolution: sufficient evidence
- Multi-signal Resolution → Knowledge Graph Engine: resolved signals
- Knowledge Graph Engine → Competing Hypotheses: relationship evidence
- Competing Hypotheses → Explainable Lead Engine: alternatives and rationale
- Knowledge Graph Engine → Explainable Lead Engine: graph context
- Explainable Lead Engine → Dossier Generator: explainable leads
- Investigation Workstation → Command Center: composes
- Investigation Workstation → Investigation Views: composes
- Investigation Workstation → Right Context Inspector: provides review context
- Explainable Lead Engine → Right Context Inspector: presents for review
- Dossier Generator → Investigation Views: surfaces
- Knowledge Graph Engine → Graph View: visualizes
- Graph View → Intelligence Graph Scene: renders with
- Intelligence Graph Scene → Investigation Workstation: embedded in