Skip to content
~nguyen-huu-trung
← Back to projects

Conexa · Realtime infrastructure

Realtime chat in Go

A WebSocket chat service for web and mobile: instant delivery, stored in PostgreSQL, content encrypted at rest, push notifications when users are offline.

Role
Sole author
Period
2025 – 2026
Stack
GoPostgreSQLWebSocketWeb Push

note: Private client work — described at architecture level only, no source or customer data.

  • Realtime

    messages arrive instantly over WebSocket

  • Web + app

    share one service

  • Push

    notifications when offline

The problem

Messages had to arrive instantly, their content had to be protected when stored, and one service had to serve both web and the mobile app.

The approach

  1. 01

    WebSocket delivery per user

    A REST API plus WebSocket: each user has their own connection and new messages are pushed straight to the right people; data is stored in PostgreSQL, with a background job for reminders.

  2. 02

    Encrypted at rest

    Message content is encrypted before it is saved to the database, and the encryption key can be changed while old messages stay readable.

  3. 03

    The AI assistant for mobile

    The app’s AI assistant also runs in this service so the mobile app can use it over WebSocket, returning the same format as the web version.

Outcome

  • Chat with images and voice messages runs on both web and mobile, plus 1:1 voice and video calls.
  • Push notifications reach users even when the app is closed.