Team chat and issue tracking in one place, in real time.
Features · Run it locally · Documentation · Contributing · Security
Baithak (بیٹھک, the room where people sit together and talk) is for small teams that keep their conversations in one app and their work in another, and lose the link between the two. A workspace has channels, threads and direct messages that update live, and a small issue tracker where every issue can start from a message and keep its discussion in a thread. GitHub pull request and issue events arrive in the channel that follows the repository. The interface is in English.
Note
Pre-release (v0.6.0). Milestones M1 to M6 are done: chat, files, search, notifications,
issues and integrations all work. M7 (docs and launch) is under way: end-to-end tests are in,
and the deploy to baithak.ahmershah.dev waits until hosting is confirmed.
Deployment is optional and not confirmed. Baithak is complete without a public instance; it runs locally with Docker Compose, and a hosted copy may or may not follow. See docs/roadmap.md and docs/status.md.
- Workspaces and channels. Public and private channels, members and roles (owner, admin, member, and guests who use direct messages only), invitations by email, channel topics and an audit log.
- Messages. Live messages over WebSockets with Discord-style formatting, threads, direct and group messages, mentions, reactions, edits and deletes, typing and online status, and unread counts that stay right across devices.
- Files and search. File and image uploads with previews, scanned for viruses (ClamAV) before anyone can open them and encrypted at rest, and full-text search over messages, files and issues, limited to what the person can see.
- Issues. Projects with labels, assignees, priorities and due dates, a board per project, and an issue created from any message with its discussion kept in a thread.
- Integrations. GitHub webhooks posting pull request and issue events into a channel, and incoming webhooks for other tools, with a delivery log and retries.
- Notifications. In-app and email notifications for mentions, direct messages and assigned issues, with quiet hours in your time zone.
- Accounts and privacy. Email verification, password reset by code, a lockout ladder for wrong passwords, a privacy page, and self-serve account deletion that keeps your posts in shared workspaces as from a deleted account.
![]() |
![]() |
| The board: drag a card to change its status | An issue opened from a message, its thread as the discussion |
![]() |
![]() |
| Search, limited to what you can read | Light and dark themes |
The hard parts of a chat app are not the message box. They are messages that reach every open tab in order, unread counts that agree on a phone and a laptop, a reconnect that loses nothing, and search that never shows a message from a channel you can't open. Baithak is built around those rules, with tests for each.
| Part | Tools |
|---|---|
| API and real time | Python 3.12, Django 5.2, Django REST Framework, drf-spectacular, Django Channels |
| Jobs | Celery and Celery beat (email, virus scans, previews, webhook deliveries, digests) |
| Uploads | ClamAV (clamd) for virus scanning, AES-256-GCM (cryptography) at rest |
| Data | MySQL 8.4 (InnoDB, FULLTEXT search), Redis (channel layer, presence, queue, cache) |
| Web | React 19, TypeScript 6 (strict), Vite, Tailwind CSS 4, TanStack Query, React Router |
| Quality | pytest, pytest-asyncio, factory_boy, Vitest, Playwright, Ruff, mypy, ESLint, Prettier |
| CI | GitHub Actions, CodeQL, SonarCloud, Dependabot |
| Run | Docker Compose |
flowchart LR
web["React web app"]
api["Django + DRF"]
ws["Channels consumers"]
db[("MySQL")]
redis[("Redis")]
worker["Celery: email, virus scans, previews, webhooks"]
gh["GitHub"]
web -->|REST| api
web -->|WebSocket| ws
api --> db
api -->|after commit| redis
redis --> ws
api -->|tasks| redis
redis --> worker
worker --> db
gh -->|signed webhooks| api
Messages are saved before they are broadcast, each channel numbers its messages, and a client that reconnects asks for what it missed. The data model, the message flow and every decision are in docs/architecture.md.
You need Docker with Compose and Node 22.12 or later. uv is only needed to run the backend checks outside Docker.
npm install
npm run devnpm run dev starts MySQL, Redis, ClamAV, the backend (migrations run on start) and a Celery
worker in Docker, waits until they are healthy, then starts the web app at http://localhost:5173. Vite
proxies /api, /ws, /admin and /health to the backend at http://localhost:8000.
| Command | What it does |
|---|---|
npm run dev |
Start the stack and the web app |
npm run stop |
Stop the containers |
npm run logs |
Follow the backend and worker logs |
Compose has local defaults for every setting; copy .env.example to .env only to change one.
Email is printed to the worker log unless RESEND_API_KEY is set in .env, and reCAPTCHA is
off until its keys are.
To see it lived in, seed two invented teams with about four months of conversations, threads and issues (it takes a few minutes):
docker compose exec backend python manage.py seed_demo --password "pick-a-password"Then sign in at http://localhost:5173 as [email protected] (a software studio) or
[email protected] (a newsroom) with that password. Run it again with --reset to
start over. Everyone in it is made up, and they never get email.
Backend checks run against the MySQL from Compose, never SQLite:
docker compose exec -e DJANGO_SETTINGS_MODULE=config.settings.test backend \
sh -c "ruff check . && ruff format --check . && mypy . && pytest"Web app checks:
cd frontend
npm run typecheck && npm run lint && npm run format:check
npm test
npm run contrastEnd-to-end tests, in real browsers against a backend of their own (an empty database on every
run, so development data is never touched). The first run needs npx playwright install chromium in frontend:
npm run e2eFifteen simulated people using and abusing the app at once (throttles, lockouts, socket limits, bad files, races), and a read-only smoke check of any running copy:
npm run swarm
python backend/scripts/smoke.py http://localhost:5173The pictures in this README come from the demo data. To take them again, with the stack and
npm run dev running:
cd frontend
npm run screenshots| Document | What is in it |
|---|---|
| docs/roadmap.md | Milestones M1 to M7 and what "done" means |
| docs/status.md | Where the project stands, updated every session |
| docs/architecture.md | Parts, data model, real-time design and every decision |
| docs/design.md | Logo, colors, themes, type and motion |
| docs/security-review.md | The pre-launch review against the OWASP Top 10:2025, and what it fixed |
| AGENTS.md | Code rules for contributors and coding agents |
| CONTRIBUTING.md | How to propose and send a change |
| CODE_OF_CONDUCT.md | How we treat each other |
| SECURITY.md | How to report a vulnerability |
- HolidayOps: business-day calendars for countries and companies.
- MarketClock: trading days and settlement dates for stock exchanges.
- OfflineShelf: Wikipedia reading lists for offline use.
- Karobar ERP: stock, sales, accounts and payroll for small businesses.
MIT. Made by Syed Ahmer Shah.




