A production-ready VS Code-like Android application built with Tauri v2, featuring real-time GitHub Codespaces synchronization for lag-free mobile coding.
- 📝 Monaco Editor - Full VS Code editor experience with IntelliSense, syntax highlighting, and multi-cursor editing
- 🎨 VS Code Theming - Dark/Light themes matching VS Code's appearance
- 📑 Tab Management - Multiple file tabs with dirty state tracking
- ⌨️ Keyboard Shortcuts - VS Code-compatible shortcuts adapted for mobile
- 🔐 GitHub OAuth - Secure authentication with token storage
- 🖥️ Codespace Management - List, start, stop, and connect to Codespaces
- 🔄 Real-time Sync - Bidirectional sync between local editor and remote Codespace
- 📡 WebSocket Proxy - Terminal and debugger output from Codespace
- ⚡ Debounced Auto-sync - Changes sync 300ms after typing stops
- 📴 Offline Mode - Full editing capability without network
- 🔄 Sync Queue - Pending changes queue for offline edits
- ⚖️ Conflict Resolution - Smart merge with last-write-wins fallback
- 👆 Touch-friendly UI - 44px minimum touch targets
- 📱 Responsive Layout - Adapts to all screen sizes
- 🔄 Gesture Support - Swipe navigation, pull-to-refresh
- 📲 Fullscreen Mode - Distraction-free coding
graph TB
subgraph Frontend ["React Frontend"]
A[Monaco Editor]
B[UI Components]
C[State Management - Jotai]
D[Command Palette]
end
subgraph Tauri ["Tauri Rust Backend"]
E[API Commands]
F[Sync Engine]
G[Conflict Resolver]
H[WebSocket Handler]
end
subgraph External ["External Services"]
I[GitHub OAuth]
J[Codespaces API]
K[Codespace WebSocket]
end
A --> C
B --> C
D --> C
C --> E
E --> F
F --> G
F --> H
E --> I
E --> J
H --> K
| Layer | Technology |
|---|---|
| Framework | Tauri v2 (Android) |
| Frontend | React 18 + TypeScript |
| Build | Vite |
| Styling | Tailwind CSS |
| State | Jotai |
| Editor | Monaco Editor |
| Terminal | xterm.js |
| Backend | Rust |
| HTTP | reqwest |
| WebSocket | tungstenite |
| Diff | diffy |
vscode-android/
├── src/ # React frontend
│ ├── components/ # UI components
│ │ ├── ActivityBar.tsx
│ │ ├── AuthScreen.tsx
│ │ ├── CodespaceSelector.tsx
│ │ ├── CommandPalette.tsx
│ │ ├── EditorArea.tsx
│ │ ├── MainLayout.tsx
│ │ ├── SideBar.tsx
│ │ ├── SplashScreen.tsx
│ │ ├── StatusBar.tsx
│ │ └── TerminalPanel.tsx
│ ├── hooks/ # Custom React hooks
│ │ ├── useAuth.ts
│ │ ├── useCodespaces.ts
│ │ ├── useEditor.ts
│ │ └── useSync.ts
│ ├── lib/ # Utilities
│ │ └── utils.ts
│ ├── store/ # State management
│ ├── test/ # Test setup
│ ├── types/ # TypeScript types
│ │ └── index.ts
│ ├── App.tsx
│ ├── index.css
│ └── main.tsx
├── src-tauri/ # Rust backend
│ ├── src/
│ │ ├── codespaces.rs # Codespaces API
│ │ ├── commands.rs # Tauri commands
│ │ ├── conflict.rs # Conflict resolution
│ │ ├── github.rs # GitHub OAuth
│ │ ├── lib.rs # Main entry
│ │ ├── sync.rs # Sync engine
│ │ └── types.rs # Rust types
│ ├── Cargo.toml
│ └── tauri.conf.json
├── e2e/ # E2E tests
├── package.json
├── tailwind.config.js
├── tsconfig.json
└── vite.config.ts
-
Rust (1.70+)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Node.js (18+)
# Using nvm nvm install 18 nvm use 18 -
Android Studio with:
- Android SDK (API 24+)
- Android NDK
- CMake
-
Tauri CLI
cargo install tauri-cli
-
GitHub OAuth App
- Create at https://github.com/settings/developers
- Set callback URL to your app's custom scheme
# Clone the repository
git clone https://github.com/your-org/vscode-android.git
cd vscode-android
# Install dependencies
npm install
# Set environment variables
export GITHUB_CLIENT_ID="your_client_id"
export GITHUB_CLIENT_SECRET="your_client_secret"# Run in development mode (desktop)
npm run tauri dev
# Run on Android device
npm run tauri:android:dev
# Build APK
npm run tauri:android:apk
# Build AAB for Play Store
npm run tauri:android:aab# Unit tests
npm run test
# E2E tests
npm run test:e2e
# Lint
npm run lint- Go to GitHub Developer Settings
- Create new OAuth App
- Set Authorization callback URL to
vscode-android://oauth/callback - Copy Client ID and Secret
- Update
src-tauri/src/github.rswith your credentials
For production builds, configure signing in tauri.conf.json:
{
"bundle": {
"android": {
"keystorePath": "/path/to/keystore.jks",
"keystorePassword": "your_password",
"keyPassword": "your_key_password",
"keyAlias": "your_alias"
}
}
}| Shortcut | Action |
|---|---|
| Ctrl+Shift+P | Command Palette |
| Ctrl+B | Toggle Sidebar |
| Ctrl+S | Save File |
| Ctrl+P | Quick Open |
| Ctrl+F | Find |
| Ctrl+H | Replace |
| Ctrl+` | Toggle Terminal |
| Esc | Close Panels |
github_login()- Initiate OAuth flowgithub_callback(code, state)- Handle OAuth callbackget_github_user()- Get current userlogout()- Clear auth tokens
list_codespaces()- List all codespacesget_codespace(name)- Get codespace detailsstart_codespace(name)- Start a codespacestop_codespace(name)- Stop a codespacecreate_codespace(repo, options)- Create new codespace
sync_file_to_codespace(path, content)- Push file changessync_file_from_codespace(path)- Pull file from remotepush_all_changes()- Flush pending changespull_all_changes()- Pull remote changesget_sync_status()- Get current sync status
- 🔒 Tokens stored in encrypted Tauri Store
- 🔐 OAuth state verification (CSRF protection)
- 🛡️ CSP headers configured
- 🔑 No plaintext secrets in code
- All code editing happens locally
- Tokens never leave the device
- No telemetry by default
- Open source and auditable
Problem: cargo build fails with linker errors
# Solution: Install Android NDK and set environment
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/<version>Problem: Gradle sync fails
# Solution: Clean and rebuild
cd src-tauri
cargo clean
cd ..
npm run tauri:android:buildProblem: OAuth callback not working
- Ensure custom URL scheme is registered in AndroidManifest.xml
- Verify callback URL matches GitHub OAuth app settings
Problem: Sync not working
- Check network connectivity
- Verify GitHub token has
codespacescope - Check Codespace is in
availableorrunningstate
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE for details.
- Tauri - Cross-platform framework
- Monaco Editor - Code editor
- GitHub Codespaces - Cloud development
- xterm.js - Terminal emulator
- Extension support (VS Code compatible)
- Multi-root workspaces
- Integrated Git UI
- Debug adapter protocol support
- Pair programming mode
- Custom themes
- Plugin marketplace
See LICENSE for details.
Built with ❤️ for mobile developers
You can download test builds directly from GitHub Actions:
- Go to Actions tab
- Select Quick Build (Manual Trigger)
- Click Run workflow (or view past runs)
- Download APK from Artifacts section
git push origin main- Navigate to Actions → Quick Build
- Click Run workflow
- Select build type
- Download APK when complete
# Via ADB (USB debugging required)
adb install vscode-android-debug.apk
# Or transfer to device and install directlySee BUILD_GUIDE.md for detailed instructions.