Requirements
POST api/v1/activities -> activity
{
type : "ride"|"run"
}
PUT api/v1/activities/:activity_id -> activity
{
state: "start|pause|stop|completed"
}
POST api/v1/activities/:activity_id/routes -> activity
{
location: GPSCordinates
}
GET /activities?mode={USER|FRIENDS}&page={page}&pageSize={pageSize} -> Partial
// To get details of a particular activity
GET /activities/:activity_id
GET /activities/:activity_id
POST api/v1/sync/apple_health
POST api/v1/sync/garmin
GET api/v1/activities/export -> API to download activity data
Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.