How malik-712/sanad works
Sanad is a browser-based isnād parser and hadith explorer, with separate pages for curated hadiths, narrator records, and source notes. The principal workflow is pasted isnād → model or rule-based reading → narrator-name linking → corpus matching and ranking → shared-chain graph and results. The README documents the corpus, privacy behavior, and curated-data capabilities; source-level edges are limited to relationships visible in the excerpts or SOURCE INDEX.
Main entry points: ExplorerResults.tsx Explorer results · ParseApp.tsx Parse interface · client.ts Reader coordinator · page.tsx Hadith page
Components 23
User experience
- Explorer page
app/page.tsx
Isnād reading
- Parse interface
components/parse/ParseApp.tsx - Reader coordinator
lib/ml/client.ts - Model worker
lib/ml/worker.ts - Rule parser
lib/parser/ruleParser.ts - Narrator linker
lib/linker/linker.ts
Corpus discovery
- Explorer results
components/explorer/ExplorerResults.tsx - Corpus access
lib/explorer/corpus.ts - Interactive tree
components/tree/IsnadTree.tsx
Curated records
- Hadith page
app/hadith/[id]/page.tsx - Hadith and route view
components/hadith/HadithView.tsx - Narrator page
app/narrator/[id]/page.tsx - Narrator details
components/panels/NarratorPanelBody.tsx - Curated data access
lib/data/load.ts - Sources page
app/sources/page.tsx - Corpus hadith page
app/c/page.tsx - Corpus entry view
components/explorer/CorpusHadith.tsx
Shared algorithms
- Arabic tokenizer
lib/parser/tokenize.ts - Isnād matching
lib/explorer/match.ts - Shared-chain graph
lib/explorer/graph.ts - Tree layout
lib/isnad/layout.ts - Record derivations
lib/data/derive.ts
Other components
- Visitor
Connections 26
- Visitor → Explorer page: opens
README.md - Explorer page → Parse interface: renders
app/page.tsx - Parse interface → Reader coordinator: reads text
components/parse/ParseApp.tsx - Reader coordinator → Model worker: dispatches tags
lib/ml/client.ts - Reader coordinator → Rule parser: falls back
lib/ml/client.ts - Reader coordinator → Arabic tokenizer: tokenizes
lib/ml/client.ts - Parse interface → Narrator linker: links names
components/parse/ParseApp.tsx - Parse interface → Explorer results: shows matches
components/parse/ParseApp.tsx - Explorer results → Corpus access: loads entries
components/explorer/ExplorerResults.tsx - Explorer results → Isnād matching: filters matches
components/explorer/ExplorerResults.tsx - Explorer results → Shared-chain graph: builds graph
components/explorer/ExplorerResults.tsx - Explorer results → Interactive tree: renders chain
components/explorer/ExplorerResults.tsx - Interactive tree → Tree layout: positions nodes
components/tree/IsnadTree.tsx - Visitor → Hadith page: opens record
README.md - Hadith page → Curated data access: loads hadith
app/hadith/[id]/page.tsx - Hadith page → Record derivations: derives status
app/hadith/[id]/page.tsx - Hadith page → Hadith and route view: renders routes
app/hadith/[id]/page.tsx - Hadith and route view → Interactive tree: shows tree
components/hadith/HadithView.tsx - Visitor → Narrator page: opens narrator
README.md - Narrator page → Curated data access: loads records
app/narrator/[id]/page.tsx - Narrator page → Record derivations: derives links
app/narrator/[id]/page.tsx - Narrator page → Narrator details: renders details
app/narrator/[id]/page.tsx - Visitor → Sources page: opens sources
README.md - Sources page → Curated data access: loads records
app/sources/page.tsx - Visitor → Corpus hadith page: opens entry
README.md - Corpus hadith page → Corpus entry view: renders entry
app/c/page.tsx