sdc-spec-6-1-2020.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. SETUP THIS USE CASE:
  2. /api/dev/createSystemAdmin
  3. /api/pro/create
  4. Dr. Smith
  5. Dr. Brown
  6. /api/lobby/create
  7. Dr. Smith & Dr. Brown's Office
  8. smith-brown-inc
  9. /api/lobbyPro/create
  10. // create two records, one for each doctor for the above lobby
  11. =================================================================
  12. STRANGER EXPERIENCE PART 1:
  13. stranger goes to:
  14. speedrelay.com/smith-brown-inc
  15. // IMMEDIATELY CALLS: /api/session/createStrangerSession -> gets a sessionKey as stranger.
  16. Welcome to Dr. Smith & Dr. Brown's Office!
  17. Please check in, stranger.
  18. <input type="hidden" name="lobbyUid" value="..."/>
  19. [name]
  20. [dob]
  21. [SUBMIT] -> /api/meeting/createAsStrangerPerformer
  22. {
  23. success: true,
  24. data: <meetingParticipantUid>
  25. }
  26. ----------------------------------------------------------------------------------------
  27. STRANGER EXPERIENCE PART 2:
  28. /meeting-participant/{meetingParticipantUid}
  29. // in laravel, you can get meetingUid...
  30. $meetingParticipant->meeting()->uid
  31. This stranger sees...
  32. Hello, {John}! You are now in a meeting in Dr. Smith & Dr. Brown's Office.
  33. Please make sure your webcame is working. Then, someone should be with you shortly.
  34. ----------------------------------------------------------------------------------------
  35. PRO:
  36. At the same time, Dr. Smith & Dr. Brown both got notified by socket that someone has joined.
  37. Dr. Smith decides to jump in. Clicks "JOIN" on the meeting.
  38. /api/meeting/joinMeetingAsPro
  39. meetingUid && his sessionKey -> session on DB...
  40. As soon as there is one meeting_participant.pro where there is a matching lobby_pro, the meeting is off of the QUEUE in the lobby (meeting is no longer waiting).
  41. Dr. Brown sees immediately that this meeting has (2) participants, including 1 pro.
  42. So... he decides to ignore it and wait for someone else to join the queue.
  43. ----------------------------------------------------------------------------------------
  44. FOR NOW::: SIDEBAR
  45. Part 1: Queue:
  46. ... (SELECT * FROM meeting WHERE meeting_participants DOES NOT CONTAIN ANY pro)
  47. Part 2: My Meetings
  48. ... (SELECT * FROM meeting_participant WHERE pro_id = me.pro_id)
  49. Part 3: My Current Meeting
  50. [Video Feed with a LEAVE button]
  51. -or-
  52. <i>Not currently in any meeting.</i>
  53. =======================================================================================