How nimitsharma-03/ayurvedic-herb-drug-interaction-db works
The product is a literature-grounded herb–drug interaction database with a read-only API and a web interface for browsing, pair checks, and recommendations. Its data workflow harvests PubMed abstracts, extracts candidates, supports human curation, and seeds a SQLite read model; runtime recommendations classify a health query, retrieve options, and assess combination cautions. The README documents several pipeline links; source excerpts are partial, so unsampled implementation details and unverified wiring are omitted.
Main entry points: api.py JSON API · recommend.py Recommendation service · interactions.py Interaction lookup · seed.py Database seeding
Components 24
Evidence curation
- Abstract harvest
scripts/collect_abstracts.py - Candidate extraction
hdi/extract.py - Human curation
hdi/curate.py - Drug-label fetch
scripts/fetch_drug_labels.py - Reference validation
hdi/validate_reference.py
API and data
- Database seeding
hdi/seed.py - SQLite read model
hdi/db.py - JSON API
hdi/api.py - Medicine catalog
hdi/catalog.py - Interaction lookup
hdi/interactions.py - Knowledge and tags
hdi/knowledge.py - Health topics
hdi/topics.py - Database statistics
hdi/stats.py - Name normalization
hdi/normalize.py
Recommendations
- Recommendation service
hdi/recommend.py - Red-flag screening
hdi/safety.py
Web interface
- Browse and lookup UI
web/src/app - API client
web/src/lib/api.ts - Warning presentation
web/src/lib/warnings.ts
Condition classifier
- Condition inference
hdi/classify.py - Classifier dataset
ml/make_dataset.py - Classifier training
ml/train.py
Other components
- PubMed
- User
Connections 27
- PubMed → Abstract harvest: provides abstracts
- Abstract harvest → Candidate extraction: feeds abstracts
hdi/extract.py - Candidate extraction → Human curation: supplies candidates
- Human curation → Database seeding: provides verified records
- Drug-label fetch → Database seeding: provides label data
- Reference validation → Database seeding: validates inputs
- Database seeding → SQLite read model: builds read model
hdi/seed.py - JSON API → SQLite read model: queries
hdi/api.py - JSON API → Medicine catalog: routes catalog requests
hdi/api.py - JSON API → Interaction lookup: routes interaction checks
hdi/api.py - JSON API → Recommendation service: routes recommendations
hdi/api.py - JSON API → Health topics: routes topic lookups
hdi/api.py - JSON API → Database statistics: routes statistics
hdi/api.py - Recommendation service → Condition inference: classifies conditions
hdi/recommend.py - Recommendation service → Red-flag screening: screens red flags
hdi/recommend.py - Recommendation service → Medicine catalog: looks up options
hdi/recommend.py - Recommendation service → Interaction lookup: checks combinations
hdi/recommend.py - Recommendation service → Knowledge and tags: reads caution tags
hdi/recommend.py - Medicine catalog → Name normalization: normalizes names
hdi/catalog.py - Interaction lookup → Medicine catalog: resolves medicines
hdi/interactions.py - Interaction lookup → Name normalization: normalizes queries
hdi/interactions.py - User → Browse and lookup UI: uses
- Browse and lookup UI → API client: requests API data
- API client → JSON API: calls JSON API
- Warning presentation → Browse and lookup UI: formats warnings
- Classifier dataset → Classifier training: supplies training data
- Classifier training → Condition inference: exports inference model