Goftego (گفتگو — "conversation") is a lightweight, self-hosted chat platform: channels, direct realtime messaging, JWT auth, bcrypt-hashed passwords, live presence and typing indicators — in one SQLite file, with a Vue 3 SPA and zero external services.
English docs below · مستندات فارسی پایین صفحه
Hosted chat SaaS locks your community behind someone else's storage, pricing and jurisdiction. Goftego is the answer for small teams and communities that want a one-command, own-your-data chat room that still feels modern: realtime, keyboard-friendly, dark by default, bilingual (fa/en) with proper RTL.
- 💬 Channels — create, browse, paginated history (50/page)
- ⚡ Realtime — WebSocket fan-out, presence counts, typing indicators
- 🔐 Auth — register/login with bcrypt (cost 12) + JWT (7-day tokens)
- 🗄 SQLite storage — one file, WAL mode, zero external dependencies
- 🌍 Bilingual UI — Persian (RTL) and English, switchable in one click
- 🐳 Docker —
docker compose upand you are live
# terminal 1 — API + realtime server
cd server && npm install && npm run dev # http://localhost:3000
# terminal 2 — Vue client with HMR + proxy
cd client && npm install && npm run dev # http://localhost:5173cd client && npm run build # emits client/dist
cd ../server && npm start # serves API + static SPA on :3000docker compose up --build # → http://localhost:3000┌──────────────────────────── server (Node, ESM) ─────────────────────────┐
│ Express REST WS hub (/ws) better-sqlite3 │
│ /api/register /login join / leave / typing users │
│ /api/channels (+messages) post → persist → fan-out channels │
│ JWT middleware presence counts messages (WAL) │
└──────────────────────────────────┬───────────────────────────────────────┘
│ same JWT
┌────────────────────── client (Vue 3 + Vite SPA) ────────────┐
│ LoginView ─ ChatView: sidebar + message list + composer │
│ store.js: reactive store, i18n fa/en, RTL toggle │
└────────────────────────────────────────────────────────────────┘
- Passwords: bcrypt with cost 12 — never stored, logged or returned
- Sessions: signed JWTs; the WS handshake re-verifies the token
- Input: username charset enforcement, message length caps (4,000), JSON body limit 256 KB
- Secrets:
JWT_SECRETenv var (auto-generated per boot if unset — set it in production!)
cd server && npm test # vitest: auth flow, channel CRUD, message paging- File attachments (local disk + S3 adapter)
- Direct messages (1:1 rooms)
- Web push notifications
- Message reactions & edit/delete
گفتگو یک پلتفرم چت سبک و سلفهاست است: کانالها، پیامرسانی زنده با وبسوکت، ورود با JWT و گذرواژهی هششده با bcrypt، حضور آنلاین و نشانگر «در حال نوشتن» — همه در یک فایل SQLite، بدون هیچ سرویس خارجی.
اجرا: docker compose up یا دو ترمینال مطابق دستورهای بخش انگلیسی.
رابط کاربری فارسی و راستبهچپ بهصورت پیشفرض است و با یک کلیک انگلیسی میشود.
MIT © Reza Bazdar (Godde3s)