How absknpl/docu-manage-mobile-app works
Project type and purpose
• Arkive is a cross-platform mobile app built with React Native and Expo for managing documents locally on a device.
• It’s a single mobile client (no separate backend server) that uses Context API for state, native modules (notification, share) for platform services, and Expo as its runtime.
File structure
• App.js at root is the entry point: it wires up all Context providers and loads the root navigator.
• /navigation contains AppNavigator.js and BottomTabNavigator.js: defines stack & tab flows.
• /screens holds the main UI containers (DocumentsScreen, TimelineScreen, SettingsScreen, NotificationsScreen, OnboardingScreen).
• /components holds reusable pieces (cards, lists, buttons, animations).
• /contexts defines global state managers: DocumentsContext, OnboardingContext, NotificationSettingsContext, ThemeContext.
• /utils has onboarding and notification-scheduling logic.
• Configuration: app.json, eas.json for Expo/EAS builds; package.json for dependencies.
Key architectural patterns
• Context API for global state separation (documents, theming, onboarding, notifications).
• Navigation layer: a root Tab navigator plus modal stacks for screens like upload or document viewer.
• Component‐based UI: screens compose small, stateless or stateful components.
• Utility modules for side effects (scheduling notifications, engagement logic).
• Expo provides native bindings (notifications, share sheet, asset bundling).
Main components and their interactions
a. Native Platform (iOS/Android)
– Hosts the Expo runtime
– Provides native services: Notifications, Share Sheet, File Picker
b. Expo Runtime
– Bridges React Native JS code to native modules
– Manages asset loading, development workflow
c. App.js (Root)
– Wraps Context Providers in this order: ThemeContext → NotificationSettingsContext → DocumentsContext → OnboardingContext
– Renders AppNavigator
d. Navigation Layer
– BottomTabNavigator: Documents, Timeline, Notifications, Settings
– Stack/Modal Navigator: Onboarding flow and UploadModal overlay
– OnboardingScreen appears conditionally via OnboardingContext
e. Screens
– DocumentsScreen: lists documents via DocumentList → DocumentCard components
– TimelineScreen: TimelineView → TimelineItem components
– NotificationsScreen: shows pending & delivered notifications (uses NotificationSettingsContext)
– SettingsScreen: controls theme & notification preferences (updates ThemeContext, NotificationSettingsContext)
– OnboardingScreen: uses OnboardingContext, animated MascotAnimation & OnboardingStep components
f. Contexts
– DocumentsContext: in-memory/document CRUD, persists to AsyncStorage (implied), triggers notifications scheduling on changes
– NotificationSettingsContext: holds user preferences, feeds into engagementNotification utility
– ThemeContext: light/dark/pop modes, consumed by styled components
– OnboardingContext: tracks new‐user flow, completion flag
g. Utils & Services
– engagementNotification.js: schedules/reschedules OS notifications via Expo Notifications API
– onboardingData.js: drives the OnboardingScreen steps
h. Assets