A cross-platform application built with Flutter and Python to remotely control and browse your PC from your mobile device over a local network.
PC Remote allows you to securely connect your Flutter-based mobile app to a Python server running on your PC. Once connected, you can:
- Browse your computer's file system
- Download files directly to your device
- Execute remote commands like locking your workstation
- Control media playback and system volume
- Manage power options (sleep, shutdown)
- Stream your screen to your phone in real-time via WebRTC
This project started as a learning exercise for TCP sockets and Flutter, with an initial working prototype using raw TCP. For practical purposes, the server has been migrated to FastAPI.
Current State: Work in Progress
The project contains two implementations:
pc_server_fastapi/- Python FastAPI servermobile_fastapi/- Flutter mobile app (planned rebuild)
pc_server_tcp/- Raw TCP socket servermobile_tcp/- Flutter app using raw TCP
The mobile app is being rebuilt from scratch to work with the new FastAPI backend.
- API Key Authentication - Secure access using header-based API key
- mDNS Service Discovery - Automatic server discovery using Zeroconf
- File System Browsing - List drives and browse directories
- File Download - Download files from PC to mobile
- System Controls - Lock, Sleep, Shutdown, Task Manager
- Volume Control - Get/set volume, mute toggle (REST + WebSocket)
- Media Playback - Play/pause, next track, previous track
- Screen Sharing - Real-time screen streaming via WebRTC using GPU-accelerated capture (dxcam)
- Two-way file transfer
- Clipboard sharing
fastapi- Modern async web frameworkuvicorn- ASGI serverzeroconf- mDNS service discoverypycaw- Windows audio controlctypes- Windows API accessaiortc/av- WebRTC peer connection and mediadxcam- GPU-accelerated screen capture (DXGI)
provider- State managementdio/http- HTTP clientbonsoir- mDNS service discoveryflutter_secure_storage- Secure credential storagepath_provider/permission_handler- File operations
pc_remote/
├── pc_server_fastapi/ # FastAPI server (active)
│ ├── main.py # Application entry point
│ ├── requirements.txt
│ ├── api/
│ │ ├── system.py # Lock, sleep, shutdown endpoints
│ │ ├── files.py # File browsing and download
│ │ ├── media.py # Volume & media playback control
│ │ └── stream.py # WebRTC screen sharing
│ └── utils/
│ ├── auth_utils.py # API key validation
│ ├── discovery.py # mDNS broadcast
│ ├── secret_key_gen.py
│ └── webrtc_streamer.py # dxcam screen capture track
│
├── mobile_fastapi/ # Flutter app (rebuilding)
│ └── lib/
│ └── screens/
│ ├── home_screen.dart
│ ├── control.dart
│ ├── file_explorer.dart
│ └── settings.dart
│
├── pc_server_tcp/ # Legacy TCP server
│ ├── server.py
│ ├── requirements.txt
│ ├── commands.py
│ └── file_utils.py
│
└── mobile_tcp/ # Legacy TCP mobile app
The FastAPI server exposes the following endpoints:
GET /- API health status
POST /system/lock- Lock workstationPOST /system/sleep- Put PC to sleepPOST /system/shutdown- Shutdown PCPOST /system/taskmanager- Open Task Manager
GET /files/drives- List available drivesGET /files/list?path=<path>- List directory contentsGET /files/download?path=<path>- Download a file
GET /media/volume- Get current volume levelPOST /media/volume/{level}- Set volume level (0-100)POST /media/playpause- Toggle play/pausePOST /media/mute- Toggle system mutePOST /media/next- Next trackPOST /media/prev- Previous trackWS /media/ws/volume- Real-time volume control via WebSocket
POST /stream/offer- WebRTC SDP handshake (send offer, receive answer)
All endpoints except / require the PLEASE_LET_ME_IN header with a valid API key.
- Python 3.12+
- Flutter 3.9.2+
- Windows PC (for system control features)
- Android device on the same Wi-Fi network
# 1. Clone and enter the project
git clone <repo-url>
cd PYREMOTE
# 2. Create and activate a virtual environment
python -m venv venv312
venv312\Scripts\activate # Windows
# 3. Install dependencies
pip install -r pc_server_fastapi/requirements.txt
# 4. Start the server
cd pc_server_fastapi
python main.pyThe server starts on port 8080 and broadcasts itself via mDNS. A secret API key is auto-generated on first run and stored in pc_server_fastapi/.env.
# 1. Enter the mobile project
cd mobile_fastapi
# 2. Get dependencies
flutter pub get
# 3. Build and install on your phone (USB debugging must be enabled)
flutter build apk --release
flutter installMake sure your phone and PC are on the same Wi-Fi network. The app will auto-discover the server via mDNS.
The server uses a simple API key mechanism:
- A secret key is generated on first run and stored in
.env - The mobile app must send this key in the
PLEASE_LET_ME_INheader - All protected endpoints validate this header before processing requests
- The FastAPI server includes automatic mDNS broadcasting using Zeroconf
- Service discovery allows the mobile app to find the server without manual IP entry
- The server is Windows-specific for system control features (lock, sleep, volume)
- File operations work cross-platform