The frontend receives live ticks, order updates, and notifications via Socket.IO.

Client module — utils/socketConnect.ts

Connection config

Lifecycle

When connection starts

  1. Successful login (JWTContext.login)
  2. Valid token on app boot (verifyToken + /user/verifyToken)

Heartbeat

  • Client emits ping every 15 seconds (in socketConnect and some page listeners)
  • Server responds with pong

Event categories