Chat Memoria Pro Documentation
Chat Memoria Pro – Technical & Functional Documentation
1. Executive Summary
Chat Memoria Pro is a highly specialized, offline-first Flutter application for the in-depth analysis of chat exports (especially WhatsApp ZIP files). The app is characterized by a strict focus on privacy (100% local processing), high-performance data management using SQLite, and native integration of local AI models for voice transcription. The target audience is users who want deep statistical and emotional insights into their chat histories without entrusting their private data to a cloud or a third-party provider.2. Architecture & Tech Stack
The app is modular and built according to modern Flutter best practices.
Core Technologies
- Framework: Flutter (SDK >= 3.0.0 < 4.0.0)
- State Management & Dependency Injection:
flutter_riverpod(^2.5.1) - Database:
sqflite(Relational SQL) - Local Storage:
shared_preferences(for settings, themes, free-tier limits) - UI & Visualization:
fl_chart(complex charts),google_fonts, Glassmorphism UI components. - AI & Machine Learning:
sherpa_onnx(Local execution of Whisper models for speech recognition).
[SCREENSHOT-PLATZHALTER: Insert relevant screenshot for the above feature/step here.]
Data Architecture & Performance Optimization
- SQLite with Indexes: The main tables
chatsandmedia_filesare optimized with indexes ondate_timestampandsender_nameto ensure performant queries even with >100,000 messages. - Isolate Processing: Compute-intensive tasks do not block the main thread.
zip_importer.dart) extracts media, parses chat logs with Regex, and executes batched inserts in a dedicated isolate.
* The generation of word and emoji statistics (wordStatsProvider, emojiStatsProvider) is offloaded to isolates via compute().
* The AI transcription also utilizes isolates to keep the UI smooth during audio signal processing.
[SCREENSHOT-PLATZHALTER: Insert relevant screenshot for the above feature/step here.]
3. Privacy & Security (Privacy-First)
To meet the strict requirements for the App Store and Play Store, as well as to gain user trust, the app is developed according to the Privacy-by-Design principle:
- 100% Offline Processing: There are no backend servers to which chat data is sent. The entire analysis, including the AI transcription, takes place locally on the device.
- Local Storage: ZIP archives are extracted into the protected
ApplicationDocumentsDirectory. - Biometric Security: The app supports
local_auth(FaceID/TouchID) to protect sensitive chat statistics from unauthorized physical access. - Nuke Function: The
DatabaseHelperoffers a method (nukeAllData) that completely eradicates the database and all physical media files from the device.
4. Detailed Feature Guide
4.1. Dashboard & Statistics (dashboard_screen.dart)
The dashboard presents visually processed metrics of the imported chat:
- Messages & Response Times: Calculates the average time (
getResponseTimes) users take to respond to a message. - Activity Distributions:
GROUP BY and strftime.
- Word and Emoji Analysis: Determines the most used words and emojis, filtering out system words (e.g., “image omitted”). Users can remove irrelevant words from the statistics.
- Social Sharing: The dashboard (or parts of it) can be exported as an appealingly rendered image (with Glassmorphism effects) via the
ScreenshotControllerand shared viashare_plus.
[SCREENSHOT-PLATZHALTER: Insert relevant screenshot for the above feature/step here.]
4.2. Chat Memories & Moments (moments_screen.dart)
The getEmotionalHighlight function combines locally found images with random text messages from the same day. This creates “memory cards” that recreate nostalgic moments from the chat history. Ignored data is excluded here via SQL.
[SCREENSHOT-PLATZHALTER: Insert relevant screenshot for the above feature/step here.]
4.3. Local AI Transcription (ki_transkription_screen.dart / ai_manager.dart)
- Functionality: Upon first launch, the app downloads the Whisper-Tiny ONNX model (decoder, encoder, tokens). Subsequently, it transcribes audio messages completely offline.
- Tech Details:
sherpa_onnxis used. - Current Limitation: Since
ffmpeg_kitwas omitted for dependency reasons (app size / licensing), the AI engine currently optimally processesWAVfiles natively. For typical WhatsApp formats (.opus,.m4a), a conversion or an appropriate message to the user is required.
[SCREENSHOT-PLATZHALTER: Insert relevant screenshot for the above feature/step here.]
4.4. ZIP Import Engine (zip_importer.dart)
- Supports various WhatsApp date formats (EU, US, with/without brackets) via robust regular expressions.
- Memory-friendly: The file is read in chunks (LineSplitter) and written to SQLite in batches of 1000 (
db.batch()) to prevent OOM (Out-of-Memory) errors with massive chat histories (>500,000 lines).
[SCREENSHOT-PLATZHALTER: Insert relevant screenshot for the above feature/step here.]
5. Monetization & Limits
The app utilizes a hybrid Freemium model:
- Advertising (Google Mobile Ads):
- Premium In-App Purchase (IAP):
in_app_purchase.
* The premium_upgrade SKU disables advertising, grants unlimited AI transcriptions, and unlocks advanced features (filters, themes, media search).
6. User Manual (User Instructions)
How the user utilizes the app: 1. Export from WhatsApp: * Open WhatsApp, go to the desired chat. * iOS: Tap the contact name -> “Export Chat” -> “Attach Media”. * Android: Menu (3 dots) -> “More” -> “Export chat” -> “Include media”. 2. Import into Chat Memoria Pro: * Click on the upload icon in the dashboard. * Select the freshly created ZIP file from your phone’s file manager. * Wait while the background process extracts the data (a loading bar informs about the progress). 3. Use AI Transcription: * Navigate to the “AI Transcription” tab. * Voice messages from the chat are listed here (pay attention to the format). * Free users initially have 3 transcriptions. New ones can be earned via ad videos or unlocked unlimitedly by purchasing the PRO version. 4. Delete Data: * In the settings, there is a “Panic Button” / data reset, with which the entire chat history is wiped from the device without leaving a trace.