Add activity update:
POST/PUT /activity/activity-type/{activity-type}
every activity will have their own APIs and separated in the backend
response-codes: 200, 401, 403, 404, 500
response: activities of last 2 weeks for the user with pagination-id
GET /activity/activity-type/{activity-type}
response-codes: 200, 401, 403, 404, 500
this API will have pagination possibility
response: activities of last 2 weeks
there are things to add about the API, skipping for now
tables: running, cycling, swimming, strength training, flexibility and balance, sports (basketball, soccer etc)
column names will be the entries here under the sport types:
Running/Walking:
Distance (miles/km)
Duration (minutes)
Average speed (mph/kmh)
Pace (min/mile or min/km)
Calories burned
Heart rate (if applicable)
Cycling:
Distance
Duration
Average speed
Elevation gain/loss
Calories burned
Heart rate
Swimming:
Laps completed
Distance (meters/yards)
Duration
Stroke count (for advanced tracking)
Average pace
Calories burned
Strength Training:
Weight lifted (load)
Repetitions
Sets completed
Duration of workout
Time under tension
Calories burned
Flexibility and Balance (Yoga/Pilates):
Duration of each session
Number of poses practiced
Focus on breathing techniques
Calories burned
Heart rate
Sports (e.g., Basketball, Soccer):
Duration of play
Distance ran
Number of goals/successful shots
Calories burned
Heart rate
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Explain any trade offs you have made and why you made certain tech choices...
Try to discuss as many failure scenarios/bottlenecks as possible.
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?