🇪🇸 Leer en Español | 🇬🇧 Read in English
Clinical nutritional bioinformatics SaaS platform for healthcare professionals
Genomic Analysis · MSK Evidence · Pharmacological Interactions · Professional Clinical Reports
Overview · Features · Architecture · Installation · API · Databases · License
NutriKen is intended for clinical education and decision support. It does not replace professional medical judgment, individualized patient evaluation, local clinical guidelines, or review by a qualified healthcare professional. The evidence shown by the system is sourced from public databases (MSKCC, NCBI, PubMed) and must be rigorously verified by the clinician before any therapeutic or nutritional intervention.
- Regulatory Status: NutriKen is for Research Use Only (RUO). Not for use in diagnostic or therapeutic procedures.
- Data Privacy: The platform operates as a decision-support utility and does not store or process patient-identifiable information (PII) or protected health information (PHI).
- Infrastructure Note: Deployed and hosted on Hugging Face Spaces
NutriKen is a clinical nutritional bioinformatics platform designed for nutritionists, physicians, clinical pharmacists, and health educators. It integrates clinical evidence from Memorial Sloan Kettering Cancer Center (MSK), NCBI Gene, Ensembl, KEGG Pathway, and PubMed/PMC into a single engine that generates professional reports regarding the relationship between supplements, drugs, genes, and clinical conditions.
Unlike generic web search engines, NutriKen delivers:
- Concrete molecular mechanisms (CYP3A4, AMPK, NF-κB, GLP-1, HMGCR…)
- Quantified effect magnitudes (not just "has higher evidence" but "reduces TG 20-30% with 2-4 g/day of EPA+DHA")
- Pharmacological interactions classified by severity (critical / caution / monitor) alongside their mechanism of action and clinical recommendation
- Studied dosages and explicit contraindications
- Scientific bibliography indexed in Vancouver style
🌐 Live Production Demo: kenryu007-nutriken.hf.space
|
Natural language search by condition (obesity, hypertension, diabetes, dyslipidemia, vitamin deficiencies…). Returns:
|
Molecular analysis of one or multiple genes (MTHFR, VDR, FTO, LCT, APOE…):
A–Z alphabetical catalog of 307 indexed herbs:
|
|
A visual, clinical-client style editor that automatically generates A4 multi-page reports with smart pagination:
|
|
The clinical engine resolves both broad phenotypic natural language terms and specific Single Nucleotide Polymorphisms (SNPs) synchronously, mapping the entire biological cascade without hardcoded limits:
- User Input:
rs9939609(The high-risk genetic variant for adiposity) - Dynamic Locus Resolution: Automatically maps to FTO (Chr16 · ENSG00000140718)
- Polygenic Network Expansion: Interrogates co-expression and triggers cascading parallel lookups for interacting nodes: MC4R, LEP, LEPR, and PPARG.
- Functional Annotation: Integrates directly with KEGG Pathway hsa04920 (Adipocytokine signaling pathway - Homo sapiens).
- Clinical Output: Generates targeted MSK-backed supplement evidence with quantified effect magnitudes and custom multi-page A4 print layout.
- Dark theme with gold (#C8A96E) and teal (#4FC3A1) accents — palette inspired by premium medical interfaces
- Clinical typography: DM Serif Display (headers), DM Sans (body), IBM Plex Mono (technical data), Spectral (emphasis)
- Audience-separated cards: "For Patients" block (gold, accessible language) + "For Healthcare Professionals" block (teal, technical language)
- Consistent FontAwesome iconography across subsections
- Interaction severity color-coded: critical (red) · caution (amber) · monitor (blue)
- Responsive grid and custom visible gold scrollbar
┌──────────────────────────────────────────────────────────────────────┐
│ FRONTEND (HTML/JS/CSS) │
│ index.html · script.js · style.css (single-page application) │
│ • SPA Navigation · Paginated A4 Editor · PDF/MD-zip Export │
│ • _es() Helper for automatic ES/EN mapping │
└──────────────────────────────────────────────────────────────────────┘
│
HTTP/REST │ (FastAPI, Open CORS)
▼
┌──────────────────────────────────────────────────────────────────────┐
│ BACKEND (Python 3.11 · FastAPI · Uvicorn) │
│ nutriken_engine.py │
│ ┌─────────────────┬─────────────────┬──────────────────────────┐ │
│ │ API endpoints │ Core Analysis │ Report Generation │ │
│ │ /api/clinical │ CLINICAL_MAP │ /api/report-pdf │ │
│ │ /api/gene │ analyze_ │ Native reportlab A4 │ │
│ │ /api/nutrient │ interactions │ Vancouver Bibliography │ │
│ │ /api/herbs- │ DESCRIPTIONS │ │ │
│ │ index │ (18 cond.) │ │ │
│ └─────────────────┴─────────────────┴──────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────┘
│ │
│ httpx REST httpx + SQLite cache
▼ ▼
┌──────────────────┐ ┌────────────────────────────────┐
│ Supabase (PG) │ │ External Sources │
│ 307 Spanish │ │ • MSK Integrative Medicine │
│ herbs │ │ • NCBI Gene + Ensembl REST │
│ msk_herbs table │ │ • KEGG Pathway API │
└──────────────────┘ │ • PubMed/PMC eUtils │
│ • MyGene.info │
└────────────────────────────────┘
│ │
└──────────────┬───────────────────────────────┘
▼
┌──────────────────────────────┐
│ Local SQLite cache │
│ • herb_cache · gene_cache │
│ • query_log │
└──────────────────────────────┘
| Decision | Justification |
|---|---|
| FastAPI + static HTML in root | Lightweight deployment on HF Spaces Docker. No compilation, no SSR, no JS framework. Load time < 1s. |
| Supabase publishable key via direct REST httpx | The supabase Python client 2.3.4 rejects the new key format (sb_publishable_...). The REST API accepts it — simpler and no extra dependency. |
| Local SQLite cache | Reduces calls to NCBI eUtils (limited to 3 req/s without API key). Persists across container restarts. |
| 307 pre-translated herbs in Supabase | Live scraping + translation is slow (~30s per herb) and consumes Google Translate quota. Pre-loading enables responses < 200ms. |
| MSK scraping fallback | If an herb is not in Supabase, the engine falls back to live scraping from MSK (with BeautifulSoup) instead of failing. |
| A4 client-side pagination | Recursive nkPaginateReport algorithm with pageStack that splits sections while respecting atomic cards. No heavy external library. |
| Reportlab for PDF | Server-side clinical PDF generation without native dependencies (no wkhtmltopdf, headless Chrome, etc.). Works on any Docker. |
- Python 3.11
- FastAPI 0.109 — asynchronous HTTP framework
- Uvicorn 0.27 — ASGI server
- httpx 0.26 — asynchronous HTTP client (Supabase REST + NCBI + KEGG)
- BeautifulSoup4 + lxml — MSK parsing
- reportlab 4.0 — A4 PDF generation
- Pydantic 2.5 — model validation
- SQLite3 (stdlib) — local cache
- HTML5 / CSS3 / Vanilla JS — no frameworks or build system
- FontAwesome 6.4 — iconography
- JSZip 3.10 — compressed Markdown export
- Google Fonts: DM Serif Display · DM Sans · IBM Plex Mono · Spectral
- Hugging Face Spaces (Docker SDK) — production hosting
- Supabase PostgreSQL — Spanish herb database
- GitHub — version control
- MSK Integrative Medicine Herbs Database — clinical evidence
- NCBI Gene & PubMed eUtils — genomic and bibliographic information
- Ensembl REST API — genomic IDs and variants
- KEGG Pathway — metabolic routes
- MyGene.info — genomic ID aggregator
- PharmGKB (1,642 gene–chemical relationships, CC BY-SA)
- Tapirro (592 herb–drug interactions, EMA/HMPC/ESCOP)
- Python 3.11+
- Internet access to query external sources
- (Optional) Supabase account with populated
msk_herbstable
# 1. Clone the repo
git clone https://github.com/abrangel/Nutriken.git
cd Nutriken
# 2. Install dependencies
pip install -r requirements.txt
# 3. (Optional) Environment variables for Supabase
export SUPABASE_URL="https://your-project.supabase.co"
export SUPABASE_KEY="sb_publishable_xxxxxxxxxxxx"
# 4. Launch the server
python nutriken_engine.py
# → http://localhost:7860The included Dockerfile works out-of-the-box. Just create a Docker Space, connect this repo, and publish:
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY nutriken_engine.py index.html script.js style.css ./
EXPOSE 7860
CMD ["python", "nutriken_engine.py"]##🔌 API
Analyzes a clinical condition in natural language (Spanish or English).
{ "query": "obesity" }Response:
{
"condition": "Obesity",
"description": "**Clinical overview.** Obesity is a chronic disease...",
"genes": [{"symbol": "FTO", "name": "...", "ensembl_id": "ENSG...", ...}],
"pathway": {"id": "hsa04920", "name": "Adipocytokine signaling pathway", ...},
"supplements": [/* 7 herbs with all fields in Spanish */],
"drug_alerts": [{"drug": "...", "herb": "...", "severity_tone": "crit|warn|info", ...}],
"food_alerts": [...],
"references": [/* 6 PubMed refs */]
}Genomic analysis (one or more comma-separated genes).
{ "genes": ["MTHFR", "VDR", "FTO"] }Complete profile of a supplement or herb.
{ "nutrient": "berberine" }Returns the 307 herbs grouped alphabetically. Cached for 30 minutes.
{
"total": 307,
"letters": ["A", "B", "C", ..., "Z", "#"],
"by_letter": { "A": [{"slug": "acai-berry", "name": "Acai Berry", ...}, ...] }
}Generates an A4 clinical PDF from the result of any previous endpoint.
{
"data": { /* full response from /api/clinical */ },
"report_id": "NK-ABC123",
"date": "May 22, 2026"
}Response: application/pdf (multi-page, Vancouver bibliography).
Real-time usage statistics.
Health check for monitoring.
| Column | Type | Description |
|---|---|---|
slug |
TEXT (PK) | URL-friendly identifier (green-tea, milk-thistle…) |
name |
TEXT | Common name |
scientific_name |
TEXT | Scientific name (binomial) |
common_names |
JSONB | List of alternative names |
what_is_it |
TEXT | Description for patients |
clinical_summary |
TEXT | Technical clinical summary |
mechanism_of_action |
TEXT | Molecular mechanism of action |
purported_uses |
JSONB | Supported clinical uses |
benefits |
JSONB | Potential benefits (patient language) |
dosage |
TEXT | Studied doses |
adverse_reactions |
TEXT | Adverse reactions |
contraindications |
TEXT | Contraindications |
drug_interactions |
JSONB | List of herb–drug interactions |
food_interactions |
JSONB | Food interactions |
side_effects |
JSONB | Side effects |
warnings |
JSONB | Critical warnings |
url |
TEXT | Link to original MSK monograph |
The full schema is in supabase_schema.sql.
herb_cache— cached MSK responsesgene_cache— cached NCBI/Ensembl recordsquery_log— query audit log
| Scenario | NutriKen Output |
|---|---|
| Patient with obesity loses 2 kg/week | Automatic alert: rapid loss → risk of gallstones. Suggests prophylactic UDCA 300-600 mg/day. |
| Patient takes atorvastatin and drinks grapefruit juice | Critical alert: CYP3A4 inhibition → AUC × 2.5 → risk of myopathy/rhabdomyolysis. Suggests switching to rosuvastatin or pravastatin. |
| Patient with diabetes starts berberine | Alert: additive effect with metformin/insulin → risk of hypoglycemia. Monitor capillary glucose. |
| Patient with MTHFR C677T heterozygous | Suggests L-methylfolate (active form) instead of standard folic acid. Pair with B12. |
| Strict vegan on metformin | Alert: frequent B12 deficiency. Recommends cyanocobalamin 1000 µg/day oral. |
| Pre-bariatric surgery patient | Prophylactic UDCA 300-600 mg/day during rapid loss phase. Baseline micronutrient supplementation. |
┌─────────────────────────────────────────────────┐
│ 18 clinical conditions with extensive analysis │
│ 307 herbs indexed in Spanish │
│ 100+ genes with verified ENSG │
│ 592 herb–drug interactions (EMA/HMPC) │
│ 1,642 gene–chemical relationships (PharmGKB) │
│ Live access to NCBI, Ensembl, KEGG, PubMed │
└─────────────────────────────────────────────────┘
Obesity · Weight loss · Triglycerides · Cholesterol · Atorvastatin/Statins · Silymarin · Fatty liver · Inflammation · Hypertension · Diabetes · Gallstones · Gut microbiota · Lactose intolerance · Celiac disease · Vitamin D deficiency · Folate deficiency (MTHFR) · B12 deficiency
|
César Manzo Creator and lead architect of Kenryu and NutriKen
|
Connected to the Kenryu project
|
This project is available under the MIT License for academic and research use. For clinical production use, please consult the author.
Medical disclaimer: NutriKen is a clinical decision support tool. It does not replace professional judgment or individual patient evaluation. The evidence shown comes from public sources (MSK, NCBI, PubMed) and must be verified by the healthcare professional before any intervention.
Contributions are welcome, especially in:
- Translations of additional MSK monographs
- Clinical validation of condition descriptions
- New drug interactions documented in literature
- UI/UX improvements
- Backend performance optimizations
To contribute:
1. Fork the repo
2. Create a feature branch: git checkout -b feature/my-improvement
3. Commit: git commit -m "feat: clear description"
4. Push: git push origin feature/my-improvement
5. Open a Pull Request