How ayan-bain/project-rif works
Project type and purpose
• This is a full-stack mobile application (React Native + Expo) named “Smart Subscription Manager.”
• It enables users to track digital subscriptions, sync data via Firebase, fetch brand metadata via Brandfetch API, and schedule renewal reminders offline or online.
File structure
• Top-level files:
• App.js, index.js (entry points)
• google-services.json, eas.json (Expo & Firebase setup)
• babel.config.js, tsconfig.json (build configs)
• package.json (dependencies)
• assets/: font files and static assets
• src/components/:
• screens (HomeScreen.tsx, Details.tsx, AccountStatus.tsx)
• partials (AddSubscriptionForm, MoreMenu, UniversalLogoHandler)
• services (AuthHandler, RetrieveData, NotificationManager, Brandfetch integration, RenewalDate, NotificationRegistry)
• custom-components (CustomButton)
• constants/types
• src/subscriptions/: domain models/subscription.ts
README for additional insights
• Key features: automated brand discovery (Brandfetch), universal logo support (SVG/PNG), cloud sync (Firebase Auth & Firestore), smart notifications (expo-notifications), offline-first (AsyncStorage), dynamic theming.
• Tech stack: Expo/React Native, Firebase Auth & Firestore, AsyncStorage, react-native-svg, expo-notifications.
Main components & their relationships
A. Mobile App (React Native + Expo container)
• UI Layer
– Screens (Home, Details, AccountStatus)
– Partials & Custom Components (AddSubscriptionForm, UniversalLogoHandler, CustomButton)
• Service Layer
– AuthHandler (Firebase Auth)
– DataService (RetrieveData → AsyncStorage & Firestore sync)
– NotificationManager & NotificationRegistry (expo-notifications scheduling)
– DetailsHelper & RenewalDate logic
• Local Persistence
– AsyncStorage for offline caching
• Asset Management
– UniversalLogoHandler + react-native-svg + local assets/fonts
B. External Services
• Brandfetch API (HTTP calls for logos & metadata)
• Firebase Auth (user identity)
• Firebase Firestore (cloud database)
• Expo Notifications (push/local notifications)
Architectural patterns & design principles
• Offline-First Pattern: local cache (AsyncStorage) is the primary data source, then sync to Firestore.
• Service Abstraction: all network & storage interactions encapsulated in src/components/services.
• Modular UI: screens vs. partials vs. custom components.
• Dependency Injection points: services can be swapped (e.g., mocking Firebase).