Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...
It should be able to fetch daily calories burnt or other metrics like steps.
To fetch history to show users streak and consistency.
api to automatic sync data across devices when they open app or login
Notification api to remind of pending goals to complete to encourage users with motivating quotes
API to set goals
api to keep updating steps or progress via web-socket
Client should send request to server for tracking status or setting goals or updating profile and server should provide response.
Since some metrics cant be all time fetched from Database so we provide cache like Redis which can provide immediate response for low latency and on hard refresh or at some interval cache can be evicted and replaced with latest data.
There should be open connection with server to keep on sending data to server to update workouts done by user.
Notification server to send reminder to user of remaining steps or if goal is successful
For high availability we can horizontally auto scale our servers with load balancers. We can use consistent hashing for servers to handle their specific users as per hash.
Open connection to keep server updated with latest workouts could overload server, since Server side connection are limited.
We can use out fan out notification service for encouraging user for completing goals via amazon SQS and can be customised based on pending goals or with suggestion