How thirstybrain/medi-mind works
Project type and purpose
• This is a full-stack AI-powered healthcare chatbot.
• Frontend: React + TypeScript chat UI (Material UI + Axios).
• Backend: Python Django app (Haystack NLP pipeline, pymed article fetcher, HuggingFace Mixtral inference).
• Purpose: accept medical queries via a chat interface, retrieve PubMed articles, run an AI model, and return concise answers.
File structure
• Top-level:
• medi-mind-backend/… – Django project (“medi_minds”) with one app (“chatbot”), uses manage.py, settings.py, ASGI/WSGI entrypoints, local SQLite in development, .env for HUGGINGFACE_API_KEY.
• medi-minds-ui/… – React app (create-react-app TypeScript scaffold): src/, public/, package.json, tsconfig.json.
• Patterns & conventions:
• “chatbot/pipeline.py” encapsulates the NLP pipeline stages (keyword extraction → PubMed fetch → model inference).
• “views.py” + “urls.py” expose REST endpoints (e.g. POST /api/ask/).
• Frontend “Chatbot.tsx” calls backend via Axios.
Extract key architectural notes from README
• Backend stack: Haystack pipeline, pymed, HuggingFace Serverless Inference API.
• Frontend stack: React + Material UI + Axios.
• One main public API endpoint: POST /api/ask/.
• Dev vs. prod considerations: SQLite in dev, environment-based secrets, suggestions for Docker, reverse proxy, cloud services.