How cyber-courses/cyber-ctf-desktop works
Cyber CTF Desktop is a Tauri launcher for authenticated Cyber CTF labs, running Docker or Vagrant/VM workloads locally or on player-managed/cloud hosts. The player enters through the desktop shell, signs in, selects a lab, and launches it; Rust owns privileged commands, downloads, credentials, process execution, and runtime lifecycle. The UI also exposes machine readiness, servers, cloud accounts, hosted sessions, and settings. Relationships for unsampled subsystems reflect README documentation; source excerpts are partial, so some implementation-level links are intentionally omitted.
Main entry points: app-shell.tsx App shell · mod.rs Runtime lifecycle · lib.rs Tauri command handlers · index.ts Typed Tauri wrappers
Components 26
Desktop experience
- App shell
src/components/app-shell.tsx - Home dashboard
src/features/home/home-screen.tsx - Lab catalogue and deploy
src/features/labs - Hosted sessions
src/features/hosted - Machine setup
src/features/machine - Server setup
src/features/servers - Cloud accounts
src/features/cloud - Settings
src/features/settings
Command boundary
- Typed Tauri wrappers
src/lib/tauri/index.ts - Tauri command handlers
src-tauri/src/lib.rs
Identity and labs
- Authentication and API
src-tauri/src/account - Lab launch service
src-tauri/src/labs.rs
Machine readiness
- System detection and tests
src-tauri/src/machine - Workloads and storage
src-tauri/src/machine/workloads.rs - Platform setup
src-tauri/src/platform
Lab runtimes
- Runtime lifecycle
src-tauri/src/runtime/mod.rs - Docker runtime
src-tauri/src/runtime/docker - Local VM runtime
src-tauri/src/runtime/vm.rs - Remote servers
src-tauri/src/runtime/server - Cloud provisioning
src-tauri/src/runtime/terraform.rs - Vagrant providers
src-tauri/src/runtime/providers.rs - Process execution
src-tauri/src/exec.rs
Other components
- Player
- Player machine
- CyberBackend
- Cloud providers
Connections 35
- Player → App shell: uses
README.md - App shell → Home dashboard: renders
src/components/app-shell.tsx - App shell → Lab catalogue and deploy: routes to
src/components/app-shell.tsx - App shell → Machine setup: routes to
src/components/app-shell.tsx - App shell → Server setup: routes to
src/components/app-shell.tsx - App shell → Cloud accounts: routes to
src/components/app-shell.tsx - App shell → Settings: routes to
src/components/app-shell.tsx - Lab catalogue and deploy → Typed Tauri wrappers: invokes commands
src/features/labs/network-diagram/index.tsx - Machine setup → Typed Tauri wrappers: invokes commands
src/features/machine/setup-steps/engine-step.tsx - Server setup → Typed Tauri wrappers: invokes commands
src/features/servers/host-setup/index.tsx - Hosted sessions → Typed Tauri wrappers: invokes commands
src/features/hosted/use-hosted-labs.ts - Typed Tauri wrappers → Tauri command handlers: calls Rust commands
README.md - Tauri command handlers → Authentication and API: dispatches auth
src-tauri/src/lib.rs - Tauri command handlers → System detection and tests: dispatches checks
src-tauri/src/lib.rs - Tauri command handlers → Lab launch service: dispatches launch
src-tauri/src/lib.rs - Player → Authentication and API: signs in
README.md - Authentication and API → CyberBackend: queries API
README.md - Lab launch service → CyberBackend: requests startLab
README.md - Lab launch service → Runtime lifecycle: starts downloaded lab
README.md - System detection and tests → Process execution: probes tools
src-tauri/src/machine/selftest.rs - System detection and tests → Vagrant providers: detects providers
src-tauri/src/machine/selftest.rs - Tauri command handlers → Workloads and storage: dispatches storage
src-tauri/src/lib.rs - Tauri command handlers → Platform setup: dispatches installs
src-tauri/src/lib.rs - Runtime lifecycle → Docker runtime: dispatches Docker
src-tauri/src/runtime/mod.rs - Runtime lifecycle → Local VM runtime: dispatches VMs
src-tauri/src/runtime/mod.rs - Runtime lifecycle → Remote servers: dispatches remote
src-tauri/src/runtime/mod.rs - Runtime lifecycle → Cloud provisioning: dispatches cloud
src-tauri/src/runtime/mod.rs - Runtime lifecycle → Process execution: runs tools
src-tauri/src/runtime/mod.rs - Remote servers → Vagrant providers: uses providers
src-tauri/src/runtime/server/mod.rs - Remote servers → Cloud provisioning: creates labs project
src-tauri/src/runtime/server/mod.rs - Vagrant providers → Process execution: runs Vagrant
src-tauri/src/runtime/providers.rs - Docker runtime → Process execution: runs Docker CLI
- Local VM runtime → Process execution: runs Vagrant
- Runtime lifecycle → Player machine: runs locally
README.md - Cloud provisioning → Cloud providers: provisions resources