No description
  • JavaScript 46.5%
  • CSS 18.7%
  • Rust 18.3%
  • HTML 16.4%
Find a file
2026-02-17 09:25:17 +01:00
backend Remove println for SQL query execution 2026-02-17 01:23:51 +01:00
discord-app feat: ajouter la gestion du cache d'accès pour les rôles d'utilisateur et les rôles requis des salons 2026-02-16 19:11:13 +01:00
migrations feat: ajouter la gestion du cache d'accès pour les rôles d'utilisateur et les rôles requis des salons 2026-02-16 19:11:13 +01:00
.env.example feat: rename project from Discord2 to Voxium and update related configurations 2026-02-16 17:30:24 +01:00
.gitignore initial commit aah 2026-02-16 13:29:02 +01:00
build_errors.txt initial commit aah 2026-02-16 13:29:02 +01:00
build_output.txt initial commit aah 2026-02-16 13:29:02 +01:00
Cargo.lock feat: rename project from Discord2 to Voxium and update related configurations 2026-02-16 17:30:24 +01:00
Cargo.toml initial commit aah 2026-02-16 13:29:02 +01:00
launch.bat feat: rename project from Discord2 to Voxium and update related configurations 2026-02-16 17:30:24 +01:00
LICENSE Add GNU Affero General Public License v3 2026-02-16 18:58:51 +01:00
make_admin.bat initial commit aah 2026-02-16 13:29:02 +01:00
OPS_CHECKLIST.md feat: rename project from Discord2 to Voxium and update related configurations 2026-02-16 17:30:24 +01:00
PROTOCOL.md feat: rename project from Discord2 to Voxium and update related configurations 2026-02-16 17:30:24 +01:00
README.md typo: readme.md update 2026-02-16 19:51:37 +01:00
README_VPS.md typo: readme.md update 2026-02-16 19:51:37 +01:00

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

  • 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:8080 by 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 its a big feature, a bug fix, a UX idea, or even a typo, contributions are welcome.

Simple workflow

  1. Fork/clone and create a branch:
git checkout -b feat/my-feature
  1. Make your changes (small and focused if possible)
  2. Run quick checks:
cargo check -p backend
node --check discord-app/src/main.js
  1. Commit with a clear message:
git add .
git commit -m "feat: add ..."
  1. 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_URL in discord-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 + DB
  • discord-app/: Tauri client (UI)
  • migrations/: SQL scripts applied at startup
  • uploads/: uploaded files