# StreamFlow Desktop App - Quick Start

## For End Users

### Download & Install

1. **Download** the AppImage from releases
2. **Make executable:**
   ```bash
   chmod +x StreamFlow-*.AppImage
   ```
3. **Run:**
   ```bash
   ./StreamFlow-*.AppImage
   ```

### First Time Setup

1. Enter your server URL (e.g., `https://your-server.com`)
2. Click **"Test Connection"**
3. Enter your username and password
4. (Optional) Check **"Remember credentials"**
5. Click **"Connect"**

### If You Have 2FA

After logging in, you'll be prompted to:
- Enter your 6-digit authenticator code
- Or use an 8-character backup code

### Changing Language

Click the language button (English/Română) on the connection screen.

---

## For Developers

### Setup

```bash
cd desktop-app
npm install
npm run dev
```

### Build AppImage

```bash
./build.sh
# Or
npm run build:appimage
```

### Project Structure

- `src/main/` - Electron main process
- `src/renderer/` - Connection UI
- `src/preload/` - IPC bridge
- `build/` - Build resources (icon, desktop file)

### Key Features

✅ Server connection management  
✅ Secure credential storage (encrypted)  
✅ 2FA support (TOTP & backup codes)  
✅ Multi-language (EN, RO)  
✅ Hardware acceleration  
✅ Full web app feature parity  

### Documentation

- `README.md` - Overview & user guide
- `INSTALLATION.md` - Detailed installation
- `DEVELOPER_GUIDE.md` - Development docs
- `SECURITY_AUDIT.md` - Security review

---

## Troubleshooting

**Can't run AppImage?**
```bash
sudo apt install fuse libfuse2
```

**Connection fails?**
- Check server URL includes `http://` or `https://`
- Verify server is running
- Check firewall settings

**2FA not working?**
```bash
# Check system time is synchronized
timedatectl status
```

---

## Support

- Check documentation in `desktop-app/` folder
- Open an issue on GitHub
- Contact your server administrator

---

## Building from Source

```bash
# Prerequisites
node --version  # Need 18+
npm --version

# Install & build
cd desktop-app
npm install
./build.sh

# Output
dist/StreamFlow-*.AppImage
```

---

**That's it! Enjoy StreamFlow on your Linux desktop! 🎬📺**
