Skip to content

Repository files navigation

πŸ”„ DevSync // Developer Workspace Cloud-Desktop Synchronization

Python 3.11+ FastAPI Desktop GUI Database Status License

A distributed developer workspace synchronization platform featuring a high-performance FastAPI cloud backend and an intuitive PySide6 (Qt) desktop client for real-time project file synchronization across trusted workstations.

Note

Development Note: This repository was published after the initial development phase. The GitHub commit history therefore does not represent the complete development timeline.


πŸ–₯️ Synchronization Flow Preview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  [Desktop Client: Workstation-Alpha]                                    β”‚
β”‚  [WATCHER] Detected file change: 'src/api/auth.py' (SHA256: e3b0c44...) β”‚
β”‚  [CLIENT] Packaging event -> Generating diff -> Uploading to cloud     β”‚
β”‚                                                                        β”‚
β”‚  [Cloud Backend: FastAPI Relay]                                        β”‚
β”‚  [EVENT] Workspace #104: Revision bumped v12 -> v13                    β”‚
β”‚  [RELAY] WebSocket broadcasting update to 2 connected trusted devices  β”‚
β”‚                                                                        β”‚
β”‚  [Desktop Client: Workstation-Beta]                                     β”‚
β”‚  [WS-EVENT] Incoming file version: 'src/api/auth.py'                   β”‚
β”‚  [SYNC] Validated checksum -> Atomic write complete (0 conflicts)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ—οΈ System Architecture

graph TD
    subgraph Client ["Client Workstations (Windows / Linux)"]
        FS[Local Project Directory] --> Watcher[Filesystem Event Watcher]
        Watcher --> RetryQueue[Event Queue & Retry Buffer]
        RetryQueue --> DesktopUI[PySide6 Desktop Application]
    end

    subgraph Backend ["DevSync Cloud Backend (FastAPI)"]
        API[FastAPI REST API Gateway<br/>JWT Auth + Refresh Rotation]
        WSHub[WebSocket Realtime Event Hub]
        StorageProvider[Storage Engine<br/>Atomic Writes & Version Metadata]
        DB[(PostgreSQL Database<br/>Workspaces, Devices, Revisions)]
    end

    DesktopUI <-->|HTTPS / JWT Auth| API
    DesktopUI <-->|Bi-directional Sync Stream| WSHub
    API --> StorageProvider
    API --> DB
    WSHub --> DB

    classDef client fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#fff;
    classDef cloud fill:#0f172a,stroke:#a855f7,stroke-width:2px,color:#fff;
    class FS,Watcher,RetryQueue,DesktopUI client;
    class API,WSHub,StorageProvider,DB cloud;
Loading

✨ Core Capabilities

  • JWT Authentication with Refresh Rotation: Secure user signup, login, and silent refresh token rotation across long-running desktop sessions.
  • Ordered Sync Event Protocol: Event-driven synchronizer ensuring consistency across file updates, renames, soft deletes, and folder migrations.
  • WebSocket Realtime Updates: Instant push notifications to trusted clients to trigger delta downloads the moment changes are committed on another machine.
  • Local Storage Provider & Version Tracking: Comprehensive file revisioning with conflict-copy generation whenever concurrent modifications occur.
  • PySide6 Native Desktop App: System tray minimization, visual sync progress indicators, conflict inspection, and device connection status.
  • Production-Ready Containerization: Docker Compose setup with health checks, database auto-migration via Alembic, and preconfigured networking.

⚑ Quick Start

1. Clone & Configure Environment

git clone https://github.com/Krishagarwal558/Devsync.git
cd Devsync
Copy-Item server\.env.example server\.env

2. Launch Local PostgreSQL & Backend

docker compose -f docker-compose.alpha.yml --env-file server\.env up --build

3. Run Database Migrations & Verify

docker compose -f docker-compose.alpha.yml exec backend alembic -c server/alembic.ini upgrade head
Invoke-RestMethod http://127.0.0.1:8000/health

4. Launch Desktop Client

python -m desktop.app.main

🌐 Cloud Deployment Guides

Detailed architecture and infrastructure walk-throughs for production hosting:


πŸ§ͺ Test Suite & Release Verification

# Run compiler check and unit tests
python -m compileall desktop server tests scripts
python -m pytest tests -q

# Execute two-folder sync reliability smoke test
python scripts\two_folder_reliability_smoke.py
python scripts\public_beta_check.py

πŸ“¦ Build Windows Desktop Executable

powershell -ExecutionPolicy Bypass -File scripts\build_windows_exe.ps1 -Python python

πŸ“ Repository Structure

β”œβ”€β”€ server/               # FastAPI backend, routers, auth & WebSocket relays
β”‚   β”œβ”€β”€ alembic/          # Database migrations
β”‚   └── storage/          # Local file storage layer
β”œβ”€β”€ desktop/app/          # PySide6 native desktop GUI & filesystem listener
β”œβ”€β”€ docs/                 # Production deployment and operational guides
β”œβ”€β”€ scripts/              # Packaging, reliability smoke tests & release scripts
└── tests/                # Automated pytest suite

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

About

Developer workspace sync system featuring a FastAPI backend and PySide6 desktop client with JWT-authenticated event streaming.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages