Skip to content

dvinix/Zenflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŠ Zenflow Remote

๐Ÿš€ The Ultimate Wireless PC Control Experience ๐Ÿš€

Platform Language UI Framework Architecture WebSocket

Stars Android Version Open Source Status

โœจ Transform your smartphone into a wireless touchpad and keyboard for your PC โœจ

๐ŸŽฏ Experience seamless remote control with cutting-edge Android architecture
โšก Real-time WebSocket communication โ€ข ๐ŸŽจ Modern Material 3 UI โ€ข ๐Ÿง  MVVM Architecture

๐Ÿš€ Quick Start โ€ข โœจ Features โ€ข ๐Ÿ—๏ธ Architecture โ€ข ๐Ÿค Contributing โ€ข ๐Ÿ›ฃ๏ธ Roadmap


๐ŸŽฏ What is Zenflow?

๐Ÿ”ฅ The next-generation remote control app that developers actually want to contribute to!

Zenflow Remote isn't just another remote control app โ€“ it's a showcase of modern Android development! Built from the ground up with the latest tech stack, this project demonstrates how to create production-ready Android applications that are both powerful for users and delightful for developers.

๐ŸŽจ For Users

  • ๐Ÿ–ฑ๏ธ Silky-smooth touchpad with multi-touch gestures
  • โŒจ๏ธ Full keyboard support with special keys
  • ๐ŸŽฎ Media controls for music and videos
  • ๐Ÿ”— Instant connection via WiFi or hotspot
  • ๐Ÿ“ฑ Beautiful UI with Material 3 design
  • ๐ŸŒ™ Dark theme optimized for all lighting

๐Ÿ’ป For Developers

  • ๐Ÿ—๏ธ Clean MVVM Architecture you can learn from
  • ๐ŸŽจ 100% Jetpack Compose - no XML views!
  • โšก Kotlin Coroutines for async mastery
  • ๐Ÿ’‰ Hilt Dependency Injection best practices
  • ๐ŸŒ Ktor WebSocket implementation
  • ๐Ÿงช Testable code with proper separation

โœจ Features That Will Blow Your Mind

๐Ÿ–ฑ๏ธ Advanced Touchpad Control

๐ŸŽฏ Precision Movement Pixel-perfect cursor control with configurable sensitivity
๐Ÿ‘† Multi-touch Gestures Two-finger scrolling, pinch-to-zoom, three-finger swipe
๐Ÿ–ฑ๏ธ Smart Clicking Left click, right click, middle click, drag & drop
๐ŸŽฎ Gaming Mode Low-latency mode for gaming and precise applications

โŒจ๏ธ Professional Keyboard Experience

๐Ÿ“ฑ Native Integration Uses your phone's keyboard + custom virtual keys
๐Ÿ”ง Function Keys F1-F12, Ctrl, Alt, Win, Esc, Delete, and more
โŒจ๏ธ Key Combinations Ctrl+C, Alt+Tab, Win+R - all keyboard shortcuts work
๐ŸŽต Media Controls Play/Pause, Volume, Next/Previous track

๐ŸŒ Rock-Solid Connectivity

โšก Real-time WebSocket Sub-10ms latency with automatic reconnection
๐Ÿ”„ Auto-Reconnect Never lose connection with intelligent retry logic
๐Ÿ”ฅ Hotspot Mode No WiFi? No problem! Direct device connection
๐Ÿ“Š Connection Monitoring Real-time status, logs, and performance metrics

๐Ÿ† Why Choose Zenflow Over Others?

๐Ÿ†š Zenflow vs. The Competition

Feature ๐ŸŒŠ Zenflow ๐Ÿ“ฑ Other Apps
๐Ÿ—๏ธ Architecture โœ… Modern MVVM + Clean Architecture โŒ Legacy MVC patterns
๐ŸŽจ UI Framework โœ… 100% Jetpack Compose โŒ XML-based Views
โšก Performance โœ… <10ms latency, Coroutines โŒ High latency, blocking calls
๐ŸŒ Networking โœ… Modern Ktor WebSocket โŒ Basic HTTP polling
๐Ÿ’‰ Dependencies โœ… Hilt DI, testable code โŒ Tight coupling, hard to test
๐Ÿ”„ Updates โœ… Reactive StateFlow/LiveData โŒ Manual UI updates
๐Ÿ“ฑ Design โœ… Material 3, Dark theme โŒ Outdated UI designs
๐Ÿ› ๏ธ Developer Experience โœ… Open source, clean code โŒ Closed source, messy code
๏ฟฝ Hotspot Mode โœ… Direct connection, no WiFi needed โŒ WiFi network required
๐Ÿ“Š Debugging โœ… Real-time logs, test server โŒ No debugging tools

๐ŸŽฏ The Bottom Line

Quality Learning Performance DX

Zenflow isn't just an app โ€“ it's a masterclass in modern Android development!

๐Ÿ“ฑ What We've Built So Far

๐Ÿ  Core Architecture

๐Ÿ“ฆ Zenflow Remote
โ”œโ”€โ”€ ๐ŸŽจ UI Layer (Jetpack Compose)
โ”‚   โ”œโ”€โ”€ ๐Ÿ“บ Touchpad Screen - Advanced multi-touch control
โ”‚   โ”œโ”€โ”€ โŒจ๏ธ Keyboard Screen - Virtual keyboard interface
โ”‚   โ”œโ”€โ”€ ๐Ÿ”Œ Connection Screen - Network setup and management
โ”‚   โ””โ”€โ”€ ๐Ÿงญ Navigation - Seamless screen transitions
โ”œโ”€โ”€ ๐Ÿง  ViewModel Layer (MVVM)
โ”‚   โ”œโ”€โ”€ TouchpadViewModel - Gesture and input processing
โ”‚   โ””โ”€โ”€ State Management - Reactive UI updates
โ”œโ”€โ”€ ๐ŸŒ Network Layer
โ”‚   โ”œโ”€โ”€ KtorWebSocketManager - Modern coroutine-based networking
โ”‚   โ””โ”€โ”€ Connection Management - Auto-reconnect & error handling
โ””โ”€โ”€ ๐Ÿ’‰ Dependency Injection (Hilt)
    โ”œโ”€โ”€ NetworkModule - WebSocket dependencies
    โ””โ”€โ”€ DatabaseModule - Local storage setup

๐ŸŽจ User Interface Components

๐Ÿ–ฑ๏ธ Touchpad Interface

  • Multi-touch Support - Smooth cursor movement and gestures
  • Right-click Detection - Context menu support
  • Scroll Gestures - Two-finger scrolling
  • Drag & Drop - File manipulation support
  • Connection Status - Real-time connectivity indicators

โŒจ๏ธ Virtual Keyboard

  • System Keyboard Integration - Native Android keyboard support
  • Custom Virtual Keys - Function keys (F1-F12), Ctrl, Alt, Win
  • Special Characters - Full ASCII character set
  • Modifier Keys - Shift, Ctrl, Alt combinations
  • Responsive Layout - Adaptive to different screen sizes

๐Ÿ”Œ Connection Management

  • IP Address Input - Validation and connection setup
  • Connection Status - Visual indicators and logging
  • Auto-discovery - Network scanning capabilities
  • Settings Panel - Connection preferences and debugging

๐Ÿ› ๏ธ Technical Implementation

๐Ÿ“ก Network Architecture

๐ŸŒ KtorWebSocketManager
โ”œโ”€โ”€ ๐Ÿ”„ Auto-reconnection (3 attempts)
โ”œโ”€โ”€ ๐Ÿ’“ Keep-alive mechanism (30s ping)
โ”œโ”€โ”€ โšก Coroutine-based async operations
โ”œโ”€โ”€ ๐Ÿ“Š Connection state flow
โ””โ”€โ”€ ๐Ÿ›ก๏ธ Error handling & recovery

๐ŸŽฏ Message Protocol

{
  "type": "touchpad|keyboard|command",
  "action": "move|click|key_press",
  "data": {
    "x": 100, "y": 200,
    "button": "left|right|middle",
    "key": "a", "modifiers": ["ctrl"]
  },
  "timestamp": "2025-08-24T12:00:00Z"
}

๐Ÿ—๏ธ Modern Android Stack

  • ๐ŸŽจ Jetpack Compose - Declarative UI with Material 3
  • ๐Ÿงญ Navigation Compose - Type-safe navigation
  • ๐Ÿ“ฑ ViewBinding - Safe view access
  • ๐Ÿ”„ StateFlow/LiveData - Reactive state management
  • โšก Kotlin Coroutines - Structured concurrency
  • ๐Ÿ’‰ Hilt - Dependency injection framework

๐Ÿš€ Quick Start Guide

๐ŸŽฏ Get Up and Running in 3 Minutes!

Setup Time Platforms Android

๐Ÿ“‹ What You'll Need

๐Ÿ“ฑ Android Device API 24+ (Android 7.0+)
๐Ÿ’ป PC/Laptop Windows, Mac, or Linux
๐ŸŒ Network WiFi or Mobile Hotspot
๐Ÿ Python 3.7+ (for test server)

๐ŸŽฌ Option 1: Super Quick Demo (Recommended)

๐Ÿ”ฅ Click here for instant setup with hotspot!

๐Ÿ“ฑ Phone Setup (30 seconds)

1. ๐Ÿ“ฑ Enable Mobile Hotspot: Settings โ†’ Hotspot & Tethering
2. ๐Ÿ“ Note hotspot name and password
3. ๐ŸŽฏ Your phone IP will be: 192.168.43.1

๐Ÿ’ป PC Setup (1 minute)

1. ๐ŸŒ Connect PC to your phone's hotspot
2. ๐Ÿ“‚ Clone Zenflow: git clone https://github.com/divinixx/zenflow.git
3. ๐Ÿš€ Start server: cd zenflow && python start_test_server.bat

๐Ÿ“ฑ App Connection (30 seconds)

1. ๏ฟฝ Install and open Zenflow Remote
2. ๏ฟฝ Go to Connection screen
3. ๐Ÿ“ Enter: 192.168.43.1:8080
4. โœ… Tap Connect!

๐ŸŽ‰ Done! Start controlling your PC!


๐ŸŒ Option 2: WiFi Network Setup

๐Ÿ  Both devices on same WiFi network

1๏ธโƒฃ Find Your PC's IP Address

# Windows
ipconfig | findstr IPv4

# Mac/Linux  
ifconfig | grep inet

2๏ธโƒฃ Start the Test Server

# Download and run
git clone https://github.com/divinixx/zenflow.git
cd zenflow
python start_test_server.bat

3๏ธโƒฃ Connect Your Phone

1. ๐Ÿ“ฑ Open Zenflow Remote app
2. ๐Ÿ” Navigate to Connection screen  
3. ๐Ÿ“ Enter PC IP: 192.168.1.XXX:8080
4. ๐Ÿ”Œ Tap "Connect"
5. โœ… Start controlling!

๐Ÿ’ป Option 3: Developer Setup

๐Ÿ› ๏ธ Full development environment

๐Ÿ“ฑ Android Studio Setup

1. ๏ฟฝ Clone: git clone https://github.com/divinixx/zenflow.git
2. ๏ฟฝ Open in Android Studio
3. ๏ฟฝ Sync Gradle dependencies
4. ๐Ÿ“ฑ Run on device/emulator

๐Ÿ Python Server Setup

# Install dependencies
pip install websockets

# Run with custom configuration
python test_server.py --host 0.0.0.0 --port 8080

# Or use the batch file
./start_test_server.bat

๐Ÿ” Debug & Monitor

# View WebSocket messages
python test_server.py --verbose

# Monitor connection logs in app
Settings โ†’ Show Logs โ†’ Watch real-time traffic

๐ŸŽฏ Connection Examples

๐Ÿ”ฅ Hotspot Mode ๐Ÿ  WiFi Mode
๐Ÿ“ฑ Phone: 192.168.43.1 (Hotspot)
๐Ÿ’ป PC: 192.168.43.2 (Client)
๐Ÿ”Œ Connect to: 192.168.43.1:8080
๐Ÿ“ฑ Phone: 192.168.1.5 (WiFi)
๐Ÿ’ป PC: 192.168.1.100 (WiFi)  
๐Ÿ”Œ Connect to: 192.168.1.100:8080

๐Ÿ”ง Configuration & API

โš™๏ธ WebSocket Manager API

@Inject
class TouchpadViewModel(
    private val webSocketManager: KtorWebSocketManager
) : ViewModel() {
    
    // Connect to server
    suspend fun connect(ip: String, port: Int = 8080) {
        webSocketManager.connect(ip, port)
    }
    
    // Send touchpad movement
    fun sendMouseMove(deltaX: Float, deltaY: Float) {
        val message = MouseMessage(
            type = "touchpad",
            action = "move",
            data = MouseData(deltaX, deltaY)
        )
        webSocketManager.sendMessage(message)
    }
    
    // Send keyboard input
    fun sendKeyPress(key: String, modifiers: List<String> = emptyList()) {
        val message = KeyboardMessage(
            type = "keyboard", 
            action = "key_press",
            data = KeyData(key, modifiers)
        )
        webSocketManager.sendMessage(message)
    }
}

๐Ÿ”— Connection States

// Observe connection state
webSocketManager.connectionState.collect { state ->
    when (state) {
        "Connected" -> showConnectedUI()
        "Connecting" -> showLoadingUI()
        "Disconnected" -> showDisconnectedUI()
        "Error" -> showErrorUI()
    }
}

๐Ÿ“š Technical Deep Dive

๐Ÿ›๏ธ Architecture Overview

๐ŸŽจ Presentation Layer
โ”œโ”€โ”€ ๐Ÿ“ฑ Jetpack Compose UI
โ”œโ”€โ”€ ๐ŸŽญ Material 3 Theme
โ””โ”€โ”€ ๐Ÿงญ Navigation Compose

๐Ÿง  Domain Layer  
โ”œโ”€โ”€ ๐Ÿ“Š ViewModels (MVVM)
โ”œโ”€โ”€ ๐Ÿ”„ Use Cases
โ””โ”€โ”€ ๐Ÿ“‹ State Management

๐Ÿ’พ Data Layer
โ”œโ”€โ”€ ๐ŸŒ WebSocket Repository
โ”œโ”€โ”€ ๐Ÿ’‰ Dependency Injection
โ””โ”€โ”€ ๐Ÿช Local Storage (DataStore)

โšก Performance Optimizations

๐Ÿ”„ State Management

  • StateFlow: Reactive UI updates with lifecycle awareness
  • collectAsStateWithLifecycle: Automatic subscription management
  • Remember: Efficient recomposition with state preservation

๐ŸŒ Network Efficiency

  • Ktor Coroutines: Non-blocking async operations
  • Connection Pooling: Efficient resource management
  • Automatic Reconnection: Resilient network handling
  • Message Queuing: Offline message handling

๐ŸŽจ UI Performance

  • LazyColumn: Efficient list rendering
  • State Hoisting: Optimized component recomposition
  • ViewInterop: AndroidView for custom components

๐Ÿ”’ Security Features

  • ๐Ÿ›ก๏ธ Input Validation: IP address and message validation
  • ๐Ÿ” Local Network Only: Designed for trusted networks
  • ๐Ÿ“Š Connection Logging: Comprehensive activity tracking
  • ๐Ÿšซ Error Boundaries: Graceful error handling

๐Ÿ“ฆ Dependencies & Libraries

๐ŸŽฏ Core Android

implementation("androidx.core:core-ktx:1.15.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.2")
implementation("androidx.activity:activity-compose:1.9.3")

๐ŸŽจ UI Framework

implementation("androidx.compose.ui:ui:1.7.8")
implementation("androidx.material3:material3:1.3.1")
implementation("androidx.navigation:navigation-compose:2.8.5")

๐ŸŒ Networking

implementation("io.ktor:ktor-client-core:3.2.3")
implementation("io.ktor:ktor-client-websockets:3.2.3")
implementation("com.google.code.gson:gson:2.13.1")

๐Ÿ’‰ Dependency Injection

implementation("com.google.dagger:hilt-android:2.48")
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")

๐Ÿ›ฃ๏ธ Roadmap & Future Features

๐ŸŽฏ Next Phase Development

๐Ÿ”’ Enhanced Security

  • ๐Ÿ” SSL/TLS Support - Encrypted WebSocket connections (WSS)
  • ๐Ÿ”‘ Authentication System - User login and device pairing
  • ๐Ÿ›ก๏ธ Certificate Validation - Secure connection verification

๐ŸŽฎ Advanced Controls

  • ๐ŸŽฏ Gesture Recognition - Custom touchpad gestures
  • ๐Ÿ”Š Media Controls - Volume, play/pause, skip
  • ๐Ÿ“บ Display Controls - Monitor switching, resolution changes
  • ๐Ÿ–ฅ๏ธ Multi-Monitor Support - Extended desktop control

๐Ÿ“ฑ Enhanced UX

  • ๐ŸŒˆ Custom Themes - Personalized color schemes
  • ๐Ÿ”ง Advanced Settings - Sensitivity, gesture configuration
  • ๐Ÿ“Š Analytics Dashboard - Usage statistics and insights
  • ๐Ÿ”” Notifications - Connection alerts and status updates

๐ŸŒ Network Features

  • ๐Ÿ” Auto-Discovery - Automatic PC detection on network
  • ๐Ÿ“ก Multiple Connections - Support for multiple PCs
  • โ˜๏ธ Cloud Sync - Settings backup and restoration
  • ๐Ÿ“ฑ Hotspot Mode - Direct device-to-device connection

๐Ÿ“ˆ Performance Goals

  • โšก < 10ms Latency - Ultra-responsive control
  • ๐Ÿ”‹ Battery Optimization - Extended usage time
  • ๐Ÿ“ฑ Memory Efficiency - < 50MB RAM usage
  • ๐ŸŒ Network Optimization - Minimal bandwidth usage

๐Ÿค Contributing

We welcome contributions! Here's how you can help:

๐Ÿ› Bug Reports

  • Use GitHub Issues with detailed reproduction steps
  • Include device info, Android version, and logs
  • Provide network configuration details

โœจ Feature Requests

  • Open GitHub Discussions for new ideas
  • Provide use cases and implementation suggestions
  • Consider backward compatibility

๐Ÿ’ป Code Contributions

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Follow Kotlin coding standards
  4. Add comprehensive tests
  5. Submit a pull request

๐Ÿ“ Development Guidelines

  • Follow MVVM architecture patterns
  • Use Jetpack Compose best practices
  • Implement proper error handling
  • Add documentation for public APIs
  • Maintain 80%+ test coverage

๐Ÿ“„ License

MIT License

Copyright (c) 2025 Zenflow Remote

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

๏ฟฝ Join the Zenflow Revolution! ๐ŸŽ‰

Zenflow Logo

๐ŸŒŸ Turn your smartphone into the ultimate PC companion ๐ŸŒŸ

Built with โค๏ธ by developers, for developers
Showcasing the best of modern Android architecture


๐Ÿš€ Ready to Contribute?

Star
โญ Star Us!
Show your support
Fork
๐Ÿด Fork & Hack!
Make it your own
Issues
๐Ÿ› Report Issues!
Help us improve
Discussions
๐Ÿ’ก Share Ideas!
Shape the future

๐Ÿ“Š Project Stats

GitHub stars GitHub forks GitHub issues GitHub license

GitHub last commit GitHub code size GitHub top language


๏ฟฝ๏ธ Tech Stack Showcase

Kotlin
Kotlin
Android
Android
Compose
Compose

๐Ÿ—๏ธ Architecture: MVVM โ€ข ๐ŸŽจ UI: Material 3 โ€ข ๐ŸŒ Network: WebSocket โ€ข ๐Ÿ’‰ DI: Hilt โ€ข โšก Async: Coroutines


๐ŸŽฏ Made with โค๏ธ by @divinixx in India

Zenflow Remote โ€ข Powered by Kotlin & Jetpack Compose โ€ข MIT License

โญ If this project helped you, please give it a star! โญ


2025 Android

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published