How to design a system to add badges to people's Spotify account

How to design a system to add badges to people's Spotify account based on how long they have been listening.

Badge types :

  1. Weekly listener - When person log in to account listen anything all day in a week
  2. Runner - When person listens for hours in one session
  3. Luncher - When person listen during lunch time (12 PM to 2 PM)
  4. Winner - when person listen for 24 hours straight

and many more type were given.

Received this question in spotify virtual onsite. How would you design it?

Comments (3)