Skip to content

Thaelith/LinkRoom-Desktop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkRoom Desktop

LinkRoom Desktop is a lightweight Discord-style desktop application for private friend groups. Built desktop-first with Tauri, it provides text chat, voice rooms, and screen sharing without the complexity of larger collaboration platforms.

Features

  • Authentication (register, login, session management)
  • Private groups with invite codes
  • Text and voice channels
  • Realtime text chat via Socket.IO
  • LiveKit-powered voice rooms with mute/deafen
  • Screen sharing with expand/fullscreen viewer
  • Real-time presence indicators (online/offline per member)
  • Synced voice states (remote mute, deafen, screen share visible to others)
  • Audio settings (input/output device selection, volume, mic test with monitoring)
  • Tauri desktop app (Windows, macOS, Linux)

Tech Stack

Layer Technology
Desktop shell Tauri
Frontend React, TypeScript, Tailwind CSS
State management Zustand
Backend Express (Node.js), TypeScript
Database PostgreSQL with Prisma ORM
Realtime chat Socket.IO
Voice / screen LiveKit

Architecture Overview

[Desktop App (Tauri)]
       |
       | HTTP (REST)         | WebSocket (Socket.IO)    | WebRTC (LiveKit)
       v                     v                          v
[Express API Server]    [Socket.IO Server]        [LiveKit Cloud]
       |
       v
[PostgreSQL Database]

The Express backend handles authentication, group management, channel management, and message persistence. Socket.IO provides realtime text chat and presence. LiveKit handles voice rooms and screen sharing — the backend issues short-lived access tokens so that LiveKit API secrets never reach the desktop client.

The Tauri desktop app wraps the React frontend in a native window. It connects to the backend via REST for data operations, Socket.IO for realtime events, and LiveKit for voice and screen streams.

Project Structure

LinkRoom/
├── apps/
│   ├── api/                 # Express backend
│   │   ├── prisma/
│   │   │   ├── schema.prisma
│   │   │   └── migrations/
│   │   └── src/
│   │       ├── middleware/  # Auth middleware
│   │       ├── modules/     # Route/controller modules
│   │       │   ├── auth/
│   │       │   ├── groups/
│   │       │   ├── channels/
│   │       │   ├── messages/
│   │       │   └── voice/
│   │       ├── socket/      # Socket.IO setup
│   │       ├── utils/       # Shared utilities (Prisma client)
│   │       └── server.ts    # Entry point
│   └── desktop/             # Tauri + React desktop app
│       ├── src/             # React frontend source
│       │   ├── components/
│       │   ├── layouts/
│       │   ├── screens/
│       │   ├── stores/      # Zustand stores
│       │   └── types/
│       └── src-tauri/       # Tauri Rust backend
├── docs/
│   └── DEPLOYMENT.md        # Deployment guide
├── infra/
│   └── docker-compose.yml   # Local PostgreSQL
└── .env.example             # Environment variable template

Local Development

Prerequisites

  • Node.js v20+
  • Rust toolchain (for Tauri)
  • Docker (for local PostgreSQL)

Setup

  1. Start the database:
docker compose -f infra/docker-compose.yml up -d
  1. Create a root .env file from the template:
cp .env.example .env

Edit .env and set real values for JWT_SECRET, LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET.

  1. Install dependencies and start the backend:
cd apps/api
npm install
npm run prisma:generate
npx prisma db push
npm run dev
  1. In a separate terminal, start the desktop app:
cd apps/desktop
npm install
npm run tauri dev

The desktop app will open and connect to the backend at http://localhost:4000.

Environment Variables

Create a .env file in the project root based on .env.example. All environment variables in the table below must be set in that file for local development.

Variable Required Default Description
DATABASE_URL Yes - PostgreSQL connection string
JWT_SECRET Yes - Secret for signing JWT tokens
API_PORT No 4000 Backend server port
CORS_ORIGIN No * Allowed CORS origin
LIVEKIT_URL Yes - LiveKit WebSocket URL
LIVEKIT_API_KEY Yes - LiveKit API key
LIVEKIT_API_SECRET Yes - LiveKit API secret
VITE_API_URL Yes - Backend URL used by the desktop app at build time

LIVEKIT_API_SECRET and JWT_SECRET must never be exposed to the frontend. The backend uses them only on the server side to sign tokens.

Deployment

See docs/DEPLOYMENT.md for the full deployment guide.

Summary of the recommended deployment path:

  • Backend: Render Web Service or Heroku
  • Database: Supabase (free PostgreSQL) or any PostgreSQL provider
  • Voice/Screen: LiveKit Cloud (free tier)
  • Desktop distribution: GitHub Releases (upload the installers built by npm run tauri build)

Security Checklist

  • Never commit .env files. The .env file is listed in .gitignore.
  • Keep LIVEKIT_API_SECRET backend-only. The desktop app never sees it.
  • Generate a strong JWT_SECRET (at least 32 random characters).
  • Run a secret scan before making the repository public:
git ls-files | grep -E "(\.env|secret|key|token|credential|\.db|\.sqlite)"
  • If a real secret was ever committed, rotate it before going public. Placeholder values in .env.example are safe.

Known Limitations

  • No auto-updater for the desktop app
  • No system tray support
  • No message edit or delete
  • No file uploads
  • The desktop app must be rebuilt when VITE_API_URL changes (the URL is baked in at build time)

Roadmap

  • Auto-updater for the desktop app
  • System tray integration
  • Message editing and deletion
  • File uploads and attachments
  • Improved release pipeline (CI/CD for cross-platform builds)

License

This project is intended for private use. Choose a license that fits your needs before sharing broadly.

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages