Meesho | SDE3 | Machine Coding

Dec 2024

Description
Cult-Like Application Design

Scenario:
You are tasked with designing an application for a fitness and wellness service that manages multiple centers. Each center offers various activities with different time slots available from 6 AM to 10 PM daily. The application should allow users to book these activities, ensuring no overlapping time slots. Additionally, the application should handle waiting lists for fully booked activities and allow for activity cancellations under specific conditions.

Functional Requirements:

Center Management:

Add new centers with various activities and their respective time slots.
Specify the capacity for each activity's time slot.

User Interaction:

Users can view centers and activities filtered by distance, activity type, and available time slots.
Users can book activities, ensuring no overlapping with already booked activities.
If an activity is fully booked, users should be added to a waiting list.
Users can cancel their booked activities.

Additional Functionalities:

Centers can pause activities for specific time slots.
Provide notifications to users 15 minutes before their activity starts.
Allow users to invite friends to join activities.
Restrict users from canceling activities within 15 minutes of the activity start time.

Functional Breakdown:

Add a Center:

Functionality to create a new center with activities and their respective time slots and capacities.
View Centers and Activities:
Users can filter and view centers based on:
Distance from their location.
Type of activity.
Morning, Afternoon, Evening, Night time slots.

Book an Activity:

Users can select and book activities, ensuring no overlapping time slots.
If the chosen time slot is at capacity, add the user to a waiting list.

Cancel a Booking:

Users can cancel their booked activities.
Reassign slots to users on the waiting list if a booking is canceled.

Potential Extensions:

Centers can pause activities for specific time slots.
Charging based upon particular activity and number of hours
Provide notifications to users 15 minutes before their activity starts.
Users can invite friends to join activities.
Users cannot cancel activities within 15 minutes of the activity start time.

Deliverables:

You can create APIs or write a driver class, unit test or calls from the main class to demonstrate the code.
Everything should be in memory: no files, databases, or network interactions are needed.
The code should be production-grade, focusing on modularity, readability, extensibility, error handling, concurrency, etc.
You can assume the missing details as needed and clarify them during the demo.

Comments (2)