1. Executive Overview
Notes (branded as Notes by StrangeInfinity) is an original, production-quality, offline-first Android note-taking application designed with inspiration from Google Keep and Samsung Notes. Engineered strictly around user sovereignty, it guarantees zero tracking, client-side AES-256-GCM encryption, and local-first persistence.
2. Technology Stack
| Layer | Technology | Version | Role |
|---|---|---|---|
| Platform | Android | Min SDK 26 (Android 8.0), Target SDK 34 (Android 14) | Target runtime ecosystem |
| Language | Kotlin | 2.0.21 | Strict typing, coroutines, and Flow |
| UI Toolkit | Jetpack Compose & Material 3 | BOM 2024.10.00 | Declarative reactive UI, animations |
| Persistence | Android Room | 2.6.1 | SQLite schema, relational queries, atomic transactions |
| Preferences | Jetpack DataStore | 1.1.1 | Type-safe user preferences persistence |
| Navigation | Navigation Compose | 2.8.3 | Type-safe single-activity screen routing |
| Cryptography | Standard Java/Android Provider | JVM Standard | AES/GCM/NoPadding, PBKDF2WithHmacSHA256 |
| File Access | Storage Access Framework (SAF) | Android Standard | Zero broad storage permissions needed |
3. Clean Architecture & Modular Structure
The project follows strict Unidirectional Data Flow (UDF) and Clean Architecture patterns:
com.strangeinfinity.notes/
├── MainActivity.kt # Single root Activity, edge-to-edge system insets
├── NotesApplication.kt # Application lifecycle container & dependency provider
├── core/
│ ├── model/ # Domain models (Note, Folder, Tag, Checklist, Drawing)
│ ├── database/ # Room entities, DAOs, NotesDatabase singleton
│ ├── security/ # BackupCrypto (AES-256-GCM, PBKDF2, tamper detection)
│ ├── backup/ # BackupManager, schemas, staging, transactional restore
│ ├── data/ # NotesRepository, PreferencesRepository, AttachmentManager
│ └── designsystem/ # Color palettes, high-contrast typography, components
├── feature/
│ ├── home/ # Note grid/list, debounced search, multi-select, filter chips
│ ├── editor/ # Note editor, formatting bar, checklist mode, autosave
│ ├── drawing/ # Handwriting & sketch canvas, smoothing, stroke controls
│ ├── folders/ # Folder management, custom color picker, safe cascade
│ ├── trash/ # Soft deletion, note restoration, permanent deletion
│ ├── backup/ # Encrypted/Plain JSON backup & restore with safe preview
│ └── settings/ # App theme (Light/Dark/System), layout, sorting, storage
└── ui/
└── navigation/ # Type-safe screen navigation and routes
4. Client-Side Cryptographic Specifications
Password-protected backups are encrypted on-device before writing to external storage using authenticated AES-256-GCM:
| Parameter | Specification | Security Rationale |
|---|---|---|
| Cipher Algorithm | AES/GCM/NoPadding |
Authenticated encryption provides confidentiality and integrity in a single pass. |
| Key Length | 256 bits (32 bytes) | Exceeds current NIST cryptographic standards. |
| Key Derivation | PBKDF2WithHmacSHA256 |
Strong key derivation resistant to brute-force acceleration. |
| Salt Size | 16 bytes (128 bits) | Generated freshly via SecureRandom per backup archive. |
| Iteration Count | 100,000 iterations | High computational work factor defeating rainbow table dictionaries. |
| IV / Nonce Size | 12 bytes (96 bits) | Standard recommended GCM nonce length; never reused. |
| Auth Tag Length | 128 bits (16 bytes) | Guarantees that bit-flipping attacks cause decryption failure. |
5. Versioned Backup Envelope Schema
All notes, folders, checklists, and vector drawings are marshaled into a clean, human-inspectable JSON envelope when unencrypted, or encapsulated in a binary cryptographic container:
{
"version": 1,
"appVersion": "1.0.0",
"exportedAt": 1729684800000,
"isEncrypted": true,
"cryptoMetadata": {
"algorithm": "AES-256-GCM",
"kdf": "PBKDF2WithHmacSHA256",
"iterations": 100000,
"saltBase64": "vF8aR3g2sK4x7...",
"ivBase64": "d98g2aL1m5p0..."
},
"payload": "<Base64-encoded encrypted ciphertext with appended 128-bit GCM tag>"
}
6. Vector Handwriting & Canvas Engine
Rather than saving low-resolution raster bitmaps, strokes in Notes are captured as raw floating-point vector paths:
- Bézier Interpolation: Drag gestures calculate midpoints and interpolate smooth quadratic Bézier curves to prevent jagged stroke artifacts.
- Lossless Vector Scaling: Drawings scale cleanly across small phone screens and ultra-high-resolution 12-inch tablets without pixelation.
- Stroke History Stack: Complete undo and redo capability, color changes, and customizable stroke thickness.
7. Building from Source Code
Prerequisites: JDK 17 or 21, Android SDK 34, Git.
# 1. Clone repository
git clone https://github.com/dev-hints/Notes.git
cd Notes
# 2. Build Debug APK
./gradlew assembleDebug
# 3. Output artifact location:
# app/build/outputs/apk/debug/app-debug.apk
8. Installation & ADB Deployment
Install directly via standalone APK or Android Debug Bridge:
# Install directly to USB-connected Android device:
adb install -r Notes-release.apk
# Launch MainActivity:
adb shell am start -n com.strangeinfinity.notes/.MainActivity