
Memoria: Engineering an Offline-First, Private Journal with .NET 10 & Flutter
In an era of centralized cloud databases and data harvesting, Memoria was born from a simple question: Can we build a beautiful, AI-powered diary where personal reflections stay completely private and accessible offline? Memoria is a premium, secure journaling platform built on a "Local-First" architecture. It combines a highly responsive cross-platform Flutter client with a lightweight .NET 10 backend, supporting zero-knowledge cloud backups and peer-to-peer sync.
🏛️ The "Local-First" Architecture
Most modern diaries rely on a centralized cloud database. Memoria takes a different approach by making the user's physical device the primary source of truth.
- High-Performance Offline Storage: Instead of traditional SQL structures that slow down under heavy read-writes, the frontend uses an object-oriented database. This allows for sub-millisecond data retrieval directly mapped to app state, ensuring the UI remains fast even with thousands of entries.
- Dual-Protocol Gateway: The .NET 10 backend serves as a secure proxy and synchronization partner. It is configured to run a dual-protocol gateway: utilizing high-speed gRPC for database synchronization and standard REST APIs for media uploads and AI processing.
- Decoupled AI Engine: The frontend never connects to AI APIs directly. By routing all summarization, transcription, and chat features through the .NET backend, the application hides sensitive API keys and makes the AI layer interchangeable.
✨ Engineering the Experience
Creating a modern journaling application that runs offline while offering intelligent statistics and cloud sync required solving complex UI and architectural challenges.
1. Zero-Knowledge Cryptographic Sync
To support multi-device synchronization without exposing diary entries to a cloud database, Memoria uses a zero-knowledge sync flow:
- Client-Side Encryption: All entries are encrypted on the device using standard AES-256-GCM before they are transmitted.
- Secure Hardware Vault: Decryption keys are generated locally and stored inside the device's secure hardware enclave, accessible only through biometric authentication.
- Blind Backend Database: The server only stores encrypted data blobs. The backend coordinates synchronization but has zero knowledge of the actual text written by the user.
2. Peer-to-Peer Wi-Fi Synchronization
For users who do not want to use cloud backups, Memoria supports direct device-to-device synchronization:
- Local Service Discovery: The app leverages Multicast DNS (mDNS) to automatically discover other active instances of Memoria running on the same local Wi-Fi network.
- QR Handshake: Users pair their devices by scanning a dynamically generated QR code, which establishes a secure direct connection for streaming updates.
3. Non-Blocking Analytics Engine
Memoria features a dashboard mapping emotional trends, streak statistics, and word counts over time.
- Asynchronous Offloading: Parsing months of text to generate sentiment trends and tag correlations is computationally expensive. Memoria offloads these calculations to background processing threads to prevent UI lag.
- Single-Pass Feature Caching: Writing metrics and emotion tags are parsed exactly once during entry creation and cached in memory, preventing redundant calculations during loop iterations.

More features about the app:





🛠️ The Tech Stack
- Frontend: Flutter (Dart), Hooks & Riverpod (State & DI), ObjectBox (Local DB), JustAudio (Audio Engine), FL Chart (Analytics).
- Backend: .NET 10 Web API, Entity Framework Core, gRPC, SQLite.
- Security: Client-side AES encryption, mDNS (Zeroconf), Biometrics.
💡 The Takeaway
Memoria demonstrates the ability to build secure, distributed applications. It showcases proficiency in offline-first systems design, local network discovery protocols, and backend-driven AI integrations—balancing a beautiful user experience with uncompromising privacy.
Crafted with ❤️ by Stanley Morales