Syncwagon is an Android application that brings “browse-first, download-later” functionality to mobile devices, similar to Synctrain (Sushitrain). It allows users to browse files located on remote Syncthing peers without synchronizing entire directories, enabling on-demand downloading and selective synchronization.
- Browse-First Paradigm: View remote files without downloading them
- On-Demand Downloads: Download files only when you need them
- Selective Sync: Pin specific files/folders for permanent synchronization
- Hybrid Architecture: Go core (Syncthing protocol) + Android UI (Jetpack Compose)
- Native Performance: Leverages official Syncthing Go implementation via gomobile
- Frontend (Android/Kotlin): Jetpack Compose UI, OS interactions, file I/O, service lifecycle
- Backend (Go/Gomobile): Syncthing protocol implementation, compiled to AAR library
- Communication: JNI/Gomobile bindings between Android and Go layers
/
├── .github/ # GitHub workflows and CI configuration
├── app/ # Android application (Kotlin + Jetpack Compose)
│ └── src/
│ ├── main/ # Main application code
│ ├── test/ # Unit tests
│ └── androidTest/ # Instrumentation tests
├── core/ # Go module (Syncthing wrapper)
│ ├── syncwagon.go # Core Go implementation
│ ├── go.mod # Go module definition
│ └── go.sum # Go dependency checksums
├── docs/ # Documentation
│ └── spec.org # Technical specification
├── flake.nix # Nix development environment
├── flake.lock # Nix dependency lock file
└── todo.org # Development roadmap and checklist
- Nix (with flakes enabled) - For reproducible development environment
- direnv (optional but recommended) - Automatic environment activation
- Linux or macOS (x86_64 or aarch64)
- ~10GB disk space for dependencies
- Internet connection for initial setup
- Clone the repository:
git clone https://github.com/vdemeester/syncwagon.git cd syncwagon - Enter the Nix development environment:
nix developOr, if using direnv:
direnv allow - The development environment provides:
- Go 1.25.4
- gomobile (installed automatically on first use)
- JDK 17
- Android SDK (API 33-34, NDK 26)
- Gradle 8.14.3
- Code formatters (gofmt, ktlint)
- Pre-commit hooks (via git-hooks.nix)
The Nix flake (flake.nix) provides a fully reproducible development environment including:
- Android SDK: Managed via tadfisher/android-nixpkgs
- Pre-commit Hooks: Automatic code formatting via git-hooks.nix
- Go:
gofmt,govet - Kotlin:
ktlint(when enabled) - Standard checks: trailing whitespace, end-of-file fixers
- Go:
./gradlew assembleDebugOutput: app/build/outputs/apk/debug/app-debug.apk
./gradlew assembleReleaseOutput: app/build/outputs/apk/release/app-release-unsigned.apk
cd core
go build -v ./..../gradlew cleancd core
go test -v ./..../gradlew testDebugUnitTest./gradlew connectedDebugAndroidTestNote: Requires a connected Android device or emulator.
Pre-commit hooks are automatically installed when you enter the Nix development environment. They run:
gofmton Go codegoveton Go code
To manually run all pre-commit hooks:
git commit --dry-runcd core
gofmt -l . # List files that need formatting
go vet ./... # Run static analysisktlint 'app/src/**/*.kt'./gradlew lintReports: app/build/reports/lint-results.html
✅ Completed:
- Nix development environment with Android SDK
- Project structure (Android + Go)
- Basic Android app with Jetpack Compose
- Gradle build configuration
- GitHub Actions CI workflow
- Pre-commit hooks
🚧 In Progress:
- Go-Android bridge integration (gomobile)
- Core Syncthing protocol implementation
📋 Planned:
- File browser UI
- On-demand download functionality
- Selective sync (pinning)
- Background service
See todo.org for detailed development roadmap.
- Technical Specification - Detailed architecture and requirements
- Development TODO - Phase-by-phase implementation checklist
- Syncthing Documentation - Official Syncthing protocol docs
This project follows a structured development approach:
- Read the spec:
docs/spec.orgcontains the full technical specification - Check the TODO:
todo.orgtracks current and planned work - Development workflow:
- Use
nix developfor a consistent environment - Pre-commit hooks ensure code quality
- CI runs on all pull requests
- Sign your commits (
git commit --signoff)
- Use
[License information to be added]
- Syncthing - The underlying synchronization protocol
- Sushitrain - Inspiration for the browse-first paradigm
- android-nixpkgs - Nix-based Android SDK management