Hey !
I recently shipped , an AI-powered document assistant. I focused heavily on moving beyond simple "cloud storage" to a proactive assistant model. Building the orchestration layer for RAG and proactive insights on mobile was a massive challenge—here is how I structured it:
The Core Architecture:
-
Framework: React Native (Expo Managed Workflow).
-
Search Engine: Hybrid approach. We use Lightning-fast Full Text Search (FTS) for metadata/content and a RAG-based Instant Search for natural language queries.
-
Storage: Offline-first with AES-256 encryption at rest.
-
Cloud: Optional sync with Drive, Dropbox, and OneDrive.
Key Technical Deep-Dives:
-
RAG & Smart Aggregations: This was the toughest part. For queries like "How much did I spend on hotels in Dubai?", the app doesn't just find the files. It performs extraction insights and currency conversions on the fly based on the user's local currency, feeding that structured data into the RAG context.
-
Proactive "Spotlight" Logic: Instead of waiting for the user to search, I built a proactive layer. It scans for expiry dates, upcoming events, or financial insights (like a bill due) and triggers "Spotlight" notifications. Orchestrating these background checks was a fun challenge.
-
The "Smart Trips" Engine: This is a custom pipeline that handles:
-
Clustering: Grouping disparate docs (flights, hotels, tickets) into a single entity.
-
Geo-location & Parsing: Identifying locations and timezones across various document layouts to build a cohesive timeline.
-
-
Offline-First as a Requirement: I initially underestimated this, but users expect their sensitive docs (IDs, travel passes) to work in "Airplane Mode." Managing a local encrypted state that stays in sync with multiple cloud providers required some very careful conflict-resolution logic.