A secure, private, and decentralized chat app built on Nostr, using the MLS protocol under the hood.
- Secure Messaging: End-to-end encryption using Messaging Layer Security (MLS) protocol
- Decentralized: Built on the Nostr protocol for censorship resistance
- Cross-Platform: Runs on Android, iOS, Linux, macOS, and Windows
- Group Chats: Secure group messaging with MLS
- Media Support: Send encrypted images, audio messages, and more
- Modern UI: Beautiful, responsive interface built with Flutter
- β Android - Fully supported
- β iOS - Fully supported
- β³ macOS - Coming soon
- β³ Windows - Coming soon
- β³ Linux - Coming soon
- β³ Web - Coming soon
- Frontend: Flutter (Dart) for cross-platform UI
- Backend: Rust crate with flutter_rust_bridge integration
- Protocols:
- Nostr for decentralized communication
- MLS (Messaging Layer Security) for end-to-end encryption
- Libraries:
- OpenMLS for MLS implementation
- rust-nostr for Nostr functionality
Make sure you have the following installed:
-
Flutter SDK (3.24.x or later) - Install Flutter
-
Rust (latest stable) - Install Rust
-
Just (command runner) -
cargo install just -
flutter_rust_bridge_codegen -
cargo install flutter_rust_bridge_codegen -
Local nostr relays and blossom server (Optional): for local testing with nostr relays and blossom server:
git clone https://github.com/parres-hq/whitenoise cd whitenoise docker-compose up -d
-
Clone the repository
git clone https://github.com/parres-hq/whitenoise_flutter.git cd whitenoise_flutter -
Setup the project
just setup
This command will:
- Check your development environment
- Clean any existing builds
- Install dependencies
- Generate bridge code
- Build the Rust library
-
Run the app
flutter run# Setup project for new developers
just setup
# Run the app in debug mode
flutter run
# Run pre-commit checks (formatting, linting, analysis, tests)
just precommit
# List available devices
flutter devices# Regenerate flutter_rust_bridge code
just regenerate
# Install dependencies
just deps # Install both Flutter and Rust deps
just deps-flutter # Flutter dependencies only
just deps-rust # Rust dependencies only
# Build for development
just build-rust-debug # Rust library (debug)# Format code
just format # Format both Rust and Dart
just format-rust # Format Rust only
just format-dart # Format Dart only
# Lint and analyze
just lint # Lint both Rust and Dart
just lint-rust # Rust clippy
just analyze # Flutter analyzer
# Fix common issues automatically
just fix# Run tests
just test-rust # Rust unit tests
just test-flutter # Flutter unit tests (when test/ exists)You need to install lcov to generate report
# Mac OS
brew install lcov
# Linux
apt-get install lcov
# Windows
choco install lcov# Run tests with coverage and check diff coverage for changed files
just check-flutter-coverage
# Or run tests with coverage output manually
flutter test --coverage
# Generate coverage html report
genhtml coverage/lcov.info -o coverage/html
# Open coverage/html/index.html in your browser# Clean builds
just clean-flutter # Flutter build cache
just clean-rust # Rust build cache
just clean-bridge # Generated bridge files
just clean-all # Everything# Project information
just info # Show versions and dependency info
just doctor # Check development environment
# Documentation
just docs-rust # Generate and open Rust docsThe project uses GitHub Actions for continuous integration:
- Triggers: Pushes and PRs to
mainanddevelopbranches - Checks:
- Rust formatting (
cargo fmt --check) - Dart formatting (
dart format --set-exit-if-changed) - Rust linting (
cargo clippy) - Flutter analysis (
flutter analyze) - Rust tests (
cargo test)
- Rust formatting (
Before pushing code, run the same checks that CI will run:
just precommitThis ensures your code will pass CI checks.
- Rust: Follow standard Rust conventions, use
cargo fmtandcargo clippy - Dart: Follow Flutter/Dart conventions, use
dart formatandflutter analyze - Zero warnings policy: All code must pass linting without warnings
- Make your changes
- Run
just precommitto ensure code quality - Commit and push
- CI will automatically run the same checks
- Rust deps: Add to
rust/Cargo.toml, then runjust deps-rust - Flutter deps: Add to
pubspec.yaml, then runjust deps-flutter - Bridge regeneration: Run
just regenerateafter adding Rust public functions
whitenoise_flutter/
βββ lib/ # Flutter/Dart source code
β βββ domain/ # Business logic and models
β βββ ui/ # User interface screens and widgets
β βββ config/ # App configuration and providers
β βββ src/rust/ # Generated Rust bridge code
βββ rust/ # Rust source code
β βββ src/ # Rust library implementation
βββ integration_test/ # Flutter integration tests
βββ .github/workflows/ # CI/CD configuration
βββ justfile # Development commands
βββ flutter_rust_bridge.yaml # Bridge configuration
-
Bridge generation fails
just clean-bridge just regenerate
-
Build errors after dependency changes
just clean-all just deps just regenerate
-
Platform-specific build issues
just doctor # Check your development environment
- Check the Flutter documentation
- Check the Rust documentation
- Review flutter_rust_bridge documentation
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and run
just precommit - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Contribution guidelines
We want to keep our codebase clean, consistent, and easy to contribute to. Here are some guidelines to follow:
- β Unit tests: Add unit tests for all new providers.
- β»οΈ Widget design: Try to keep widgets small and simple. Extract complex logic to notifiers.
- π·οΈ Naming: Shared custom widgets should use the
Wnprefix for consistency.
This project is licensed under the GNU AGPL 3.0 license.
For more detailed documentation about the project, please visit the docs/ folder.