Functional Requirements:

  1. Operator should be able to schedule batch for students
  2. User can be present in multiple batch
  3. Batch should not be conflicting, with other batch if user is common in 2 batch, and should show conflict before booking
  4. Student should be able to fetch list of batch for given month or week range only for his enrolled batch
  5. User should be able to see all scheduled batch for given date range
  6. Same batch should not be scheduled for the same time slot twice
  7. Schedule batch only for future dates
  8. All student should receive notification for new scheduled batch
  9. All enrolled student should get notification before 30 min of the class
  10. Operator can see available free slot for given batch and date.
  11. batch can be recurring
  12. batch can be scheduled for any time duration

NFR:

  1. Data should not get lost
  2. Read latency should be minimal
  3. Its a read heavy system
  4. concurrency should be handled

Capacity estimates:

Read : 10K / Sec Write: 10/Sec Batches count: 20K all across country

Tables schema

`User

idnameageRole
U1U1 name18Student
U2
U10Operator

`Batch

Idnamedescriptiontag
B1B1-namedesMath
B2Physics
B3Chemistry

`User Batch

Iduser Idbatch Idactivecreated at
1U1B1
U2B1
U3B1
U4B1
U1B2
U5B2
U6B3

`Batch Schedule

Idstart timeend timebatch IdisRecurringrecurring pattern
BS114/02/2025 10:00 AM14/02/2025 11 AMB1{}

User Schedule

iduser Idstart timeend timebatch schedule id
U110:0011:00 AMBS1

`+ve scenario

B1 has to be scheduled for 14/02/2025 from 10AM to 11 AM

-ve scenario B2 has to be scheduled for 14/02/2025 from 10AM to 11 AM after B1 is scheduled