Skip to content

About

An IDE build for andriod devices

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

129 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VSCode Android

A production-ready VS Code-like Android application built with Tauri v2, featuring real-time GitHub Codespaces synchronization for lag-free mobile coding.

Version License Platform Tauri

Features

Core Editor

  • πŸ“ 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 Codespaces Integration

  • πŸ” 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

Sync System

  • ⚑ 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

Mobile Optimizations

  • πŸ‘† 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

Architecture

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
Loading

Tech Stack

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

Project Structure

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

Getting Started

Prerequisites

  1. Rust (1.70+)

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Node.js (18+)

    # Using nvm
    nvm install 18
    nvm use 18
  3. Android Studio with:

    • Android SDK (API 24+)
    • Android NDK
    • CMake
  4. Tauri CLI

    cargo install tauri-cli
  5. GitHub OAuth App

Installation

# 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"

Development

# 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

Testing

# Unit tests
npm run test

# E2E tests
npm run test:e2e

# Lint
npm run lint

Configuration

GitHub OAuth Setup

  1. Go to GitHub Developer Settings
  2. Create new OAuth App
  3. Set Authorization callback URL to vscode-android://oauth/callback
  4. Copy Client ID and Secret
  5. Update src-tauri/src/github.rs with your credentials

Android Signing

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"
    }
  }
}

Keyboard Shortcuts

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

API Reference

Tauri Commands

Authentication

  • github_login() - Initiate OAuth flow
  • github_callback(code, state) - Handle OAuth callback
  • get_github_user() - Get current user
  • logout() - Clear auth tokens

Codespaces

  • list_codespaces() - List all codespaces
  • get_codespace(name) - Get codespace details
  • start_codespace(name) - Start a codespace
  • stop_codespace(name) - Stop a codespace
  • create_codespace(repo, options) - Create new codespace

Sync

  • sync_file_to_codespace(path, content) - Push file changes
  • sync_file_from_codespace(path) - Pull file from remote
  • push_all_changes() - Flush pending changes
  • pull_all_changes() - Pull remote changes
  • get_sync_status() - Get current sync status

Security

  • πŸ”’ Tokens stored in encrypted Tauri Store
  • πŸ” OAuth state verification (CSRF protection)
  • πŸ›‘οΈ CSP headers configured
  • πŸ”‘ No plaintext secrets in code

Privacy

  • All code editing happens locally
  • Tokens never leave the device
  • No telemetry by default
  • Open source and auditable

Troubleshooting

Build Issues

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:build

Runtime Issues

Problem: 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 codespace scope
  • Check Codespace is in available or running state

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE for details.

Acknowledgments

Roadmap

  • Extension support (VS Code compatible)
  • Multi-root workspaces
  • Integrated Git UI
  • Debug adapter protocol support
  • Pair programming mode
  • Custom themes
  • Plugin marketplace

License

See LICENSE for details.


Built with ❀️ for mobile developers

CI/CD & Automated Builds

Build Status

CI/CD Pipeline Quick Build

Download Pre-built APKs

You can download test builds directly from GitHub Actions:

  1. Go to Actions tab
  2. Select Quick Build (Manual Trigger)
  3. Click Run workflow (or view past runs)
  4. Download APK from Artifacts section

Trigger a Build

Automatic (on push)

git push origin main

Manual (from GitHub)

  1. Navigate to Actions β†’ Quick Build
  2. Click Run workflow
  3. Select build type
  4. Download APK when complete

Install Downloaded APK

# Via ADB (USB debugging required)
adb install vscode-android-debug.apk

# Or transfer to device and install directly

See BUILD_GUIDE.md for detailed instructions.

About

An IDE build for andriod devices

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages