-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
FeatureHigh PriorityStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programbackendgood first issueGood for newcomersGood for newcomers
Description
Description:
Create a system to track pet weight over time and alert owners about weight changes.
What You'll Build:
A weight tracking feature that helps pet owners monitor their pet's health by recording weight measurements and showing trends.
Files to Create:
backend/src/weight-tracking/
├── weight-tracking.module.ts
├── weight-tracking.controller.ts
├── weight-tracking.service.ts
├── entities/
│ └── weight-entry.entity.ts
└── dto/
└── create-weight-entry.dto.ts
Step-by-Step Tasks:
- Create weight-tracking module:
nest g module weight-tracking - Create controller:
nest g controller weight-tracking - Create service:
nest g service weight-tracking - Create WeightEntry entity (id, petId, weight, date, notes)
- Add relationship to Pet entity
- Create POST /pets/:petId/weight endpoint (add weight entry)
- Create GET /pets/:petId/weight endpoint (get weight history)
- Add weight trend calculation (gaining/losing/stable)
- Add weight alerts for significant changes
- Calculate ideal weight range by breed
- Write tests
API Endpoints:
POST /pets/:petId/weight - Add weight entry
GET /pets/:petId/weight - Get weight history
GET /pets/:petId/weight/trends - Get weight trends
DELETE /pets/:petId/weight/:id - Delete weight entryDatabase Schema:
weight_entries: id, pet_id, weight, unit, date, notes, created_atAcceptance Criteria:
- ✅ Users can record pet weight with date
- ✅ Weight history returned in chronological order
- ✅ Calculate weight trends (gaining/losing/stable)
- ✅ Alert if weight change > 10% in 30 days
- ✅ Support kg and lbs units
- ✅ Graph-ready data format
- ✅ Tests with 80%+ coverage
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FeatureHigh PriorityStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programbackendgood first issueGood for newcomersGood for newcomers