A full-stack hydration assistant that logs daily water intake, stores history, and uses an LLM to generate personalized feedback in real time.
- Combines a clean Streamlit UX with an AI feedback loop so the user gets instant, actionable insights.
- Persists intake history in SQLite and visualizes trends over time with built-in charts.
- Exposes a FastAPI backend for programmatic logging and retrieval, enabling future mobile or wearable integrations.
- Log water intake per user and receive AI-generated hydration guidance.
- View historical intake data as a table and line chart.
- FastAPI endpoints for logging and history lookup.
- Simple local setup with
.env-based OpenAI API configuration.
- Python
- Streamlit UI
- FastAPI + Pydantic
- SQLite
- LangChain + OpenAI
dashboard.pyhandles the Streamlit user interface.src/api.pyexposes REST endpoints for intake logging and history.src/database.pywrites and reads fromwater_tracker.db.src/agent.pyinvokes the LLM for hydration analysis.
pip install -r requirements.txtCreate a .env file with your OpenAI key:
OPENAI_API_KEY=your_key_herestreamlit run dashboard.pyuvicorn src.api:app --reloadPOST /log-intake- Body:
{ "user_id": "user_123", "intake_ml": 1000 }
- Body:
GET /history/{user_id}
.
+-- dashboard.py
+-- src
� +-- agent.py
� +-- api.py
� +-- database.py
� +-- logger.py
+-- requirements.txt
+-- water_tracker.db
A simple, fast, and visually clean hydration tracker that blends practical data logging with AI-driven coaching.