A non-custodial Bitcoin + Lightning wallet with MPesa fiat on/off ramp for the African market. Built with Rust, Node.js, and React Native.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SatsConnect Architecture β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β Mobile App β β Node.js β β Rust Engine β
β β (React Native)βββββΊβ Orchestrator βββββΊβ (gRPC Server) β
β β β β (REST API) β β β
β β β’ Secure Store β β β’ JWT Auth β β β’ Wallet Logic β
β β β’ Biometric β β β’ Rate Limiting β β β’ Lightning β
β β β’ QR Scanner β β β’ Input Validationβ β β’ Key Managementβ
β βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β β β
β β β β
β βΌ βΌ βΌ
β βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β Secure Storage β β Redis/BullMQ β β Lightning β
β β (Keychain) β β (Queues) β β Network β
β β β β β’ MPesa Jobs β β β’ Bitcoin Core β
β β β’ Private Keys β β β’ Airtime Jobs β β β’ LND Node β
β β β’ Seed Phrases β β β’ Webhook Jobs β β β’ Channel Mgmt β
β βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β
β βΌ
β ββββββββββββββββββββ
β β MPesa + Airtime β
β β (Fiat Bridge) β
β β β
β β β’ STK Push β
β β β’ B2C Payouts β
β β β’ Airtime API β
β β β’ Webhooks β
β ββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install -y protobuf-compiler
protoc --version # Verify installation
macOS:
brew install protobuf
protoc --version # Verify installation
Windows:
# Using Chocolatey
choco install protoc
# Or download from: https://github.com/protocolbuffers/protobuf/releases
Alternative - Use Bundled protoc: The project includes a bundled protoc binary. Set the environment variable:
# Windows
set PROTOC=.\backend\rust-engine\protoc\bin\protoc.exe
# Linux/macOS
export PROTOC=./backend/rust-engine/protoc/bin/protoc
git clone https://github.com/MWANGAZA-LAB/SatsConnect.git
cd SatsConnect
# Install root dependencies
npm install
# Install backend dependencies
cd backend/node-orchestrator
npm install
# Install mobile dependencies
cd ../../mobile
npm install
# Install Rust dependencies
cd ../rust-engine
cargo build
# Copy environment files
cp backend/node-orchestrator/env.example backend/node-orchestrator/.env
cp mobile/app.json.example mobile/app.json
# Edit configuration files with your settings
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Terminal 1: Start Rust Engine
cd backend/rust-engine
cargo run --bin engine_server
# Terminal 2: Start Node.js Orchestrator
cd backend/node-orchestrator
npm start
# Terminal 3: Start Mobile App
cd mobile
npm start
# Check health endpoints
curl http://localhost:4000/health/health
curl http://localhost:50051/health
# Test API endpoints
curl -X POST http://localhost:4000/api/wallet/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{"mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about", "label": "test-wallet"}'
# Server
NODE_ENV=development
PORT=4000
HOST=0.0.0.0
# JWT
JWT_SECRET=your-super-secret-jwt-key
JWT_EXPIRES_IN=1h
# Redis
REDIS_URL=redis://localhost:6379
REDIS_PASSWORD=
# Rust Engine
RUST_ENGINE_ADDR=http://127.0.0.1:50051
# MPesa (Safaricom)
MPESA_CONSUMER_KEY=your-consumer-key
MPESA_CONSUMER_SECRET=your-consumer-secret
MPESA_PASSKEY=your-passkey
MPESA_SHORTCODE=your-shortcode
MPESA_CALLBACK_URL=https://your-domain.com/webhook/mpesa
# Airtime (Chimoney)
CHIMONEY_API_KEY=your-chimoney-api-key
CHIMONEY_SUB_KEY=your-chimoney-sub-key
{
"expo": {
"name": "SatsConnect",
"slug": "satsconnect",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#000000"
},
"platforms": ["ios", "android"],
"ios": {
"bundleIdentifier": "com.satsconnect.app"
},
"android": {
"package": "com.satsconnect.app"
}
}
}
# Backend tests
cd backend/node-orchestrator
npm test
# Mobile tests
cd mobile
npm test
# Rust tests
cd backend/rust-engine
cargo test
# Generate coverage reports
cd backend/node-orchestrator
npm run test:coverage
cd mobile
npm run test:coverage
# Start test environment
docker-compose -f docker-compose.test.yml up -d
# Run E2E tests
cd backend/node-orchestrator
npm run test:e2e
cd mobile
npm start
# Scan QR code with Expo Go app
# Or run on simulator
npm run ios
npm run android
# Build for iOS
expo build:ios
# Build for Android
expo build:android
# Build images
docker-compose build
# Deploy to production
docker-compose -f docker-compose.prod.yml up -d
# Scale services
docker-compose up -d --scale node-orchestrator=3
# Build Rust engine
cd backend/rust-engine
cargo build --release
# Build Node.js orchestrator
cd ../node-orchestrator
npm run build
# Start services with PM2
pm2 start ecosystem.config.js
GET /health/health
GET /health
(gRPC)redis-cli ping
http://localhost:9090
http://localhost:3000
# View logs
docker-compose logs -f node-orchestrator
docker-compose logs -f rust-engine
# Or with PM2
pm2 logs
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ for the African Bitcoin community
SatsConnect - Bringing Bitcoin to Africa, one transaction at a time.