How sreypy/vactracker_intership works
VacTracker is a poultry and veterinary tracking application. Farmers and veterinarians use authenticated API endpoints to manage profiles and connections, flocks, vaccinations, and illness reports; the API also exposes vaccine reference data, notifications, and reminders. The graph focuses on the NestJS backend: the supplied frontend files are platform launchers, not the app’s feature implementation. Controller-to-service and sampled service dependencies are shown; links for unsampled subsystems are omitted where their runtime wiring is not evidenced.
Main entry points: sick-reports.service.ts Sick report handling · auth.service.ts OTP and sign-in · vaccinations.service.ts Vaccination records · notifications.service.ts Notification handling
Components 33
Identity and connections
- User endpoints
backend/src/users/users.controller.ts - User profiles
backend/src/users/users.service.ts - User and connections
backend/src/users/entities/user.entity.ts - Authentication endpoints
backend/src/auth/auth.controller.ts - OTP and sign-in
backend/src/auth/auth.service.ts - OTP records
backend/src/auth/entities/otp-code.entity.ts - OTP SMS sender
backend/src/auth/sms.service.ts
Flock and care records
- Flock endpoints
backend/src/flocks/flocks.controller.ts - Flock management
backend/src/flocks/flocks.service.ts - Flock records
backend/src/flocks/entities/flock.entity.ts - Vaccination endpoints
backend/src/vaccinations/vaccinations.controller.ts - Vaccination records
backend/src/vaccinations/vaccinations.service.ts - Vaccination data
backend/src/vaccinations/entities/vaccination.entity.ts
Veterinary workflows
- Sick report endpoints
backend/src/sick-reports/sick-reports.controller.ts - Sick report handling
backend/src/sick-reports/sick-reports.service.ts - Illness reports
backend/src/sick-reports/entities/sick-report.entity.ts - Vet connection requests
backend/src/vet/vet-connections.controller.ts - Connection decisions
backend/src/vet/vet-connections.service.ts - Vet dashboard
backend/src/vet/vet-dashboard.controller.ts - Farmer details
backend/src/vet/farmer-detail.controller.ts
Notifications and reminders
- Notification endpoints
backend/src/notifications/notifications.controller.ts - Notification handling
backend/src/notifications/notifications.service.ts - Notification records
backend/src/notifications/entities/notification.entity.ts - Reminder endpoints
backend/src/reminders/reminders.controller.ts - Reminder handling
backend/src/reminders/reminders.service.ts - Reminder scheduler
backend/src/reminders/reminder.scheduler.ts
Reference data
- Vaccine library endpoints
backend/src/vaccine-library/vaccine-library.controller.ts - Vaccine library
backend/src/vaccine-library/vaccine-library.service.ts - Vaccine endpoints
backend/src/vaccines/vaccines.controller.ts - Vaccine catalog
backend/src/vaccines/vaccines.service.ts - Vaccine data
backend/src/vaccines/entities/vaccine.entity.ts
Other components
- Farmers
- Veterinarians
Connections 40
- Farmers → Authentication endpoints: request access
- Veterinarians → Authentication endpoints: request access
- Authentication endpoints → OTP and sign-in: delegates
backend/src/auth/auth.controller.ts - OTP and sign-in → OTP records: reads and writes
backend/src/auth/auth.service.ts - OTP and sign-in → User and connections: looks up users
backend/src/auth/auth.service.ts - OTP and sign-in → OTP SMS sender: sends OTP
backend/src/auth/auth.service.ts - Farmers → User endpoints: manage profile
- User endpoints → User profiles: delegates
backend/src/users/users.controller.ts - User profiles → User and connections: uses user data
- Veterinarians → Vet connection requests: manage requests
- Vet connection requests → Connection decisions: delegates
backend/src/vet/vet-connections.controller.ts - Farmers → Flock endpoints: manage flocks
- Flock endpoints → Flock management: delegates
backend/src/flocks/flocks.controller.ts - Flock management → Flock records: uses flock data
backend/src/flocks/flocks.service.ts - Farmers → Vaccination endpoints: record vaccination
- Vaccination endpoints → Vaccination records: delegates
backend/src/vaccinations/vaccinations.controller.ts - Vaccination records → Vaccination data: uses records
backend/src/vaccinations/vaccinations.service.ts - Vaccination records → Flock records: uses flock data
backend/src/vaccinations/vaccinations.service.ts - Vaccination records → Vaccine data: uses vaccine data
backend/src/vaccinations/vaccinations.service.ts - Farmers → Sick report endpoints: report illness
- Veterinarians → Sick report endpoints: review reports
- Sick report endpoints → Sick report handling: delegates
backend/src/sick-reports/sick-reports.controller.ts - Sick report handling → Illness reports: uses report data
backend/src/sick-reports/sick-reports.service.ts - Sick report handling → Notification handling: creates notifications
backend/src/sick-reports/sick-reports.service.ts - Sick report handling → User and connections: uses user data
backend/src/sick-reports/sick-reports.service.ts - Sick report handling → Flock records: uses flock data
backend/src/sick-reports/sick-reports.service.ts - Sick report handling → User and connections: checks connections
backend/src/sick-reports/sick-reports.service.ts - Farmers → Notification endpoints: view notifications
- Veterinarians → Notification endpoints: view notifications
- Notification endpoints → Notification handling: dispatches by role
backend/src/notifications/notifications.controller.ts - Notification handling → Notification records: uses notification data
backend/src/notifications/notifications.service.ts - Notification handling → Vaccination data: uses vaccination data
backend/src/notifications/notifications.service.ts - Farmers → Reminder endpoints: manage reminders
- Reminder endpoints → Reminder handling: delegates
backend/src/reminders/reminders.controller.ts - Reminder handling → Reminder scheduler: scheduled integration
- Farmers → Vaccine library endpoints: browse vaccines
- Vaccine library endpoints → Vaccine library: delegates
backend/src/vaccine-library/vaccine-library.controller.ts - Farmers → Vaccine endpoints: browse vaccines
- Vaccine endpoints → Vaccine catalog: delegates
backend/src/vaccines/vaccines.controller.ts - Vaccine catalog → Vaccine data: uses vaccine data