Skip to content

anans-dev/CirrusSync

Repository files navigation

🌩️ CirrusSync

Secure Cloud Storage with End-to-End Encryption

Tauri React TypeScript Rust Vite

πŸ“‹ Table of Contents

πŸš€ About

CirrusSync is a secure, cross-platform cloud storage application that prioritizes user privacy through end-to-end encryption. Built with Tauri, it combines the performance of Rust with the flexibility of modern web technologies to deliver a native desktop experience.

Key Highlights

  • Zero-Knowledge Architecture: Your files are encrypted before they leave your device
  • Cross-Platform: Native desktop app for Windows, macOS, and Linux
  • Modern UI: Clean, responsive interface with dark/light theme support
  • Secure Sharing: Share files and folders with advanced permission controls
  • Offline Access: Access your files even when offline
  • Performance: Built with Rust for optimal speed and memory efficiency

✨ Features

Core Functionality

  • πŸ” End-to-End Encryption - AES-256-GCM encryption with client-side key derivation
  • πŸ“ File Management - Upload, download, organize files and folders
  • πŸ—‘οΈ Trash System - Safely delete and restore files
  • πŸ”— Secure Sharing - Share files with expiration dates and access controls
  • πŸ‘₯ Collaboration - Share files and folders with other users

User Experience

  • 🎨 Dark/Light Theme - Seamless theme switching
  • πŸ“± Responsive Design - Optimized for different screen sizes
  • ⚑ Real-time Updates - Instant file synchronization
  • πŸ“Š Storage Analytics - Monitor storage usage and file statistics
  • 🎯 Drag & Drop - Intuitive file upload experience

Security & Privacy

  • πŸ”‘ BIP39 Seed Phrases - Secure key generation and recovery
  • πŸ›‘οΈ Zero-Knowledge - Server never sees your unencrypted data
  • πŸ”’ Secure Authentication - Multi-factor authentication support
  • πŸ“§ Email Verification - Secure account verification process
  • πŸ” Password Recovery - Secure password reset functionality

Integration

  • πŸ’³ Stripe Integration - Secure payment processing
  • πŸ”Œ Plugin Architecture - Extensible with Tauri plugins
  • 🌐 Cross-Origin Security - Comprehensive CSP and CORS policies

πŸ› οΈ Tech Stack

Frontend

  • React 19.1.0 - Modern React with latest features
  • TypeScript - Type-safe JavaScript development
  • Vite - Fast build tool and dev server
  • Tailwind CSS 4.0 - Utility-first CSS framework
  • Framer Motion - Smooth animations and transitions
  • React Router - Client-side routing
  • Lucide React - Beautiful icon library

Backend

  • Tauri 2.0 - Rust-based desktop app framework
  • Rust - Systems programming language for performance
  • Tokio - Asynchronous runtime for Rust
  • Serde - Serialization/deserialization framework
  • Reqwest - HTTP client for Rust

Security & Encryption

  • AES-GCM - Authenticated encryption
  • OpenPGP - Public key cryptography
  • Argon2 - Password hashing
  • BIP39 - Mnemonic seed phrase generation
  • SHA2 - Cryptographic hash functions

External Services

  • Stripe - Payment processing
  • Custom API - Backend services for sync and sharing

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

Required

Platform-Specific Requirements

Windows

  • Microsoft Visual Studio C++ Build Tools or Visual Studio 2022
  • Windows 10 SDK

macOS

  • Xcode Command Line Tools
xcode-select --install

Linux (Ubuntu/Debian)

sudo apt update
sudo apt install libwebkit2gtk-4.0-dev \
    build-essential \
    curl \
    wget \
    file \
    libssl-dev \
    libgtk-3-dev \
    libayatana-appindicator3-dev \
    librsvg2-dev

Linux (Fedora)

sudo dnf install webkit2gtk4.0-devel \
    openssl-devel \
    curl \
    wget \
    file \
    libappindicator-gtk3-devel \
    librsvg2-devel

πŸš€ Installation

  1. Clone the repository
git clone https://github.com/yourusername/CirrusSync.git
cd CirrusSync
  1. Install dependencies
npm install
  1. Install Rust dependencies
cd src-tauri
cargo fetch
cd ..
  1. Set up environment variables
cp .env.example .env
# Edit .env with your configuration

πŸ”§ Development

Start Development Server

# Start the development server
npm run dev

# Or use Tauri's development command
npm run tauri dev

This will:

  • Start the Vite development server on http://localhost:1420
  • Launch the Tauri desktop application
  • Enable hot-reload for both frontend and backend changes

Available Scripts

# Frontend development
npm run dev          # Start Vite dev server
npm run build        # Build frontend for production
npm run preview      # Preview production build

# Tauri commands
npm run tauri dev    # Start Tauri development
npm run tauri build  # Build production app
npm run tauri info   # Show Tauri info

Development Tools

  • DevTools: Enabled in development mode (F12 to open)
  • Hot Reload: Automatic reload on file changes
  • Type Checking: Real-time TypeScript error checking
  • Linting: ESLint integration for code quality

πŸ“¦ Building for Production

Build for Current Platform

npm run tauri build

Build for Specific Platforms

# Build for Windows
npm run tauri build -- --target x86_64-pc-windows-msvc

# Build for macOS
npm run tauri build -- --target x86_64-apple-darwin
npm run tauri build -- --target aarch64-apple-darwin

# Build for Linux
npm run tauri build -- --target x86_64-unknown-linux-gnu

Build Artifacts

Built applications will be available in:

  • src-tauri/target/release/bundle/
  • Platform-specific installers (.msi, .dmg, .deb, .AppImage)

πŸ“ Project Structure

CirrusSync/
β”œβ”€β”€ public/                 # Static assets
β”œβ”€β”€ src/                    # Frontend source code
β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”œβ”€β”€ context/           # React context providers
β”‚   β”œβ”€β”€ hooks/             # Custom React hooks
β”‚   β”œβ”€β”€ pages/             # Page components
β”‚   β”œβ”€β”€ services/          # API services
β”‚   β”œβ”€β”€ types/             # TypeScript type definitions
β”‚   β”œβ”€β”€ utils/             # Utility functions
β”‚   β”œβ”€β”€ App.tsx            # Main application component
β”‚   β”œβ”€β”€ main.tsx           # Application entry point
β”‚   └── global.css         # Global styles
β”œβ”€β”€ src-tauri/             # Tauri backend
β”‚   β”œβ”€β”€ src/               # Rust source code
β”‚   β”œβ”€β”€ icons/             # Application icons
β”‚   β”œβ”€β”€ capabilities/      # Tauri capabilities
β”‚   β”œβ”€β”€ Cargo.toml         # Rust dependencies
β”‚   β”œβ”€β”€ tauri.conf.json    # Tauri configuration
β”‚   └── build.rs           # Build script
β”œβ”€β”€ package.json           # Node.js dependencies
β”œβ”€β”€ tsconfig.json          # TypeScript configuration
β”œβ”€β”€ vite.config.ts         # Vite configuration
└── tailwind.config.js     # Tailwind CSS configuration

Key Directories

  • src/components/ - Reusable UI components
  • src/pages/ - Application pages and routes
  • src/context/ - Global state management
  • src/services/ - API integration and external services
  • src-tauri/src/ - Rust backend logic and native APIs

πŸ”’ Security

CirrusSync implements multiple layers of security:

Encryption

  • Client-Side Encryption: All files encrypted before upload
  • AES-256-GCM: Industry-standard authenticated encryption
  • Key Derivation: Secure key generation using Argon2
  • Zero-Knowledge: Server never accesses unencrypted data

Authentication

  • Secure Session Management: JWT-based authentication
  • Password Hashing: Argon2 for password storage
  • Email Verification: Secure account verification
  • Multi-Factor Authentication: Additional security layer

Application Security

  • Content Security Policy: Strict CSP headers
  • CORS Protection: Comprehensive cross-origin policies
  • Input Validation: Sanitization of all user inputs
  • Secure Storage: Encrypted local storage

Privacy

  • Minimal Data Collection: Only essential data is collected
  • GDPR Compliant: Respects user privacy rights
  • Audit Logs: Comprehensive activity logging
  • Data Portability: Export your data anytime

πŸ”Œ API Integration

Stripe Integration

// Configure Stripe
const stripePromise = loadStripe(process.env.STRIPE_PUBLISHABLE_KEY);

// Usage in components
<Elements stripe={stripePromise}>
  <PaymentForm />
</Elements>

Backend API

// API service example
import { invoke } from '@tauri-apps/api/tauri';

export const uploadFile = async (file: File) => {
  return await invoke('upload_file', { file });
};

Tauri Commands

// Rust backend command
#[tauri::command]
async fn upload_file(file: FileData) -> Result<UploadResponse, String> {
    // Implementation
}

🀝 Contributing

We welcome contributions to CirrusSync! Please follow these guidelines:

Development Workflow

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Make your changes
  4. Test thoroughly
    npm run test
    npm run tauri build
  5. Commit your changes
    git commit -m 'Add amazing feature'
  6. Push to the branch
    git push origin feature/amazing-feature
  7. Open a Pull Request

Code Style

  • TypeScript: Follow strict TypeScript patterns
  • Rust: Use cargo fmt and cargo clippy
  • React: Follow React best practices and hooks patterns
  • CSS: Use Tailwind CSS utilities, avoid custom CSS when possible

Testing

  • Write unit tests for new features
  • Test on multiple platforms before submitting
  • Ensure security features work correctly
  • Verify encryption/decryption processes

Documentation

  • Update README for new features
  • Add JSDoc comments for complex functions
  • Document API changes
  • Include examples for new functionality

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Tauri - For the amazing desktop app framework
  • React - For the robust frontend framework
  • Rust - For the performance and safety
  • Tailwind CSS - For the utility-first CSS framework
  • Stripe - For secure payment processing

πŸ“ž Support


About

🌩️ Secure cloud storage with end-to-end encryption built using Tauri, React, and Rust. Zero-knowledge architecture ensures your files are encrypted before leaving your device. Features file sharing, collaborative workspaces, drag & drop uploads, and cross-platform desktop support. Built for privacy and performance.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors