02 / 04
Real-Time Forum
A single-page forum in Go and plain JavaScript, with live private chat over WebSockets.
- Wrote the Go WebSocket server with Gorilla WebSocket. It keeps one connection per user, saves each message and pushes it to the receiver live.
- Built the message history endpoint, 10 messages per page, and the chat panel that loads older messages as you scroll up.
- Moved the database from SQLite to Turso and deployed the app on Northflank, where it is live.
- Dates
- Jan 20253 weeks
- Type
- Full-stack web app
- Status
- Live
- My role
- WebSocket chat, message history, deployment
Stack
- Go
- Gorilla WebSocket
- SQLite
- Turso (libSQL)
- bcrypt
- Vanilla JavaScript
- HTML / CSS
- Docker
What it is
A forum that runs on one page. People register, write posts in categories, comment and react. Private messages arrive live over WebSockets, with the history, who is online and a typing indicator. The back end is Go with Gorilla WebSocket, SQLite and bcrypt; the front end is plain JavaScript.
What I did
I built the private chat. My WebSocket server in messages_handler.go upgrades the connection, keeps each user's connection in a map, saves every message and sends it on if the receiver is connected. I wrote the history endpoint, /api/messages/history, 10 messages per page, and the chat panel in rightSidebar.js that loads them. In October 2026 I moved the database to Turso and deployed the app on Northflank. My teammate built the online users list, the notifications and the typing indicator.
Results
The forum is live on Northflank, with its database on Turso. I wrote 40 of the repo's 63 commits, the code in 3 weeks of January 2025. The Go server has 23 routes.
Home feed
Next project 03 / 04
