How theusinhoiost/pettracker-backend works
PetTracker is a NestJS REST backend for account access and pet-care records. The main workflow is a client authenticating, then managing owned pets and their images; weight and vaccine records and notification state are separate user-facing branches. Authentication also supports Google sign-in and refresh-token exchange. The tree and README establish PostgreSQL and S3 capabilities, but service implementations and module wiring for several branches were not sampled, so those connections are shown only where documented or directly supported.
Main entry points: main.ts NestJS API bootstrap · auth.service.ts Auth workflows · auth.controller.ts Auth endpoints · pet.service.ts Pet workflows
Components 25
Identity and access
- Auth endpoints
src/auth/auth.controller.ts - Auth workflows
src/auth/auth.service.ts - JWT strategies
src/auth/jwt.strategy.ts - Google strategy
src/auth/google.strategy.ts
Account management
- User endpoints
src/user/user.controller.ts - User workflows
src/user/user.service.ts - User records
src/user/entities/user.entity.ts
Pet care records
- Pet endpoints
src/pet/pet.controller.ts - Pet workflows
src/pet/pet.service.ts - Pet records
src/pet/entities/pet.entity.ts - Vaccine endpoints
src/pet/vaccine/vaccine.controller.ts - Vaccine workflows
src/pet/vaccine/vaccine.service.ts - Vaccine records
src/pet/vaccine/entities/vaccine.entity.ts - Weight endpoints
src/pet/weight/weight.controller.ts - Weight workflows
src/pet/weight/weight.service.ts - Weight records
src/pet/weight/entities/weight.entity.ts
Storage and uploads
- Image storage
src/common/s3/s3.service.ts
Notifications
- Notification endpoints
src/notifications/notifications.controller.ts - Notification workflows
src/notifications/notifications.service.ts - Notification records
src/notifications/entities/notification.entity.ts
Other components
- Frontend client
- Google OAuth
- NestJS API bootstrap
src/main.ts - AWS S3
- PostgreSQL
Connections 26
- Frontend client → NestJS API bootstrap: sends requests
- NestJS API bootstrap → Auth endpoints: serves routes
- NestJS API bootstrap → User endpoints: serves routes
- NestJS API bootstrap → Pet endpoints: serves routes
- NestJS API bootstrap → Vaccine endpoints: serves routes
- NestJS API bootstrap → Weight endpoints: serves routes
- NestJS API bootstrap → Notification endpoints: serves routes
- Auth endpoints → Auth workflows: calls
- Auth workflows → User workflows: looks up user
- Auth workflows → JWT strategies: signs tokens
- Auth endpoints → Google strategy: guards callback
- Google OAuth → Google strategy: authenticates
- Google strategy → Auth endpoints: provides identity
- Auth workflows → PostgreSQL: reads and writes
- User endpoints → User workflows: calls
- User workflows → PostgreSQL: persists accounts
- Pet endpoints → Pet workflows: calls
- Pet workflows → Image storage: uploads images
- Image storage → AWS S3: stores objects
- Pet workflows → PostgreSQL: persists pets
- Vaccine endpoints → Vaccine workflows: calls
- Vaccine workflows → PostgreSQL: persists records
- Weight endpoints → Weight workflows: calls
- Weight workflows → PostgreSQL: persists records
- Notification endpoints → Notification workflows: calls
- Notification workflows → PostgreSQL: reads and writes