Secure Decentralized File Sharing Over Bluetooth Mesh Networks
A privacy-first, decentralized file sharing application that works over Bluetooth mesh networks. No internet required, no servers, no accounts - just secure peer-to-peer file transfer.
bitshare is built upon the foundation of bitchat by Jack Dorsey (@jackjackbits). We extend our deep gratitude to Jack for creating the innovative mesh networking protocol and secure communication foundation that makes bitshare possible.
- Original Project: bitchat
- Original Author: Jack Dorsey
- bitshare Fork: Adapted for secure file sharing use cases
bitshare transforms Jack Dorsey's secure mesh chat protocol into a powerful file sharing platform. While preserving all the privacy and security features of the original bitchat, bitshare extends the capability to:
- Share Files Securely: Transfer documents, images, and media over encrypted mesh networks
- Work Offline: No internet or cellular connection required - pure peer-to-peer communication
- Maintain Privacy: No servers, no tracking, no data collection - your files stay between you and your intended recipients
- Scale Across Distance: Multi-hop relay allows file sharing across extended ranges through mesh networking
- End-to-End Encryption: X25519 key exchange + AES-256-GCM for all transfers
- No Registration: No accounts, emails, or phone numbers required
- Ephemeral by Default: Files exist only during transfer unless explicitly saved
- Emergency Wipe: Triple-tap to instantly clear all data
- Local-First: Works completely offline, no servers involved
- Multiple File Types: Documents, images, videos, archives
- Progressive Transfer: Resume interrupted transfers automatically
- Compression: Automatic file compression for faster transfers
- Batch Operations: Share multiple files simultaneously
- File Integrity: Cryptographic verification of transfer completion
- Decentralized Mesh Network: Automatic peer discovery and multi-hop file relay
- Store & Forward: Files cached for offline peers and delivered when they reconnect
- Extended Range: Reach distant peers through mesh relay (300m+ effective range)
- Battery Optimization: Adaptive power management for extended operation
- LZ4 Compression: 30-70% bandwidth savings on typical files
- Adaptive Power Modes: Battery-aware operation with multiple power levels
- Background Transfers: Continue sharing when app is backgrounded
- Smart Retry: Automatic retry with exponential backoff for failed transfers
bitshare builds upon bitchat's proven technical foundation:
- Binary Protocol: Efficient packet format optimized for Bluetooth LE
- Mesh Networking: Multi-hop routing with TTL-based forwarding
- Encryption Stack: X25519 + AES-256-GCM + Ed25519 signatures
- Privacy Features: Cover traffic, timing obfuscation, ephemeral identities
- File Transfer Protocol: Chunked transfer with integrity verification
- Progress Tracking: Real-time transfer status and completion tracking
- Resume Capability: Automatic retry and resume for interrupted transfers
- Compression Layer: Intelligent compression based on file type and size
- iOS 16.0+ / macOS 13.0+
- Xcode 14.0+
- XcodeGen (recommended):
brew install xcodegen
-
Clone the repository:
git clone https://github.com/the9ines/bitshare.git cd bitshare -
Run the renaming script (if needed):
./rename_to_bitshare.sh
-
Generate Xcode project:
xcodegen generate
-
Open in Xcode:
open bitshare.xcodeproj
-
Update Development Team:
- Open
project.yml - Change
DEVELOPMENT_TEAM: L3N5LHJD5Yto your team ID - Run
xcodegen generateagain
- Open
-
Build and Run:
- Select your target device
- Build and run the project
- Launch bitshare on your device
- Set your nickname or use the auto-generated one
- You'll automatically connect to nearby bitshare users
- Select files to share using the interface
- Choose recipients from discovered peers
- Files transfer automatically through the mesh network
- Batch Sharing: Select multiple files for simultaneous transfer
- Resume Transfers: Interrupted transfers automatically resume when peers reconnect
- File Organization: Organize shared files into collections or topics
- Transfer History: Track completed and pending transfers
bitshare/
βββ bitshare/ # Main app source
β βββ bitshareApp.swift # App entry point
β βββ Protocols/ # Core protocols (inherited from bitchat)
β βββ Services/ # Bluetooth, encryption, file transfer
β βββ Utils/ # Utilities and helpers
β βββ ViewModels/ # MVVM view models
β βββ Views/ # SwiftUI views
βββ bitshareShareExtension/ # iOS Share Extension
βββ bitshareTests/ # Unit tests
- File Transfer Service: Manages chunked file transfers with progress tracking
- Mesh Network Service: Inherited from bitchat - handles peer discovery and routing
- Encryption Service: Inherited from bitchat - manages end-to-end encryption
- Storage Service: Manages temporary file storage and cleanup
- Set your development team in project settings
- Configure code signing
- Update bundle identifiers to your domain
- Archive and distribute through App Store or TestFlight
bitshare follows an accelerated development approach by forking and extending the proven bitchat codebase:
Weeks 1-2: Foundation & Analysis
- β Fork bitchat repository and analyze architecture
- β Document design system and protocol specifications
- β Update naming conventions and project configuration
Weeks 3-4: Protocol Extensions
- β Add FILE_MANIFEST, FILE_CHUNK, FILE_ACK message types
- β Implement 480-byte chunking with SHA-256 integrity
- β Extend BitchatPacket with file transfer support
Weeks 5-6: Core File Transfer Logic
- β Create FileTransferService with PRD specifications
- β Implement file chunking and reassembly
- β Add resume/pause/retry capabilities
Weeks 7-8: UI Transformation
- β Replace messaging UI with file drop zone interface
- β Implement transfer progress tracking with percentages
- β Add transfer history as MVP requirement
Weeks 9-10: Integration & Polish
- π Connect FileTransferService to BluetoothMeshService
- π Comprehensive testing across mesh network
- π Performance optimization and bug fixes
- 80%+ Code Reuse: Leveraging existing bitchat infrastructure
- Proven Protocol: X25519 + AES-256-GCM encryption preserved unchanged
- Visual Consistency: 100% design system compatibility maintained
- Rapid Iteration: Fork-based approach accelerates development by 3-4 months
We welcome contributions to bitshare! Please:
- Respect the Foundation: Maintain compatibility with bitchat's core protocol
- Preserve Privacy: Any new features must maintain the privacy-first approach
- Test Thoroughly: Ensure new features work across the mesh network
- Follow Conventions: Use the established code style and architecture
This project is released into the public domain, following the original bitchat license. See the LICENSE file for details.
- Jack Dorsey (@jackjackbits) - Creator of the original bitchat protocol and mesh networking foundation
- The bitchat community - For the robust, privacy-focused communication protocol
- The9ines - For extending the platform to enable secure file sharing
- Issues: GitHub Issues
- Documentation: Technical Whitepaper
- Privacy: Privacy Policy
bitshare: Building on Jack Dorsey's vision of decentralized communication to enable secure, private file sharing for everyone.