Common Problems
Strava
Understanding the Problem
🏃♂️🚴♀️ What is Strava?
Strava is a fitness tracking application that allows users to record and share their physical activities, primarily focusing on running and cycling, with their network. It provides detailed analytics on performance, routes, and allows social interactions among users.
While Strava supports a wide variety of activities, we'll focus on running and cycling for this question.
Functional Requirements
Core Requirements
- Users should be able to start, pause, stop, and save their runs and rides.
- While running or cycling, users should be able to view activity data, including route, distance, and time.
- Users should be able to view details about their own completed activities as well as the activities of their friends.
Below the Line (Out of Scope)
- Adding or deleting friends (friend management).
- Authentication and authorization.
- Commenting or liking runs.
Non-Functional Requirements
Core Requirements
- The system should be highly available (availability >> consistency).
- The app should function in remote areas without network connectivity.
- The app should provide the athlete with accurate and up-to-date local statistics during the run/ride.
- The system should scale to support 10 million concurrent activities.
The Set Up
Defining the Core Entities
The API
High-Level Design
1) Users should be able to start, pause, stop, and save their runs and rides.
2) While running or cycling, users should be able to view activity data, including route, distance, and time.
3) Users should be able to view details about their own completed activities as well as the activities of their friends.
Potential Deep Dives
1) How can we support tracking activities while offline?
2) How can we scale to support 10 million concurrent activities?
3) How can we support realtime sharing of activities with friends?
4) How can we expose a leaderboard of top athletes?
Final Design
Purchase Premium to Keep Reading
Unlock this article and so much more with Hello Interview Premium
