Overview

Playcast Apps is organized as an Nx monorepo, providing a scalable and maintainable structure for a complex cloud gaming platform. The repository includes multiple applications, shared libraries, and supporting tools all working together to deliver high-performance gaming experiences.

🏗️ Nx Workspace Benefits

  • Unified Development: All applications and libraries in one repository
  • Dependency Management: Automatic dependency graph analysis and optimization
  • Build Caching: Intelligent caching reduces build times significantly
  • Code Sharing: Easy sharing of code between different applications
  • Task Orchestration: Coordinated testing, linting, and building across projects

Monorepo Layout

The repository follows a standard Nx workspace structure with clear separation between applications and libraries:

📁 playcast-apps/
📁 apps/ Application projects
📱 host/ Electron + React desktop app
🎮 playjector/ C++ game capture engine
☁️ orchestrator/ Session management service
realtime-api/ Java WebRTC signaling service
🌐 marketing/ Public website
📚 libs/ Shared library packages
📊 Analytics/ Analytics and tracking
🏗️ CoreTypes/ TypeScript type definitions
💬 Messaging/ Real-time messaging system
🔗 Peer/ WebRTC peer connections
⚙️ Configuration
📄 nx.json Nx workspace configuration
📦 package.json Root package configuration
🔧 tsconfig.base.json TypeScript base configuration

Applications

The apps/ directory contains 16 independent applications that can be built and deployed separately:

📱

Host Application

apps/host/

The main desktop application built with Electron and React. Provides the gaming interface and manages streaming sessions.

Structure:

  • host-electron/ - Electron main process
  • host-frontend/ - React frontend application
Electron 36.2.0 React 18.3.1 TypeScript
🎮

Playjector

apps/playjector/

High-performance C++ application for game capture, encoding, and streaming. Handles DirectX game capture with minimal latency.

Key Components:

  • ShadowCam - Screen capture system
  • PlaycastService - Core streaming service
  • Watchdog - Process monitoring
C++ DirectX Windows API
☁️

Orchestrator

apps/orchestrator/

Node.js backend service managing game sessions, user authentication, and coordination between system components.

Features:

  • Session management
  • User authentication
  • Load balancing
  • Health monitoring
Node.js Express WebSocket

Realtime API

apps/realtime-api/

Java-based service handling real-time communication and WebRTC signaling for optimal streaming performance.

Capabilities:

  • WebRTC signaling
  • Real-time messaging
  • Connection management
  • Quality monitoring
Java Spring WebRTC
🌐

Marketing Site

apps/marketing/

Public-facing website for user onboarding, product information, and marketing content.

Features:

  • Landing pages
  • User registration
  • Product showcase
  • Blog content
React Next.js Tailwind CSS
🔧

Utility Applications

apps/utility-*/

Collection of specialized utility applications for development, testing, and operational tasks.

Utilities Include:

  • admin-dashboard - Administrative interface
  • debugTools - Development debugging tools
  • metrics - Performance metrics collection
  • utility-metrics - System monitoring
  • utility-playtester - Game testing automation
  • utility-webrtc - WebRTC diagnostics
  • bots - Automated testing bots
  • node-service - General Node.js service
  • playcast-installer - Application installer
  • vpn-security - Security monitoring

Shared Libraries

The libs/ directory contains 27 shared libraries that provide reusable functionality across all applications:

🏗️ Core Libraries

CoreTypes

Central TypeScript type definitions and interfaces used across the platform.

Used by all TypeScript projects

GlobalConfig

Application configuration management and environment-specific settings.

Configuration provider

CreateId

Unique identifier generation utilities for sessions, users, and resources.

ID generation service

💬 Communication & Streaming

Messaging

Real-time messaging system for communication between components.

WebSocket messaging

Peer

WebRTC peer connection management and signaling.

P2P connections

MessageCaptureClient

Client-side message capturing and logging functionality.

Message logging

🎨 UI Components

Footer

Reusable footer components for web applications.

UI component

OAuthButtons

Authentication UI components for various OAuth providers.

Auth UI

MobileGamepad

Virtual gamepad interface for mobile devices.

Mobile controls

ImageFactory

Image processing and optimization utilities.

Image processing

🔧 Utilities & Integrations

Analytics

Analytics collection and reporting with BigQuery integration.

Data collection

ApiUtil

HTTP client utilities and API communication helpers.

API client

Cookie

Cookie management and session storage utilities.

Session management

DebugKit

Development debugging tools and utilities.

Development tools

InputCapture

Input handling and capture for gaming controls.

Input management

PerformanceTests

Performance testing and benchmarking utilities.

Testing framework

📚 Content & Data

ArticleContent

Content management system for articles and documentation.

Content management

PlaylistTypes

Type definitions and utilities for game playlists.

Playlist management

PolicyContent

Legal policy and terms of service content management.

Policy management

SEO

Search engine optimization utilities and meta tag management.

SEO optimization

Configuration Files

Key configuration files that define the workspace behavior and project settings:

nx.json

Nx workspace configuration defining build targets, caching strategies, and task dependencies.

Key Settings:

  • Build target defaults and caching
  • Task runner configuration (parallel: 4)
  • Plugin configuration for Webpack, Vite, and ESLint
  • Named inputs for production builds

package.json

Root package configuration with dependencies and workspace scripts.

Key Features:

  • Node.js ≥20 requirement
  • Comprehensive development scripts
  • 200+ dependencies for full-stack development
  • Platform-specific post-install hooks

tsconfig.base.json

Base TypeScript configuration with path mappings for all libraries.

Features:

  • Path mappings for @playcastdotio/* imports
  • Strict TypeScript configuration
  • ES2020 target with modern features
  • Decorator support for frameworks

Build Configuration

Specialized build configurations for different application types.

Includes:

  • Webpack configs for Electron apps
  • Vite configs for modern web apps
  • Jest configs for testing
  • ESLint configs for code quality

Summary

16
Applications
From desktop apps to services
27
Libraries
Shared across all projects
1,392
TS/JS Files
Frontend and backend code
1,104
C++ Files
High-performance native code

🎯 Next Steps

Now that you understand the project structure, explore: