A comprehensive toolkit for migrating Personal Data Servers (PDS) in the AT Protocol/Bluesky ecosystem. This project provides both a desktop GUI application and a web service API for seamless PDS migration operations.
This toolkit enables users to migrate their data between Personal Data Servers in the AT Protocol network. It consists of three main packages:
pdsmigration-common: Core library containing migration logic, cryptographic utilities, and shared API functionspdsmigration-gui: Cross-platform desktop GUI application built with egui/eframepdsmigration-web: HTTP web service built with Actix-Web, featuring AWS S3 integration and Prometheus metrics
- Language: Rust (1.91.1 toolchain required)
- GUI Framework: egui/eframe with both glow and wgpu rendering backends
- Web Framework: Actix-Web
- Cloud Storage: AWS S3 SDK
- Cryptography: secp256k1, multibase encoding
- Data Formats: IPLD, CBOR, JSON
- Metrics: Prometheus
- Testing: Standard Rust testing with mockall, wiremock
- Rust Toolchain: 1.91.1 channel with
rustfmtandclippycomponents - Platform Support:
- Native: Windows, macOS, Linux
# Install Rust 1.91.1 (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup toolchain install 1.91.1
rustup component add rustfmt clippy# Clone the repository
git clone https://github.com/NorthskySocial/pds-migration.git
cd pds-migration
# Build all packages
cargo build --release
# Run GUI application
cargo run -p pdsmigration-gui
# Run web service (requires environment setup)
cargo run -p pdsmigration-web# Build and run native GUI
cargo run -p pdsmigration-gui
# Release build
cargo build -p pdsmigration-gui --release# Run web service (development)
cargo run -p pdsmigration-web
# Build for production
cargo build -p pdsmigration-web --release
# Docker deployment
docker build -t pdsmigration .
docker run -p 9090:9090 --env-file .env pdsmigration# Build library
cargo build -p pdsmigration-common
# Run library tests
cargo test -p pdsmigration-common| Variable | Required | Default | Description |
|---|---|---|---|
ENDPOINT |
Yes | - | S3-compatible storage endpoint URL. |
PLC_DIRECTORY |
No | https://plc.directory |
PLC directory service URL |
SERVER_PORT |
No | 9090 |
HTTP server port |
WORKER_COUNT |
No | 2 |
Number of worker threads |
CONCURRENT_TASKS_PER_JOB |
No | 3 |
Max concurrent blob processes per job |
Standard AWS SDK environment variables are supported:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGION
ENDPOINT=https://s3.amazonaws.com
SERVER_PORT=9090
WORKER_COUNT=4
CONCURRENT_TASKS_PER_JOB=3
PLC_DIRECTORY=https://plc.directory
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGION=us-east-1The web service provides the following HTTP POST endpoints for migration:
/service-auth- Service authentication/create-account- Create new account on target PDS/export-repo- Export repository data/import-repo- Import repository data/export-blobs- Export blob data/upload-blobs- Upload blobs to target PDS/migrate-preferences- Migrate user preferences/request-token- Request authentication token/migrate-plc- Migrate PLC (Personal Data License)/activate-account- Activate migrated account/deactivate-account- Deactivate old account
Additional endpoints:
/health- Health check endpoint/metrics- Prometheus metrics
# Run all tests
cargo test --workspace
# Run tests for specific package
cargo test -p pdsmigration-common
cargo test -p pdsmigration-gui
cargo test -p pdsmigration-web
# Run tests with output
cargo test --workspace -- --nocapture- All code must pass
cargo fmt --check - All code must pass
cargo clippy - Warnings are treated as errors in CI
- Use
#[tracing::instrument]for debugging critical functions
- Native: Standard desktop platforms
- Docker: Production containerized deployment
GitHub Actions automatically:
- Runs comprehensive tests
- Checks code formatting and linting
- Builds Docker containers
- Publishes to GitHub Container Registry
- Ensure you have Rust 1.91.1 installed
- Format code:
cargo fmt - Run tests:
cargo test --workspace - Check linting:
cargo clippy - Build all targets:
cargo build --workspace