JustDesk Architecture

Overview

JustDesk is a web-based remote desktop solution built with modern web technologies. It enables users to share their screens through web browsers without requiring any software installation.

System Architecture

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│                 │     │                 │     │                 │
│   Web Browser   │────▶│   Web Server    │────▶│ Signaling Server│
│   (Frontend)    │◀────│    (Nginx)      │◀────│   (Node.js)     │
└─────────────────┘     └─────────────────┘     └─────────────────┘
│                                                │
│                                                │
│              ┌─────────────────┐              │
│              │                 │              │
└─────────────▶│   TURN Server   │◀─────────────┘
│   (CoTURN)      │
└─────────────────┘
│
▼
┌─────────────────┐
│                 │
│     Redis       │
│   (Sessions)    │
└─────────────────┘
  

Core Components

1. Frontend (Next.js + React)

2. Backend (Node.js + Socket.IO)

3. TURN/STUN Server

4. Redis

Data Flow

Connection Establishment

  1. Host creates a room → Server generates Room ID & Password
  2. Host starts screen capture → WebRTC creates offer
  3. Viewer joins with credentials → Server validates
  4. WebRTC negotiation → P2P connection established
  5. Stream flows directly between peers

Security Measures

Scalability Considerations

Horizontal Scaling

Performance Optimization

Technology Stack

Layer Technology Purpose
Frontend Next.js, React UI Framework
Styling Tailwind CSS CSS Framework
WebRTC SimplePeer P2P Connection
Backend Node.js, Express Server Framework
WebSocket Socket.IO Real-time Communication
Database Redis Session Storage
Proxy Nginx Reverse Proxy
Container Docker Containerization