# Production Deployment Guide This guide explains how to build and deploy the Orbital Simulator in production environments. ## Building for Production ### 1. Rust API Server Build the optimized API server: ```bash # Build without GUI dependencies (recommended for servers) cargo build --release --bin api_server --no-default-features # Or build with GUI support (if system libraries are available) cargo build --release --bin api_server --features gui ``` The compiled binary will be at `target/release/api_server`. ### 2. Web Frontend Build the optimized web frontend: ```bash cd web npm install npm run build ``` The built files will be in `web/dist/`. ### 3. Desktop GUI (Optional) Build the desktop application: ```bash # Install Tauri CLI if not already installed cargo install tauri-cli # Build the desktop app cargo tauri build --features gui ``` The built application will be in `src-tauri/target/release/bundle/`. ## Deployment Options ### Option 1: Single Server Deployment Deploy both API and web frontend on the same server: ```bash # 1. Copy the API server binary cp target/release/api_server /opt/orbital_simulator/ # 2. Copy the web files cp -r web/dist /opt/orbital_simulator/static # 3. Create systemd service sudo tee /etc/systemd/system/orbital-simulator.service > /dev/null <