A real-time chat server with text, voice, and forum channels.
- Text Channels - Send messages, reply, react, pin
- Voice Channels - Peer-to-peer audio calls
- Forum Channels - Organized threads for discussions
- User Management - Roles, permissions, bans, timeouts
- Plugins - Extend with custom features
- Slash Commands - Custom commands for users
- Install:
pip install -r requirements.txt- Configure:
python setup.py- Run:
python init.pyServer runs at ws://localhost:5613 by default.
- Overview - Core concepts and features
- Getting Started - How to connect and use the API
- Client Development - Build your own client
- Plugin Development - Create server plugins
- Production Setup - Deploy securely
- Command Reference - All available commands
- Clients - Existing clients you can use
Main settings in config.json:
{
"websocket": { "host": "127.0.0.1", "port": 5613 },
"rate_limiting": { "enabled": true, "messages_per_minute": 30 },
"limits": { "post_content": 2000 }
}See Configuration Docs for all options.
Built-in spam protection limits messages per user. When rate limited, clients receive:
{ "cmd": "rate_limit", "length": 5000 }Wait length milliseconds before sending more messages.
| Type | Description |
|---|---|
| Text | Real-time text messaging |
| Voice | Audio calls via WebRTC |
| Forum | Organized threads for topics |
Role-based permissions control what users can do:
- View channels
- Send/edit/delete messages
- Manage users (ban, timeout)
- Pin messages
- Use slash commands
See Permissions for details.
Uses Rotur authentication service. See Getting Started for the full flow.
See clients.md for available clients.
-
Add a new case in
handlers/message.py:case "my_command": # Handle command return {"cmd": "my_response"}
-
Update documentation in
docs/commands/my_command.md
See plugins/ directory for examples. Plugins can:
- Respond to new messages
- Handle slash commands
- Modify message data
- Trigger events
Use the same 3-step flow throughout the codebase:
- Add the default in
config_builder.py. - If it should be configurable during setup, prompt for it in
setup.pyand add it to the overrides passed intobuild_config(...). - Read it with
get_config_value(...)fromconfig_store.py, or use the local handler helper whenserver_data["config"]is already available.
All WebSocket messages follow this format:
{
"cmd": "command_name",
"key": "value",
"global": true // Optional: broadcast to all
}See Protocol Documentation for details.
All errors return:
{
"cmd": "error",
"val": "Error message"
}See Error Handling for all possible errors.
Contributions welcome! See the documentation for details.