This document details the internal architecture, design patterns, state flow, cryptographic safeguards, and native platform integration of Vaulty.
Vaulty follows clean, modular architectural boundaries:
lib/
├── app/ # Application composition, routing (GoRouter), live bootstrap
├── core/
│ ├── l10n/ # Internationalization engine (AppStrings, hi.dart, en)
│ ├── theme/ # Pixel-inspired Material 3 tokens, colors, typography, abstract art
│ ├── utils/ # Formatters (dates, file sizes, mime types)
│ └── widgets/ # Atomic reusable UI components (AppCard, AppButton, NoticeCenter)
├── domain/
│ ├── models/ # Pure domain models (Document, StorageInfo, SearchFilter, AuditEvent)
│ └── repositories/ # Repository interfaces (DocumentRepository, AuthRepository, SearchRepository)
├── data/
│ ├── cache/ # Hardware-backed AES-256-GCM local encrypted cache & envelopes
│ ├── device/ # Native bridges (biometrics, notifications, sharing, file validation)
│ ├── drive/ # Google Drive v3 REST API implementation, OAuth verification, metadata codec
│ └── mock/ # Fixtures and deterministic test scenarios
└── features/
├── auth/ # Login, account gate, biometric lock screen
├── home/ # Home shell, storage quota card, abstract card banner, recents
├── documents/ # Document list/grid, live file preview, metadata details, quick actions
├── search/ # Filter chips, instant query matching, advanced search sheet
├── upload/ # Intake sheets (camera, gallery, files), document metadata forms
├── imports/ # Android SEND share-intent review and batch staging
├── settings/ # Appearance, language selector, cache controls, reminders, danger zone
└── trash/ # Soft-delete management, restore, and 30-day sync purge
Vaulty utilizes Riverpod 2.6 for reactive, decoupled, compile-safe dependency injection and state management.
graph TD
Auth[authProvider: Google User State] --> DocRepo[documentRepositoryProvider]
Auth --> DriveAPI[driveApiProvider]
Auth --> Cache[vaultCacheProvider]
DocRepo --> DocList[documentListProvider: Active Files]
DocRepo --> TrashList[trashListProvider: Deleted Files]
DocRepo --> StorageInfo[storageInfoProvider: Drive Quota]
DocList --> FilteredDocs[filteredDocumentsProvider]
SearchFilter[searchFilterProvider] --> FilteredDocs
FilteredDocs --> HomeRecents[homeRecentsProvider]
FilteredDocs --> DocumentScreen[Documents Screen View]
UiPref[uiPreferencesProvider: Theme / Language] --> ThemeMode[AppTheme & Locale]
Vaulty interacts with Google Drive’s REST API v3 using direct client-side HTTP calls (lib/data/drive/drive_api.dart).
Documents are stored with canonical metadata mapped directly to Google Drive properties:
{
"name": "Passport_Front.pdf",
"mimeType": "application/pdf",
"parents": ["appDataFolder"],
"properties": {
"vaulty_owner": "Aditya Chaudhari",
"vaulty_tags": "travel,id,passport",
"vaulty_kind": "pdf",
"vaulty_uploaded_at": "2026-10-15T10:00:00.000Z",
"vaulty_renewal_date": "2028-05-15",
"vaulty_deleted_at": null
}
}
For files up to 50 MB:
POST https://www.googleapis.com/upload/drive/v3/files?uploadType=resumable.Content-Range headers.Vaulty employs authenticated encryption (AES-256-GCM) for all files cached on the local Android filesystem.
AndroidKeyStore provider./data/user/0/in.teamparadox.vaulty/cache/).FileProvider directory and marked for deletion upon app pause.MainActivity.kt)The Android host communicates with Flutter via dedicated MethodChannel and EventChannel pipelines:
android.graphics.pdf.PdfRenderer opens the local PDF and rasterizes the first page into an in-memory Bitmap.MainActivity.kt handles Intent.ACTION_SEND and Intent.ACTION_SEND_MULTIPLE.ContentResolver, verified, copied into temporary sandboxed storage, and dispatched into Flutter’s incomingShareProvider.BootReceiver.kt listens to android.intent.action.BOOT_COMPLETED.AlarmManager.Vaulty features an in-house, zero-dependency localization engine (AppStrings & hi.dart) optimized for performance and strict user data privacy.
{n} documents -> {n} दस्तावेज़Step {n} of 3 -> चरण {n}/3Due in {n} days -> {n} दिनों में देय