Files
dumpsterChat/README.md
T

141 lines
5.1 KiB
Markdown

# Dumpster
A chaotic, self-hosted Discord-like platform for ~12 degenerates.
Built for fun, maintained with pride, named with intent.
## Quick Start
```bash
# Clone
git clone ssh://git@git.dustin.coffee:2222/hobokenchicken/dumpsterChat.git
cd dumpsterChat
# Copy and edit environment variables
cp .env.example .env
$EDITOR .env
# Start backing services
docker compose -f docker/compose.yml up -d
# Run migrations
go run ./cmd/migrate
# Start the server
go run ./cmd/server
# In another terminal, start the web dev server
cd web
npm install
npm run dev
```
## Tech Stack
| Layer | Technology |
|-------|-----------|
| Backend | Go, Chi router, pgx, gorilla/websocket |
| Frontend | React 18, TypeScript, Vite, Tailwind CSS, Zustand |
| Database | PostgreSQL 16 |
| Cache | Valkey (Redis-compatible) |
| File storage | MinIO (S3-compatible) |
| Voice/video | LiveKit |
| TURN | coturn |
| Reverse proxy | Caddy |
| Auth | Argon2id (WebAuthn passkeys deferred) |
## Features
- [x] Registration + login (Argon2id)
- [x] Server + channel CRUD
- [x] Messaging with WebSocket real-time delivery
- [x] Cursor-based message pagination
- [x] User profiles (display name, bio, accent color, status, avatar/Gravatar)
- [x] File uploads (MinIO)
- [x] Giphy GIF search + trending
- [x] Terminal/Gruvbox dark aesthetic
- [x] Voice/video rooms (LiveKit)
- [x] Online presence (online/idle/dnd/offline)
- [x] Typing indicators
- [x] Message reactions (emoji picker, counts)
- [x] Message replies/threads
- [x] PWA with service worker
- [x] Invite link system
- [x] @mention autocomplete
- [x] Dark/light mode toggle
- [x] Mobile-responsive layout (bottom nav, drawer)
- [x] Bot framework (token auth, CRUD, WebSocket gateway)
- [x] Slash commands (registration, autocomplete)
- [x] Incoming webhooks (create, execute)
- [x] Example bots (modbot, welcome bot)
- [x] TUI client (Bubbletea, vim-style, voice support)
- [x] Roles & permissions system
- [x] Push notification backend (VAPID)
- [x] Push notification frontend (subscribe toggle in settings)
- [x] WebAuthn passkey scaffolding
- [x] WebAuthn frontend (register/login buttons)
- [x] REST API documentation (Swagger UI at /docs)
- [ ] WebAuthn backend completion (begin/finish flow)
## Project Structure
```
dumpsterChat/
├── cmd/
│ ├── server/ # Main API + WebSocket gateway
│ ├── migrate/ # Database migration CLI
│ └── tui/ # Terminal client (Bubbletea)
├── internal/
│ ├── auth/ # Registration, login, sessions, profiles
│ ├── channel/ # Channel CRUD handlers
│ ├── config/ # Environment-based config
│ ├── db/ # PostgreSQL connection + schema migrations
│ ├── gateway/ # WebSocket hub + client fanout
│ ├── giphy/ # Giphy API client (search + trending)
│ ├── message/ # Message CRUD + WS broadcast
│ ├── middleware/ # Session auth middleware
│ ├── server/ # Server CRUD + membership
│ ├── upload/ # MinIO file upload + serve
│ ├── voice/ # LiveKit voice/video integration
│ ├── reaction/ # Message reactions
│ ├── invite/ # Server invite links
│ ├── bot/ # Bot framework, auth, commands
│ ├── webhook/ # Incoming webhooks
│ ├── push/ # Push notification sender (VAPID)
│ └── permissions/ # Permission bitflags and checker
├── examples/ # Example bots
│ ├── modbot/ # Moderation bot
│ └── welcome/ # Welcome message bot
├── web/ # React frontend (PWA)
│ ├── src/
│ │ ├── components/ # Layout, ChatArea, LoginForm, UserSettings, GiphyPicker, VoiceChannel, VoicePanel, VoiceControls, TypingIndicator, ReactionBar, EmojiPicker, ReplyBar, MentionPopup, InviteModal, JoinServer, MobileNav, MobileDrawer, ThemeToggle, InstallPrompt, BotManager, CommandManager, SlashCommandPopup
│ │ ├── stores/ # Zustand (auth, server, channel, message, ws, voice, presence, typing, push, bot)
│ │ └── lib/ # API client, WebSocket client
│ └── tailwind.config.js
├── docker/ # Docker Compose, Dockerfile, Caddyfile, LiveKit config
├── Makefile # Build targets
└── .env.example # Environment template
```
## Environment Variables
See `.env.example` for the full list. Key variables:
| Variable | Description | Required |
|----------|------------|----------|
| `DUMPSTER_HOST` | Server bind address | No (default: localhost) |
| `DUMPSTER_PORT` | Server port | No (default: 8080) |
| `DUMPSTER_SECRET` | Session signing secret | Yes |
| `POSTGRES_*` | Database connection | Yes |
| `LIVEKIT_*` | Voice/video server | No |
| `GIPHY_API_KEY` | Giphy API key for GIF search | No |
| `MINIO_*` | File upload storage | No |
## Wiki
Full documentation: [dumpsterChat wiki](ssh://git@git.dustin.coffee:2222/hobokenchicken/dumpsterChat.wiki.git)
## License
AGPLv3