# Messenger Self-hosted messenger for family and friends. Built from scratch: Go backend, React PWA frontend, PostgreSQL, WebRTC calls. Deployed on a home-lab mini PC. > **Status:** Phase 0 — project skeleton. No functionality yet, but everything > builds, tests pass, and the deployment shape is in place. ## Repository layout ``` server/ Go API — config, logging, HTTP server, health endpoints web/ React + TypeScript + Vite frontend (PWA-ready) deploy/ docker-compose and operational config docs/ architecture, ADR, OpenAPI .github/ CI workflows ``` ## Prerequisites - Go 1.27+ - Node.js 22+ - Docker + Docker Compose (for deployment) ## Local development ```bash # Backend cd server go run ./cmd/api # listen on :8080 # Frontend (separate terminal) cd web npm install npm run dev # Vite on :5173, proxies /api -> :8080 ``` The frontend calls `/api/v1/ping` on load and renders the server response. ## Useful endpoints | Endpoint | Purpose | |--------------|----------------------------------| | `/healthz` | Liveness probe | | `/readyz` | Readiness probe | | `/api/v1/ping` | Round-trip check (JSON) | ## Deployment (Docker Compose) ```bash cp deploy/.env.example deploy/.env # adjust secrets cd deploy docker compose up -d --build ``` The API container is a single static binary that also serves the built frontend (`/app/web`). PostgreSQL runs alongside with a healthcheck. ## Roadmap - **Phase 0** — skeleton, CI, Docker (current) - Phase 1 — auth (JWT + refresh in httpOnly cookie, argon2id), contacts, DMs, WebSocket delivery, receipts, typing - Phase 2 — groups, reactions, media upload + thumbnails (S3-like storage interface) - Phase 3 — search (pg_trgm), Web Push (VAPID), PWA offline - Phase 4 — P2P WebRTC calls via our WebSocket signalling + coturn TURN fallback - Phase 5 — metrics (Prometheus + VictoriaMetrics + Grafana), docs, hardening ## License Proprietary for now; open-sourcing at v1.0.