Skip to content

End-to-end SMS synchronization between Android devices and web browser

Notifications You must be signed in to change notification settings

nilukush/daakiya

Repository files navigation

Daakiya 📱💻

End-to-end encrypted SMS synchronization between Android and desktop devices

CI/CD Pipeline License: MIT

Overview

Daakiya (Hindi for "Postman") is a cross-network SMS synchronization system that delivers SMS messages from your Android device to your desktop in real-time, with end-to-end encryption ensuring your privacy.

✨ Features

  • Real-time SMS Sync - Messages appear on desktop within seconds
  • End-to-End Encryption - Server cannot read your messages (AES-256-GCM)
  • Cross-Network Support - Works on any network (WiFi, mobile data, different ISPs)
  • OTP Auto-Detection - One-tap copy for verification codes
  • Auto-Delete - Messages automatically deleted after configurable retention period
  • Multi-Device Support - Sync to multiple desktops
  • Browser Notifications - Get notified of new SMS on desktop
  • Zero-Knowledge Server - Server only sees encrypted payloads

Architecture

┌─────────────┐                    ┌──────────────┐                    ┌─────────────┐
│   Android   │  Encrypted SMS →   │  Cloud Relay │  Encrypted SMS →   │   Desktop   │
│   Device    │────────────────────→│    Server    │────────────────────→│   Client    │
└─────────────┘                    └──────────────┘                    └─────────────┘

Technology Stack:

  • Server: Node.js + Express + Socket.io + PostgreSQL
  • Android: Kotlin + WorkManager + Room + OkHttp
  • Web Client: React + TypeScript + Vite + Material-UI
  • Database: PostgreSQL with Prisma ORM

Quick Start

Prerequisites

  • Node.js 20+
  • Android Studio (for Android development)
  • Docker & Docker Compose (for local development)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/daakiya.git
    cd daakiya
  2. Install dependencies:

    npm run install:all
  3. Start development environment:

    # Start databases (PostgreSQL + Redis)
    docker-compose up -d
    
    # Run database migrations
    cd packages/server
    npx prisma migrate dev
    npx prisma generate
    
    # Start server and web client
    cd ../..
    npm run dev
  4. Access the application:

Note: This project uses non-standard ports for security:

  • PostgreSQL: 15432 (external) → 5432 (internal)
  • Redis: 16379 (external) → 6379 (internal)
  • Server: 8443 (external) → 3000 (internal)

Android Setup

cd packages/android
./gradlew assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apk

Development

Project Structure

daakiya/
├── packages/
│   ├── server/          # Cloud relay server (Node.js)
│   ├── android/         # Android application (Kotlin)
│   ├── web-client/      # React web client
│   └── shared/          # Shared types and utilities
├── docs/                # Documentation
└── .github/             # CI/CD workflows

Available Scripts

# Install all dependencies
npm run install:all

# Run all tests
npm run test

# Run linting
npm run lint

# Type checking
npm run typecheck

# Start development servers
npm run dev

# Build all packages
npm run build

# Clean all node_modules and build artifacts
npm run clean

Security & Privacy

End-to-End Encryption

  • Algorithm: AES-256-GCM (authenticated encryption)
  • Key Storage: Android KeyStore (hardware-backed when available)
  • Key Exchange: QR code pairing with secure random codes
  • Server Access: None (zero-knowledge architecture)

Data Retention

  • Default: 7 days (configurable)
  • Storage: Encrypted at rest
  • Auto-Delete: Automated cleanup job
  • User Control: Configure retention period in settings

Deployment

Quick Deploy Options

Production Deployment

# Copy environment template
cp .env.production.template .env.production

# Edit with your production settings
nano .env.production

# Deploy (automated script)
./scripts/deploy.sh

# Or manually with Docker Compose
docker-compose -f docker-compose.prod.yml up -d

See Deployment Guide for detailed instructions.

Environment Variables

Production (use non-standard ports for security):

DATABASE_URL=postgresql://user:password@host:15432/daakiya
JWT_SECRET=<use-32+-random-characters>
REDIS_URL=redis://host:16379
MESSAGE_RETENTION_DAYS=7
ALLOWED_ORIGINS=https://your-domain.com
PORT=8443

See Port Configuration for security details.

Monitoring & Maintenance

# View logs
docker-compose -f docker-compose.prod.yml logs -f

# Check service health
curl https://your-domain.com/health

# Database backup
docker-compose -f docker-compose.prod.yml exec postgres pg_dump -U daakiya_prod daakiya_prod > backup.sql

# Restart services
docker-compose -f docker-compose.prod.yml restart

Testing

Unit Tests

# Run all unit tests
npm run test

# Run with coverage
npm run test:ci

Integration Tests

# Start test environment
docker-compose -f docker-compose.integration.yml up -d

# Run integration tests
npm run test:integration

# Stop test environment
docker-compose -f docker-compose.integration.yml down -v

See CI/CD Documentation for testing details.

Android Emulator Tests

cd packages/android
./gradlew connectedAndroidTest

Roadmap

MVP (Current)

  • SMS capture on Android
  • End-to-end encryption
  • WebSocket real-time sync
  • Web client
  • Device pairing via QR code

Post-MVP

  • SMS sending from desktop
  • iOS support
  • Native desktop apps (Electron)
  • MMS support
  • Message search
  • Contact sync
  • Dark mode
  • Multiple language support

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Documentation

Test Coverage

  • Unit Tests: 64 tests passing (98.5% coverage)
  • Integration Tests: 58 tests (infrastructure + SMS simulator + E2E)
  • Android Tests: Unit and instrumented tests
  • CI/CD: Automated testing on all PRs

Trigger integration tests: Add integration-tests label to PR Trigger Android emulator tests: Add android-emulator label to PR

Additional Documentation

License

MIT License - see LICENSE file for details

Acknowledgments


Made with ❤️ for privacy-conscious users

About

End-to-end SMS synchronization between Android devices and web browser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published