Skip to content

gabrielbr/NeoDrive

Repository files navigation

NeoDrive

Decentralized file storage for everyone — built on NeoFS and the Neo N3 blockchain.

NeoDrive is a cross-platform desktop and Android app that lets you upload, download, and sync files on the NeoFS decentralized storage network — no Big Tech, no centralized servers, full ownership of your data.


Why NeoDrive?

Today's cloud storage — Google Drive, Dropbox, iCloud — is centralized. A single provider can throttle, revoke, or monetize your data. NeoDrive gives you a familiar, polished file storage experience backed by a decentralized network where you hold the keys.

NeoDrive Google Drive Dropbox
Decentralized
No Big Tech dependency
Token-based payment
Desktop app
Android app
You own your data

Features

  • File Upload & Download — Upload any file type to NeoFS and download to your local machine
  • Automatic Device Sync — Files sync across all your devices linked to the same wallet
  • NeoFS Container Management — Create, discover, and switch between NeoFS containers
  • Wallet Authentication — Connect via NeoLine (desktop) or Neon Wallet via WalletConnect (mobile)
  • Storage Dashboard — View used storage, GAS/NEO token balance, and transaction history
  • Folder Management — Create, rename, move, and delete folders
  • macOS Tray App — Runs in the menu bar for quick access to sync status
  • Android App — Full mobile experience with WalletConnect support
  • Mock Mode — Test the full UI without a real wallet or NeoFS connection

Tech Stack

Layer Technology
Desktop shell Tauri v2
Frontend React 18 + TypeScript + Vite
Styling Tailwind CSS
State management Zustand
Backend Rust
Local database sled (embedded)
NeoFS communication NeoFS HTTP REST gateway (reqwest)
Blockchain Neo N3 RPC
Desktop wallet NeoLine browser extension
Mobile wallet WalletConnect v2 (Neon Wallet)
Mobile target Tauri Android (min SDK 24 / Android 7.0)
File watching notify
Async runtime Tokio

Getting Started

Prerequisites

  • Node.js 18+
  • Rust 1.77+
  • Tauri CLI v2
  • A Neo N3 wallet (NeoLine for desktop, or Neon Wallet for mobile)

For Android development, also install:

  • Android Studio + Android SDK (API 24–34)
  • ADB
  • Java 17

Installation

git clone https://github.com/gabrielbr/NeoDrive.git
cd NeoDrive
npm install

Running

Desktop (macOS)

npm run tauri:dev

Frontend only (browser)

npm run dev
# Opens at http://localhost:1420

Android (device/emulator)

# Make sure your device is connected via USB with USB debugging enabled
npm run android:dev

Mock mode — runs without a real wallet or NeoFS connection, pre-seeded with sample files:

NEODRIVE_MOCK=1 npm run tauri:dev

Building for Production

macOS

npm run tauri:build

Android APK

npm run android:build
# Output: src-tauri/gen/android/app/build/outputs/apk/

Android App Bundle (Play Store)

npm run android:build:release
# Output: src-tauri/gen/android/app/build/outputs/bundle/

Architecture

NeoDrive
├── src/                        # React frontend
│   ├── components/
│   │   └── mobile/             # Android-specific UI components
│   ├── pages/
│   │   └── mobile/             # Android screens
│   ├── lib/
│   │   ├── invoke.ts           # Typed Tauri IPC wrappers (all backend calls go here)
│   │   ├── walletconnect.ts    # WalletConnect v2 client
│   │   └── neofsAuth.ts        # NeoFS bearer token flow (WalletConnect signing)
│   └── store/
│       └── walletStore.ts      # Zustand wallet + container state
│
└── src-tauri/                  # Rust backend
    └── src/
        ├── commands/           # Tauri IPC command handlers
        │   ├── storage.rs      # NeoFS session tokens, uploads, container ops
        │   ├── container.rs    # Container CRUD
        │   ├── files.rs        # File index queries
        │   ├── wallet.rs       # Wallet connection, balances
        │   └── neoline.rs      # NeoLine bridge (desktop)
        ├── neofs/
        │   └── client.rs       # NeoFS HTTP gateway client
        ├── sync/
        │   └── engine.rs       # File watcher + sync background task
        └── state.rs            # Shared app state (AppState)

How Sync Works

  1. User selects a local folder to watch
  2. The sync engine (Rust) monitors it with notify
  3. On file changes, the file is uploaded to NeoFS via the HTTP REST gateway
  4. A local sled database indexes every file with its NeoFS object ID, checksum, and sync status
  5. Every 5 seconds, a reconcile pass checks for:
    • Files missing from the local index (uploads them)
    • Remote tombstones (deletions from other devices)
    • Conflicts (saves a local conflict copy)

Wallet Authentication

Desktop (NeoLine)

  • Signs container creation requests via a local bridge (localhost:{port}/auto-container)
  • NeoLine browser extension handles the signature UI

Mobile (Neon Wallet via WalletConnect)

  • Pairing via WalletConnect URI (copy/paste into Neon Wallet)
  • NeoFS session tokens are signed using neo3_signMessage
  • Bearer tokens are cached per container for up to 29 days

Environment Variables

Variable Default Description
NEODRIVE_MOCK 0 Set to 1 to enable mock mode
NEOFS_REST_GATEWAY https://rest.fs.neo.org NeoFS HTTP gateway URL

Project Structure Notes

  • All Tauri IPC calls go through src/lib/invoke.ts — never call invoke() directly
  • Shared types between frontend and backend live in src-tauri/src/types.rs
  • Virtual folders are zero-byte sled entries (NeoFS has no native folder concept)
  • The android/tauri-mobile branch contains all Android-specific code

Roadmap

  • File upload & download
  • Device sync with conflict resolution
  • NeoLine wallet integration (desktop)
  • WalletConnect / Neon Wallet integration (mobile)
  • Android app
  • End-to-end encryption (v2)
  • Windows & Linux support
  • macOS App Store release
  • Fiat cost estimate alongside token amounts
  • Shared containers (team folders)

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages