title | emoji | colorFrom | colorTo | sdk | short_description |
---|---|---|---|---|---|
DrugX |
π |
blue |
purple |
docker |
AI Platform for Preventing Dangerous Drug Mixes |
DrugX is an AI tool that checks medicine interactions to prevent dangerous side effects and keep patients safe.
It works by:
- Standardizing medicine names (so brand, generic, or even misspelled names are recognized).
- Checking for known interactions using trusted medical databases.
- Looking at real-world safety reports from the FDAβs adverse event system.
- Summarizing the results with AI into clear risk levels and safety notes.
This way, DrugX helps patients and clinicians avoid harmful drug combinations while staying simple to use and medically reliable.
Development Tools:
- Python 3.11.x (not 3.12+)
- uv package manager
- Docker Desktop
- Make:
- Windows:
winget install GnuWin32.Make
- macOS:
brew install make
- Linux:
sudo apt install make
- Windows:
- The backend is built around specialized API clients (
rxnorm
,openfda
,ddinter
, andpubchem
) that handle normalization, interaction lookups, and adverse event retrieval. - The frontend is a Streamlit app that lets users enter medications, runs the analysis pipeline, and displays results with clear risk levels and safety notes.
- For data analysis, a Jupyter notebook (
data/notebooks/data_exploration.ipynb
) was used for EDA of the DDInter dataset, ensuring data quality and consistency before loading it into PostgreSQL.
-
Clone the Repository:
git clone https://github.com/lisekarimi/drugx.git cd drugx
-
Set Up Environment:
cp .env.example .env # fill in API keys and DB URI uv sync
-
Environment Variables Required:
Check .env.example
β all required environment variables are listed there.
Detailed documentation for each component (RxNorm, DDInter, OpenFDA, PubChem, LLM, Monitoring, and testing) is available in the project Wiki.
Start services (app + database + jupyter):
make up
DrugX follows a modular, plug-and-play design:
- Workflow: Normalize drug names β check interactions (DDInter) β fetch adverse events (OpenFDA) β summarize with AI.
- Components: RxNorm, DDInter, OpenFDA, PubChem, LLM, and Monitoring.
- Extensible: New data sources or databases can be added easily without changing the core pipeline.
π Read the full architecture documentation
Run tests:
make test
Other test commands are available in the Makefile.
π Read the full testing documentation
- Lint & Fix:
make lint
|make fix
- Hooks:
make install-hooks
- Secrets: Gitleaks scans for sensitive data
- CI/CD: GitHub Actions runs build, lint, and tests
- DB: Use PostgreSQL in a cloud environment (e.g. Supabase, which offers free session pooling for concurrent access).
- Hugging Face Spaces: Deployment triggered manually via GitHub Actions when "deploy" is committed (see
.github/workflows/deploy-hf.yml
for details)
This project includes Kubernetes deployment files for cloud deployment on GCP, AWS, or local clusters:
# Deploy to Kubernetes cluster
make k8s-build
make k8s-deploy
make k8s-url
The same YAML files can be used to deploy on Google Kubernetes Engine (GKE), Amazon EKS, or any Kubernetes cluster.
- DrugX is a clinical decision support tool, not a prescribing authority.
- No hallucinated mechanisms: only DDInter + curated rules.
- Disclaimers included when no interaction is found.