- JavaScript 46.5%
- CSS 18.7%
- Rust 18.3%
- HTML 16.4%
|
|
||
|---|---|---|
| backend | ||
| discord-app | ||
| migrations | ||
| .env.example | ||
| .gitignore | ||
| build_errors.txt | ||
| build_output.txt | ||
| Cargo.lock | ||
| Cargo.toml | ||
| launch.bat | ||
| LICENSE | ||
| make_admin.bat | ||
| OPS_CHECKLIST.md | ||
| PROTOCOL.md | ||
| README.md | ||
| README_VPS.md | ||
Voxium
A Discord-like clone (text/voice chat + roles + moderation) built with:
- Rust backend (
actix-web+sqlx+ SQLite) - Tauri frontend + HTML/CSS/JS
Table of Contents
- Features
- Roadmap
- Technical Docs
- Prerequisites
- Quick Local Setup
- Using It with Friends (Network)
- Roles & Administration
- Contributing
- Troubleshooting
Features
- Authentication (register/login)
- Text and voice channels
- Real-time messaging via WebSocket
- Image uploads
- Replies, pins, advanced search
- Server roles + room-level permissions
- Server/room settings in the UI
Roadmap
Short term
- Better multi-user stability on LAN/Internet
- Faster room/server settings workflows (admin UX)
- Cleaner Tauri build configuration for packaging
Mid term
- More robust notifications (mentions, presence, activity)
- Advanced moderation tools (logs, bulk actions)
- Better DB performance and message pagination
Exploratory
- Custom client compatibility with official Discord APIs (research preview)
- only if it can be done properly and safely
- disabled by default in this project
Technical Docs
Prerequisites
Tools
Rust(stable)Node.js(LTS recommended)npm
Windows (Tauri)
WebView2 Runtime- C++ Build Tools (Visual Studio Build Tools)
The backend listens on
0.0.0.0:8080by default.
Quick Local Setup
1) Clone the repository
git clone https://github.com/Pouare514/voxium.git
cd discord2
2) Install frontend dependencies
cd discord-app
npm install
cd ..
3) (Optional) Configure .env
The backend reads .env (optional) from the workspace root.
You can start from:
cp .env.example .env
Example:
PORT=8080
JWT_SECRET=change-me
DATABASE_URL=sqlite:voxium.db
Without .env, the default DB is created automatically: sqlite:voxium.db.
4) Run the app
Option A (Windows):
launch.bat
Option B (manual, 2 terminals):
Terminal 1:
cd backend
cargo run --bin backend
Terminal 2:
cd discord-app
npm run tauri dev
Using It with Friends (Network)
By default, the frontend points to 127.0.0.1 (localhost), so each friend must point to the host server IP.
1) Host the backend on one machine
On the host machine:
cd backend
cargo run --bin backend
Open port 8080 in firewall/router if needed.
2) Point clients to the host IP/domain
Edit discord-app/src/runtime-config.js:
window.VOXIUM_RUNTIME_CONFIG = {
apiBaseUrl: "http://192.168.1.42:8080",
wsUrl: "ws://192.168.1.42:8080/ws",
iceServers: [{ urls: "stun:stun.l.google.com:19302" }]
};
For HTTPS deployment, use:
apiBaseUrl: "https://your-domain.tld"wsUrl: "wss://your-domain.tld/ws"
3) Update Tauri CSP
discord-app/src-tauri/tauri.conf.json also includes 127.0.0.1 in connect-src.
Replace it with the IP/domain you actually use, otherwise connections may be blocked.
4) Run the client on your friends’ machines
cd discord-app
npm install
npm run tauri dev
Roles & Administration
Promote a user to admin
Option 1 (UI): via member context menu (if you are already admin).
Option 2 (CLI):
make_admin.bat
Then enter the username in the terminal.
Server/Room settings
- Server settings: create/delete roles + role assignment
- Room settings (right-click): name, type, required role, public/private mode
Contributing
Thanks to everyone who wants to contribute ❤️
Whether it’s a big feature, a bug fix, a UX idea, or even a typo, contributions are welcome.
Simple workflow
- Fork/clone and create a branch:
git checkout -b feat/my-feature
- Make your changes (small and focused if possible)
- Run quick checks:
cargo check -p backend
node --check discord-app/src/main.js
- Commit with a clear message:
git add .
git commit -m "feat: add ..."
- Push + open a Pull Request
Contribution guide (important)
- Keep changes readable and within PR scope
- Explain the “why” in the PR description (2-3 lines is enough)
- If you changed UX, add a short screenshot/video
- If you changed roles/permissions, list tested scenarios
- If unsure about direction, open an issue/discussion before a big refactor
Troubleshooting
npm run build fails with frontendDist includes ["node_modules", "src-tauri"]
This is caused by the current Tauri config (frontendDist: "../").
For local development, use npm run tauri dev.
Client cannot connect to backend
- Check
API/WS_URLindiscord-app/src/main.js - Check CSP in
discord-app/src-tauri/tauri.conf.json - Check port/firewall (
8080)
Database issues
- Check
DATABASE_URL - In dev, if needed, recreate the local SQLite file from scratch
Useful project structure
backend/: Rust API + WebSocket + DBdiscord-app/: Tauri client (UI)migrations/: SQL scripts applied at startupuploads/: uploaded files