Skip to main content

Banks, Transfer, Device & Static

What it is​

Four infrastructure/utility modules that other domain guides lean on rather than being destinations in their own right: banks (bank list lookups), transfer (a standalone wallet-transfer utility with account-name resolution), device (WebSocket connection/presence tracking), and static (misc app info, city lookups, generic media upload).

How it works​

Banks & Transfer​

GET /banks/list, GET /banks/:code — a simple bank directory, used to populate bank-selection UI wherever a bank transfer happens (PartyBank, User wallet, Merchant). transfer duplicates a GET /transfer/banks of its own plus GET /transfer/name-enquiry (resolve an account number + bank code to an account holder name before submitting a transfer) — the same account-name-resolution step that appears inline in PartyBank/wallet flows, but exposed here as a standalone utility.

Device​

Tracks WebSocket connection presence per user: GET /device/connection-status/:userId, GET /device/info/:userId, GET /device/summary/:userId, plus bulk variants. This is what backs "is this user currently online/reachable" checks — relevant to real-time features like Chat and the realtime-toast half of Notifications. GET /device/ws-stats gives aggregate WebSocket connection stats, presumably for ops monitoring.

Static​

Grab-bag of things that don't fit elsewhere: GET /static/ (app info/version metadata), GET /static/:countryCode/cities (city lookup for location pickers), POST /static/upload (generic authenticated media upload, used by features that don't have their own dedicated upload endpoint).

Key business rules & edge cases​

  • Bank lookup is duplicated across at least three places (banks, transfer, and inline in partybank/user wallet routes) — if bank data or a specific bank's code ever needs correcting, check whether it needs updating in more than one place rather than assuming a single source of truth.
  • Device presence (connection-status) reflects WebSocket connection state specifically — a user with the app closed but push notifications still working (see Notifications) would show as offline here even though they're still reachable via FCM push.
  • src/modules/banks/ — routes/controller
  • src/modules/transfer/transfer.routes.ts, transfer.controller.ts
  • src/modules/device/device.routes.ts, device.controller.ts
  • src/modules/static/static.route.ts, static.controller.ts, static.service.ts

None of these are in the generated OpenAPI spec.