GNU Affero General Public License v3.0

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

LynavoDrive:一个开源的私有照片备份及文件访问解决方案

项目背景与痛点

在数字化时代,云端数据存储和同步已经成为了用户日常生活的刚需。Apple 的 iCloud 和 Google Photos 无疑是当前市场中最受欢迎的两项服务,然而,这些商业服务存在诸如隐私泄露、高昂的维护成本等问题。LynavoDrive 项目以解决这些问题为目标,提供了一个开源的、隐私保护的、私有照片备份方案。它旨在让用户对自己的数据拥有完全的控制权,并且可以在不需要依赖第三方云服务的情况下,实现跨设备的文件同步与备份。

核心技术揭秘

LynavoDrive 的设计思想在于构建一个高度可扩展的分布式系统,确保数据的安全性与完整性。它的核心技术栈包括 Go 语言、SQLite 数据库以及零信任网络协议。

技术架构

LynavoDrive 的整体架构设计支持多用户、多设备的操作。下面是其主要的数据流图:

graph TD A[用户操作] --> B[API 请求] B --> C{"路由控制"} C -->|"数据库操作"| D[SQLite 数据库] C -->|"文件操作"| E[文件系统] D --> F[元数据存储] E --> F F --> G[数据同步] B --> H[鉴权模块] H --> I[认证策略] I -->|"通过"| J[授权访问] I -->|"失败"| K[拒绝访问] J --> G

开发者采用了零信任网络协议确保用户数据的加密传输,同时也利用 SQLite 进行快速的本地缓存和检索。由于其出色的架构设计,LynavoDrive 能够在多种操作系统平台上实现同步服务,并保证高效的数据同步操作。

功能亮点与差异

相较于 iCloud 和 Google Photos,LynavoDrive 的独特优势在于其全面的开源性质以及强大的隐私防护特性。用户可以自由地部署、调整和维护这一系统,另外,不需要将敏感数据上传至第三方中心化的存储设备,从而大大提升了数据的安全性和隐私保护。

其核心功能围绕图片与文件的本地存储和跨设备同步展开,尤其是对于希望在设备间安全转移私有照片和文档的个人与小团队而言是理想之选。

应用场景与落地建议

由于其开源且去中心化的特性,LynavoDrive 适用于个人及对数据控制有明确要求的小型组织。不过,开发和运维要求较高,需要有Go或SQLite编程相关的基础。此外,针对实际生产环境,需考虑几个方面的因素:

  1. 使用足够强大的硬件以支持存储需求;
  2. 考虑建立本地冗余备份机制,防止数据丢失;
  3. 对于安全性要求高的场景,强化本地网络的安全设置。

总之,它非常适合那些希望自行管理数字足迹的人或团队,为构建私有云基础设施提供了一个灵活、安全的选项。

综合评价

LynavoDrive 成功地提供了一个成熟的替代方案,旨在对抗中心化云服务存在的一些安全和隐私方面的问题。其通过高度模块化和灵活性的设计,辅之以强大的开源社区支持,使得中小型用户能便捷地组建私有云环境。

这无疑是一个具有前瞻性的小型项目,但这同时也意味着它面临许多技术挑战。比如需要长久的性能优化、扩展性改进以及更加成熟的账户及权限管理体系等等。从另一个角度来看,这些未被解决的问题或许会吸引更多开发者的参与与贡献,进一步推动其改进。

关于

GitHub 原始描述(英文)

LynavoDrive (Lynavo Drive) by Lynavo - an open-source alternative to iCloud and Google Photos for private photo backup and computer file access.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
700
价值分
343
活跃状态
活跃

语言占比

CSS
Go
HTML
JavaScript
Kotlin
Makefile
NSIS
Objective-C
Python
Ruby
Shell
Swift
TypeScript

Release

README

English | 繁體中文

Lynavo Drive animated product banner

A high-performance, local-LAN incremental media sync tool from mobile (iOS / Android) to desktop (macOS / Windows).

LynavoDrive (Lynavo Drive) official website • Official signed app downloads

OSS Release Gate CI Node Version Go Version Desktop Platform Mobile Platform License

Editions & Downloads • Product Preview • Key Features • OSS Boundaries • Developer Quick Start • Contributing • Community & Social


Project Status

Lynavo Drive is implemented and open for community source builds and contributions. This repository provides one public local source-build and package-verification path; it does not publish official signed installers, mobile store builds, auto-updates, or hosted services.

Surface Current OSS scope
💻 Desktop macOS and Windows application runtime
📱 Mobile iOS and Android application runtime
🐧 Linux Local source-build and package verification only
🌐 Network Foreground sync over the same LAN
📦 Distribution Community source builds and locally produced packages/binaries

📦 Editions & Downloads

Edition What it includes Download
Open Source Edition The local-LAN core in this repository, source builds, and unsigned verification files GitHub Releases
Official / Commercial Edition Signed desktop installers, official mobile builds, and services available for the selected plan Official Downloads

Commercial binaries, signing, account services, remote access, billing, and updates are built and operated outside this repository. Their version numbers, license terms, capabilities, and support policy may differ from an OSS tag. GitHub Release assets remain open-source build-verification outputs only.

📸 Product Preview

Lynavo Drive Product Preview

✨ Key Features

  • Automatic incremental media sync: Scans the mobile photo library and queues unsynced photos and videos without manual file selection.
  • Local discovery and pairing: Finds desktops through mDNS on the same LAN, then pairs with a QR code or six-digit pairing code.
  • Resumable serial transfers: Uploads one file per phone at a time and continues unfinished queue items after foreground LAN reconnection.
  • Read-only queue and history: Shows transfer progress, completed files, and completion-day statistics without delete, skip, or reorder controls.
  • Shared-file access: Lets mobile users browse and download files exposed by the desktop’s local shared directories. This is separate from automatic media upload.
  • Local diagnostics: Exports desktop and mobile diagnostics without relying on a hosted diagnostics service.

🛡️ OSS Boundaries

Important 重要

Local-LAN Open-Source Core

  • Foreground automatic sync works without sign-in or an account service.
  • The upload set comes only from the mobile photo-library scan and local pending queue; there is no manual file-selection fallback.
  • The queue is read-only, and each phone uploads one file at a time.
  • Missing non-OSS modules or account-service state do not block foreground LAN pairing and sync.
Warning 警告

Not Included In This Repository

  • Remote access, cloud relay, tunnel credentials, official accounts, and silent background continuation are unavailable and remain disabled.
  • Desktop signing, notarization, mobile store distribution, package upload, and auto-update infrastructure are not provided; only stable-tag Android APK/AAB assets use repository signing Secrets.
  • The source package does not redistribute Apple Bonjour for Windows. It uses a locally installed/configured Bonjour runtime when available, otherwise the zeroconf-compatible fallback.
  • Linux remains a local build and package-verification target, not a supported desktop user surface.

🚀 Developer Quick Start

This is a contributor workflow, not an end-user installer. See the release playbook for local package builds and platform-specific verification.

💻 Setup & Start Commands
# 1. Enable the repository's pinned pnpm version and install dependencies
corepack enable
pnpm install --frozen-lockfile

# 2. Build shared packages
pnpm --filter @lynavo-drive/contracts build
pnpm --filter @lynavo-drive/design-tokens build

# 3. Start desktop development mode
pnpm dev:desktop

The Electron window opens automatically, and the desktop app starts the sidecar.

To run a mobile client, keep the desktop running and use another terminal:

📱 Mobile Development Commands
# Start Metro
pnpm dev:mobile

# Then launch one platform from another terminal
pnpm --filter @lynavo-drive/mobile ios
# or
pnpm dev:mobile:android

Platform prerequisites still apply: iOS requires macOS, Xcode, and CocoaPods; Android requires Android Studio plus the Android SDK/NDK.

Pair the applications:

  1. Keep the phone and desktop on the same LAN.
  2. Open Lynavo Drive on the desktop and set or view the six-digit pairing code.
  3. On mobile, discover the desktop and scan its QR code or enter the pairing code.
  4. Keep the mobile app in the foreground for OSS automatic LAN sync.

❓ FAQs & Troubleshooting

For a checkpoint-based first run, see First Automatic Backup: Setup And Verification.

🔍 View Troubleshooting Guide & Common FAQs

📡 1. The mobile app cannot find my desktop client (mDNS discovery failure)

  • Check Network: Ensure both mobile and desktop are on the same local LAN.
  • Windows Firewall: Verify that Windows Defender Firewall allows incoming traffic for ports 39593 (TCP/LMUP file transport) and 39594 (HTTP API).
  • Bonjour Runtime: The OSS build doesn’t redistribute Apple Bonjour. Ensure Bonjour is installed on Windows, or rely on the zeroconf-compatible fallback.

☁️ 2. Why are some of my iCloud photos stuck/not transferring?

  • Photos marked with iCloud must be exported from the Apple Photos cloud repository before transfer.
  • While in cloud_downloading or preparing states, the phone is downloading the high-res original asset to local storage. Transfer begins automatically once complete.

📸 3. Can I manually select which photos/videos to sync?

  • No. Automatic upload is driven by the mobile photo-library scan and strictly read-only pending queue. Checkbox picking is not part of the OSS workflow.

💤 4. What happens when the desktop sleeps or connection drops?

  • LAN transfers will interrupt. With the mobile app in the foreground, the unfinished queue continues after the desktop wakes and LAN connectivity is restored.
  • The OSS runtime does not provide silent background continuation.
  • Enable “Prevent computer from sleeping while syncing” in the desktop app settings for uninterrupted transfers.

🏗️ Architecture Overview

flowchart TD subgraph Mobile["📱 Mobile Client (iOS / Android)"] RN["React Native UI"] subgraph SE["Native Sync Engine"] iOS["iOS (Swift)"] Android["Android (Kotlin)"] end end subgraph Desktop["💻 Desktop App (macOS / Windows)"] Renderer["React 18 Renderer"] Preload["Preload Bridge"] Main["Electron Main Process"] subgraph Sidecar["Go Sidecar"] HTTP["HTTP API & WebSockets (Port 39594)"] LMUP["LMUP Receiver (Port 39593)"] DB[("SQLite DB")] FS["Filesystem Shared Dirs"] end end %% Communication Links RN <--> SE Renderer <--> Preload Preload <--> Main Main <--> HTTP %% Network Sync Channels SE -- "mDNS Discovery / Pairing" --> HTTP SE -- "Presence & Metadata (HTTP/WS)" --> HTTP SE -- "Incremental Media Sync (LMUP/TCP)" --> LMUP classDef mobile fill:#fff0f5,stroke:#db7093,stroke-width:1px; classDef desktop fill:#f0f8ff,stroke:#4682b4,stroke-width:1px; classDef sidecar fill:#f5fffa,stroke:#2e8b57,stroke-width:1px; class Mobile,RN,SE,iOS,Android mobile; class Desktop,Renderer,Preload,Main desktop; class Sidecar,HTTP,LMUP,DB,FS sidecar;

🔧 Technical Infrastructure

🛠️ Tech Stack

Layer Technology
📦 Monorepo pnpm 10 + turborepo 2.8
💻 Desktop Electron 41 + electron-vite 5 + electron-builder 26
🎨 Desktop UI React 18.3 + zustand 5 + Tailwind CSS v4
📱 Mobile React Native 0.84.1 + React 19 (iOS / Android)
🍎 iOS Native Swift SyncEngine + BGTask + PhotoKit + Network.framework
🤖 Android Native Kotlin bridge + NativeSyncEngine / MediaStore / NsdManager
⚡ Sidecar Go 1.25.6 + SQLite + WebSocket
🔗 Shared @lynavo-drive/contracts + @lynavo-drive/design-tokens
🧪 Test vitest 4.1 + jest + go test

⚙️ Prerequisites

  • macOS or Windows (desktop currently supports macOS / Windows; Linux is only for local build / package verification; iOS builds still require macOS + Xcode)
  • Node.js >= 22.12.0
  • pnpm >= 10
  • Go >= 1.25.6 (sidecar development and tests)
📱 View Mobile & Platform-Specific SDK Requirements
  • Xcode + CocoaPods (iOS builds and device debugging, macOS only)
  • Android Studio + Android SDK / NDK (Android builds and debugging)

💻 Common Commands

🛠️ View Developer Command Reference
# Desktop
pnpm dev:desktop
pnpm build:desktop
pnpm package:desktop          # macOS local DMG
pnpm package:desktop:win      # Windows NSIS + zip (default desktop Windows package, no release profile)

# Mobile
pnpm dev:mobile
pnpm build:mobile
pnpm dev:mobile:android
pnpm build:mobile:android  # Android Debug build (assembleDebug)

# Sidecar
pnpm dev:sidecar
pnpm build:sidecar
pnpm test:sidecar

# Full repository validation
pnpm build
pnpm test
pnpm typecheck
pnpm format:check
pnpm check

📦 OSS Build & Package Verification

This OSS repository keeps contributor-local source-build paths and GitHub-hosted, secret-free unsigned build/package verification. Native Builds outputs are verification artifacts, not signed distributions. Linux remains local verification only and is not a supported desktop user surface.

🔬 View Verification & Build Pipelines
# Inspect the local build / package commands that would run
pnpm release --profile review --targets ios,android,mac,win,linux --dry-run

# Local iOS / Android Debug / Desktop build verification
pnpm build:mobile
pnpm build:mobile:ios:release
pnpm build:mobile:android
pnpm package:desktop

# Android Release source-build verification
pnpm release --profile review --targets android --dry-run
pnpm release --profile review --targets android

# Local desktop platform package
pnpm package:desktop

# Linux package verification (Linux host, one arch per run)
pnpm --filter @lynavo-drive/desktop package:linux -- --arch=x64
pnpm --filter @lynavo-drive/desktop package:linux -- --arch=arm64

release profiles only inject LYNAVO_RELEASE_CHANNEL and local build configuration, and only select local build/package commands.

GitHub-hosted verification workflows may invoke these commands using public source and no repository secrets. Third-party or external build services, desktop code signing, notarization, store upload, auto-update, and private distribution infrastructure remain outside this OSS baseline.

The OSS Draft Release workflow accepts stable tags matching vX.Y.Z, rebuilds the complete verification set from that tagged commit, and creates or updates a draft GitHub Release. Manual dispatch is build-only and remains secret-free. Stable tags are the only path that uses repository Actions Secrets to create signed Android APK/AAB assets; desktop release files remain unsigned OSS build-verification outputs. All assets include SHA-256 checksums. See the release playbook for signing setup, the exact asset list, warnings, and the maintainer procedure.

📁 Project Structure

📂 View Directory Structure Map
lynavo-drive/
├── apps/
│   ├── desktop/              # Electron desktop app
│   │   └── src/
│   │       ├── main/         # Main process (window, IPC, sidecar lifecycle)
│   │       ├── preload/      # Preload bridge
│   │       └── renderer/     # React 18 UI
│   └── mobile/               # React Native iOS/Android app + native sync
│       ├── ios/              # Xcode project and Swift native modules
│       ├── android/          # Android project, Kotlin bridge, native sync
│       ├── src/              # RN screens and hooks
│       └── __tests__/        # RN tests
├── packages/
│   ├── contracts/            # Shared DTOs / constants / events / error codes
│   └── design-tokens/        # Shared design tokens
├── services/
│   └── sidecar-go/           # Go sidecar (TCP/HTTP/SQLite/mDNS)
└── docs/
    ├── architecture/         # Architecture, state machine, data model
    ├── operations/           # Troubleshooting, diagnostics, sidecar runbook
    ├── product/              # Product constraints, OSS boundaries, non-goals
    ├── release/              # OSS build and package verification playbook
    └── testing/              # OSS verification matrix

🎯 Development Baseline

  • Shared types, constants, event names, and port definitions come from @lynavo-drive/contracts.
  • The renderer does not access the sidecar, filesystem, or SQLite directly; all access goes through the preload bridge / main process.
  • The queue stays read-only. The UI cannot delete, reorder, or skip items.
  • A given phone uploads only one file at a time.
  • Guest/local foreground LAN sync is fail-open; remote access and background continuation fail closed.

📄 Documentation Reference

💡 Contributing

Community contributions are welcome. To get started:

  1. Fork the Repository: Create a personal fork and clone it locally.
  2. Set Up the Workspace: Follow the Developer Quick Start and install the toolchain required by the platform you plan to change.
  3. Verify Your Change: Run focused tests first, then the applicable repository checks before submitting a pull request:
⚙️ Verification Commands
pnpm test
pnpm typecheck
pnpm format:check
pnpm gate:release

For detailed coding standards, project layouts, and process rules, check out our Contributing Guidelines and Code of Conduct.

🌐 Community & Social

Follow project news and updates across these channels:

⚖️ License

GNU Affero General Public License v3.0. See LICENSE.

评论

暂无评论