How hardikghori/babybot works
BabyBot is a local web app for maintaining baby profiles and requesting age-based health advice. The principal workflow is browser interaction with the GraphQL endpoint, whose resolvers either read/write baby records or produce advice; advice currently uses the OpenRouter-backed response module when the LLM path is enabled. The README describes the app as local-first with no external APIs, which conflicts with the sampled implementation. The frontend source was not sampled, so its specific requests and rendering flow are not shown.
Main entry points: main.py FastAPI entry · resolvers.py GraphQL resolvers · models.py Baby model · index.html Web UI
Components 9
Web client
- Web UI
public/index.html
GraphQL API
- GraphQL schema
app/schema.graphql - FastAPI entry
app/main.py
Profiles and advice
- GraphQL resolvers
app/resolvers.py - Baby model
app/models.py - Advice adapter
app/simulate_llm.py
Persistence and integration
- SQLite database
app/models.py
Other components
- Caregiver
- OpenRouter API
Connections 9
- Caregiver → Web UI: uses
- Web UI → FastAPI entry: GraphQL requests
- FastAPI entry → GraphQL schema: loads schema
- FastAPI entry → GraphQL resolvers: dispatches fields
- FastAPI entry → Baby model: creates tables
- GraphQL resolvers → Baby model: queries and mutates
- Baby model → SQLite database: reads and writes
- GraphQL resolvers → Advice adapter: requests advice
- Advice adapter → OpenRouter API: sends prompt