How ilyassokhlal/companion-pet-health-tracker works
Companion is a shared-API pet health tracker with web and Android clients. Owners authenticate, manage pet profiles and health records, use photo galleries and reminders, track weight, walks, feeding and expenses, and ask a reference-grounded AI assistant questions about their pets. Premium access and account administration are additional product capabilities. The README documents the cross-client workflow and feature set; source excerpts and the index confirm key backend entry points and internal dependencies, but many domain routers and client screens were not sampled.
Main entry points: main.py FastAPI service · records.py Pets and records · App.tsx Web app · index.tsx Android app
Components 21
Owner clients
- Web app
frontend-web/src/App.tsx - Android app
frontend-mobile/src/app/(tabs)/index.tsx - Web API client
frontend-web/src/api/client.ts - Mobile API client
frontend-mobile/src/api/client.ts
API and identity
- FastAPI service
backend/main.py - Authentication
backend/routers/auth.py - Session security
backend/utils/security.py
Pet records and tracking
- Pets and records
backend/routers/records.py - Activity tracking
backend/routers - Photo processing
backend/utils/photos.py - Scheduling reminders
backend/utils/reminders.py - Owner exports
backend/utils/export.py
Care assistant
- RAG answer pipeline
backend/rag.py - Pet question endpoint
backend/routers/ask.py
Access and operations
- SQL database
backend/database.py - Domain models
backend/models/models.py - Premium and limits
backend/utils/access.py - Billing integration
backend/routers/billing.py - Email reminders
backend/utils/mailer.py - Admin dashboard
backend/admin.py
Other components
- Pet owner
Connections 21
- Pet owner → Web app: uses
README.md - Pet owner → Android app: uses
README.md - Web app → Web API client: requests
- Android app → Mobile API client: requests
- Web API client → FastAPI service: calls shared API
README.md - Mobile API client → FastAPI service: calls shared API
README.md - FastAPI service → Authentication: routes
backend/main.py - Authentication → Session security: authenticates
backend/routers/auth.py - FastAPI service → Pets and records: routes
backend/main.py - FastAPI service → Activity tracking: routes
backend/main.py - Pets and records → Photo processing: processes uploads
backend/routers/records.py - Pets and records → Owner exports: exports data
backend/routers/records.py - FastAPI service → Pet question endpoint: routes
backend/main.py - Pet question endpoint → RAG answer pipeline: gets grounded answers
backend/routers/ask.py - FastAPI service → Billing integration: routes
backend/main.py - Billing integration → Premium and limits: checks account access
backend/routers/billing.py - FastAPI service → SQL database: opens sessions
backend/main.py - SQL database → Domain models: maps domain data
backend/models/models.py - FastAPI service → Scheduling reminders: schedules jobs
backend/main.py - Scheduling reminders → Email reminders: sends reminders
backend/utils/reminders.py - Pet owner → Admin dashboard: uses private dashboard
README.md