How whansel007/pawtner works
Pawtner is a phone-first medication-adherence companion: seniors record doses, blood pressure and walks, while a caretaker can review activity and escalation settings. The mobile app and caretaker pages use the API for documented live workflows; API handlers delegate to a PostgreSQL repository, which applies deterministic shared rules and assembles results. The graph also retains the prototype’s medication, proof, reminder and companion-dog experiences. Some screen-to-API details and repository internals are unsampled, so those links rely on README statements rather than inferred call chains.
Main entry points: App.tsx Phone app · repository.ts Domain repository · api.ts API client · CareApp.tsx Caretaker app
Components 18
Senior companion
- Phone app
mobile/src/App.tsx - Care routines
mobile/src/screens - Medication setup
mobile/src/screens/PrescriptionScreen.tsx - Dose proof
mobile/src/screens/ProofScreen.tsx - Dog companion
mobile/src/config/scene.ts - API client
mobile/src/lib/api.ts
Caretaker view
- Caretaker app
mobile/src/care/CareApp.tsx - Caretaker data
mobile/src/care/hooks/useCareData.ts
API and persistence
- API routes
api/[...path].ts - Request handlers
api/handlers.ts - Domain repository
api/repository.ts - PostgreSQL
Shared decisions
- Input selectors
shared/selectors.ts - Decision rules
shared/rules.ts - Safe wording
shared/wording.ts - Decision templates
shared/templates.ts
Other components
- Senior
- Caretaker
Connections 17
- Senior → Phone app: uses
README.md - Phone app → Care routines: renders
mobile/src/App.tsx - Phone app → Medication setup: renders
mobile/src/App.tsx - Phone app → Dose proof: renders
mobile/src/App.tsx - Phone app → Dog companion: configures
mobile/src/config/scene.ts - Phone app → API client: requests data
README.md - Caretaker → Caretaker app: uses
README.md - Caretaker app → Caretaker data: loads
mobile/src/care/CareApp.tsx - Caretaker data → API client: requests data
mobile/src/care/hooks/useCareData.ts - API client → API routes: calls
README.md - API routes → Request handlers: dispatches
api/[...path].ts - Request handlers → Domain repository: delegates
api/handlers.ts - Domain repository → PostgreSQL: reads and writes
api/repository.ts - Domain repository → Input selectors: builds inputs
api/repository.ts - Domain repository → Decision rules: evaluates
api/repository.ts - Domain repository → Safe wording: applies wording
api/repository.ts - Decision rules → Decision templates: uses
shared/rules.ts