wosmo
← all projects

planet 04 of 08 · backend · product

NetLink

Real-Time Chat Platform (Web + Mobile)

● live · netlink-vert.vercel.appsince 2025pushed 4d ago

A concurrent Go WebSocket server (goroutines + channels) fanning out to Next.js web and React Native mobile clients over a shared protocol, with persistent PostgreSQL history.

planet 04 · drag to turn · 03 moonsclick the planet to see what it is made of

About

from the readme on github
  • Built a complete chat platform from scratch, a Go backend, a Next.js + Bun web client, and a React Native mobile app, all sharing a single bidirectional WebSocket protocol.
  • Designed a concurrent WebSocket server using Go's goroutines and channels to handle thousands of simultaneous connections with low-latency message fan-out.
  • Architected a lightweight, framework-free messaging protocol with persistent PostgreSQL storage for chat history, presence, and delivery state.
  • Implemented the React Native mobile client with shared state management and offline-resilient message queuing, mirroring the web client feature set.

A real-time chat application with web and mobile clients.

Tech Stack

  • Backend: Go (stdlib net/http), PostgreSQL (pgx), Gorilla WebSocket
  • Frontend: Next.js 16, React 19, Tailwind CSS v4, TypeScript
  • Mobile: Expo SDK 54, React Native, Zustand, TypeScript
  • Deployment: Docker (Railway), Vercel (frontend), EAS Build (mobile)

Features

  • Real-time messaging via WebSocket (multi-device support)
  • Direct and group conversations
  • Message editing, deletion (soft delete), forwarding
  • Emoji reactions (system + custom)
  • Voice messages with waveform visualization
  • Email verification and password reset (SMTP)
  • Session-based authentication (cookie + bearer token)
  • Optimistic UI updates on web and mobile
  • Rate limiting on auth endpoints

Prerequisites

  • Go 1.25+
  • PostgreSQL
  • Node.js / Bun (for frontend)
  • Expo CLI (for mobile)

Deployment

The backend ships as a Docker image (backend/Dockerfile) and runs on any Docker-capable host (Koyeb, Hugging Face Spaces, Railway, Render, Fly…). It binds $PORT, exposes GET /api/health, and auto-creates its schema on first boot — no migration step. See DEPLOY.md for the required env vars and per-host setup (Hugging Face Spaces, Koyeb, Railway…). A keepalive GitHub Action pings /api/health to keep sleep-prone free tiers warm.

Known Limitations

Built with

github language bytes · live · same numbers as the planet’s layers
composition
TypeScript61.5%Go35.2%CSS1.4%HTML1.4%Other0.4%JavaScript0.2%
stack
Go (Goroutines, Channels, WebSockets)Next.jsBunReact NativePostgreSQLTypeScript