Skip to content

kimusan/notr-app

Repository files navigation

Notr for Android

Minimal, privacy-first note taking that feels at home on Android while speaking the same secure language as the Notr CLI. The mobile app keeps the protocol identical, so your notebooks, encryption keys, and sync settings flow seamlessly between the command line and your phone.

Why Notr?

  • Built for simplicity: clean onboarding, focused UI, no marketing pixels or analytics.
  • Privacy on autopilot: every note stays encrypted end-to-end, even during sync.
  • Cross-platform continuity: scan a QR code or paste the CLI bootstrap secret and you are up and running in seconds.
  • Own your sync: bring your own storage via WebDAV or stay single-device with local-only backups.

Feature Highlights

  • End-to-end encryption – derives a master key using PBKDF2 (≥100k iterations) and wraps every note with AES-256-GCM, mirroring the CLI protocol byte-for-byte.
  • Seamless CLI pairing – reads and writes the same notr.db SQLite schema and config.json file produced by the CLI. Import via QR scan, clipboard or file picker.
  • Offline-first experience – full notebook tree, note detail, and Markdown editor work without network connectivity, syncing later when you choose.
  • Smart Markdown workspace – dual-pane preview on large screens, syntax-highlighting editor with quick-formatting chips, and live metadata.
  • Organised notebooks & search – fuzzy search, notebook filters, and conflict-aware merge logic keep large vaults usable on the go.
  • Biometric unlock – optionally cache the encrypted master key in the Android keystore-protected store, unlocking with fingerprint or face.
  • Configurable sync backends – switch between private local exports and WebDAV endpoints without touching the CLI.

Security & Privacy

  • Shared protocol with the CLI – the app reuses the same configuration schema (NotrConfig) and note payload format (RawNotePayload). You gain identical threat resilience across desktop and mobile.
  • Master key handling – passwords remain transient; only the encrypted master key bundle (salt, nonce, iterations) is stored. When biometrics are enabled, the wrapped key rests inside EncryptedSharedPreferences, protected by the Android keystore.
  • Encrypted database at rest – note bodies and metadata are encrypted before being persisted in SQLite. Sync backends only ever see ciphertext.
  • No trackers – there are no analytics SDKs, push providers, or third-party crash reporters. Network access is limited to the storage backend you configure.
  • Auditable Kotlin – the project is 100% Kotlin with Jetpack Compose UI, Hilt DI, and extensive unit tests around crypto, storage, and sync coordination.

Using the App with the Notr CLI

  1. Export your setup from the CLI
    Use the CLI’s export command (see the CLI repo docs) to obtain the bootstrap secret or configuration JSON. The CLI can display this as text or a QR code.
  2. Import into the Android app
    During onboarding choose Import existing setup. Scan the CLI-generated QR code or paste the secret string. Enter the same master password you use on the CLI.
  3. Verify notebooks
    The app reads the shared notr.db file, decrypts notes with your password, and mirrors the folder structure. Sync direction defaults to “ask” to prevent surprises.
  4. Keep syncing both ways
    Run the CLI and the app interchangeably. Conflict resolution follows the same strategies (ask, local, remote) defined in the shared configuration.

To start from scratch on Android, complete onboarding, then copy or export the generated configuration (config.json) alongside the encrypted notr.db from the app’s storage (via the sync screen or adb pull) and import it on your desktop. Both clients stay perfectly in step.

Getting Started

Prerequisites

  • Android Studio Ladybug or newer (Giraffe works too, but Compose previews improve on Ladybug+)
  • JDK 17 (Gradle wrapper takes care of the rest)
  • Android device or emulator running API 23+

Build & Run

./gradlew assembleDebug
./gradlew installDebug

Or open the project in Android Studio and use Run ▶️. The Gradle wrapper downloads all required dependencies; no global nvm setup is needed.

First-run Onboarding

  1. Decide whether to create a fresh vault or import an existing CLI setup.
  2. Select a sync backend:
    • Local: stores encrypted backups inside the app’s private storage. Best for single-device use or manual exports.
    • WebDAV: point to any self-hosted WebDAV endpoint (Nextcloud, ownCloud, etc.). Credentials stay encrypted locally.
  3. Choose whether to enable biometric unlock (available when the device supports it).
  4. Complete setup and start editing notes. Sync manually from the main screen when you are ready.

Project Layout

  • core/crypto – encryption utilities that mirror the CLI protocol.
  • core/config – serializers for the shared configuration document.
  • core/database – thin abstraction over the SQLite schema shared with the CLI.
  • core/sync – backend infrastructure (Local and WebDAV), conflict-aware merge service, and progress reporting.
  • features/* – Jetpack Compose screens for onboarding, notebooks, notes, search, sync status, and settings.
  • ui/theme & core/designsystem – reusable Material 3 theming primitives.

Testing

  • Run JVM unit tests (crypto, database, sync, view models):

    ./gradlew test
  • Instrumented tests live under app/src/androidTest. Execute with:

    ./gradlew connectedAndroidTest

    (Requires a running emulator or device.)

Roadmap & Ideas

Contributions toward offline conflict resolution UX, additional backends (S3, SFTP), or accessibility polish are welcome—see the Contributing guide.

License

Released under the MIT License. Notr Android is maintained by Kim Schulz and community contributors.

About

An android note app for the Notr app system.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published