Skip to content

MyMedicalHub Telemedicine

website

A real-time telehealth workflow that coordinates guided exercise, movement recording, pain and strength questions, provider collaboration, and tenant-configured assessment behavior.

Role
Frontend and real-time workflow engineering within the MyMedicalHub team
Scope
WebRTC sessions, media recording, exercise state, Socket.IO coordination, tenant features, and failure recovery
Status
Private employer-owned telehealth system used in ongoing product development

Problem

Remote movement assessment requires more than a video call. Patients and providers must stay synchronized while exercises change, instructions play, recordings start and stop, pain or strength questions appear, network conditions vary, and either participant can leave unexpectedly.

Constraints

  1. C1

    Camera, microphone, permissions, network quality, and WebRTC lifecycle events differ across browsers and patient devices.

  2. C2

    Exercise, recording, pain, strength, queue, and provider-presence state must not leak from one movement or session into the next.

  3. C3

    Tenant feature flags alter available assessment behavior without allowing unsupported controls to appear or execute.

  4. C4

    Disconnection, provider departure, stale media, and failed API responses require recoverable states that do not leave patients trapped on a loading screen.

Architecture

Next.js routes host tenant-aware telehealth rooms, focused React contexts own socket, recording, media, and error state, Redux coordinates assessment APIs, and Socket.IO synchronizes room and exercise events across participants.

01

Session interface

Responsive patient and provider views present participants, exercise guidance, recording state, pain questions, and recovery messages.

02

Media lifecycle

WebRTC streams, camera switching, recording previews, device permissions, and network-quality hooks manage browser media explicitly.

03

Real-time coordination

Socket.IO room events synchronize connection, exercise, recording, audio, video, and participant departure behavior.

04

Assessment integration

Redux slices and authenticated services load exercises, verify tokens, persist recordings, track queue state, and apply tenant features.

Decisions

D1

Give each real-time concern a focused context

Socket, media, recording, and error lifecycles are separated so one high-frequency concern does not own every room transition.

D2

Reset exercise-owned media on selection changes

Recorded previews, questions, and movement state are cleared when the exercise changes so stale clinical media cannot reappear in a new task.

D3

Drive optional behavior from tenant features

Strength analysis, guidance, and related controls are enabled only when the current tenant contract supports them.

D4

Treat departure and disconnection as product states

Provider exit, peer disconnect, API failure, and degraded network paths transition to explicit messages and redirects instead of indefinite loading.

Contribution

  • Contributed to the migration and ongoing development of the Next.js and TypeScript telemedicine experience.
  • Implemented strength-exercise recording and state support, tenant-feature handling, patient/provider messaging, and guided movement UI behavior.
  • Fixed stale movement media, provider-departure loading, invitation validation, queue updates, and other cross-session lifecycle defects.
  • Worked across WebRTC media hooks, Socket.IO coordination, Redux assessment state, authenticated services, and responsive room components.

Outcomes

  • Patients and providers can coordinate guided movement and exercise sessions through one real-time room experience.
  • Exercise changes no longer reuse stale recordings or question state from a previous movement.
  • Strength and other tenant-specific workflows can be introduced without forking the telehealth application.
  • Departure, connection, and service failures resolve into clearer recovery or redirect paths instead of trapping the session.

Verified stack

  • Next.js
  • React 19
  • TypeScript
  • Redux Toolkit
  • WebRTC
  • Socket.IO
  • React Player
  • Formik
  • Yup
  • Tailwind CSS
  • System Design

Working through something similar?

Share your challenge, scope, and timeline to start a focused conversation.