How benmotyka/myplants-app works
Main Components Identification
a) Client Layer (Mobile Application)
• Frontend Components (React Native/Expo)
• Local Storage (AsyncStorage - evident from __mocks__ directory)
• State Management (indicated by the store directory)
b) Service Layer
• API Services (visible in services directory)
• Notification System (shown by useNotifications hook)
• Image Handling Service
c) External Services
• Sentry (for error tracking)
• Push Notification Service
• Backend Server (referenced in .env.example)
Architectural Pattern Representation
a) Component Organization:
• Components hierarchically:
• Screens (home, plants, settings)
• Components (reusable UI elements)
• Services (plant.ts, user.ts, watering.ts)
• Utils (date.ts, device.ts, images.ts)
b) Data Flow:
• Components and Services
• Services and External APIs
• Local Storage and Components
Specific Elements
Frontend Layer:
┌─ UI Components
• Screens
• Home
• Plants Management
• Settings
• Shared Components
• Basic Components
• Modals
• Core Services
• Plant Service
• User Service
• Watering Service
• State Management
• Store
• Utils & Helpers
Integration Points
Clear connections for:
• API interactions (config/api)
• Push notifications (hooks/useNotifications)
• Image handling (utils/images)
• Error tracking (Sentry integration)
• Internationalization (translations directory)
Technical Stack Callouts
Key technologies:
• Expo
• React Native
• styled-components
• Sentry
• AsyncStorage
Remember to emphasize the mobile-specific aspects like push notifications and camera/image handling, as these are crucial for the app's functionality.
This system design should clearly communicate how the application handles its core features: plant management, watering schedules, notifications, and image management, while showing the integration with external services and the backend API.