Pulmo A Mobile Application for Guided Breathing Exercises
Pulmo: A Mobile Application for Guided Breathing Exercises
Overview
Pulmo is a comprehensive mobile application designed to help users improve their breathing techniques through guided exercises. The app offers personalized breathing sessions, progress tracking, and adaptive scheduling to help users maintain a consistent breathing practice routine.
Technology Stack
Frontend
React Native (v0.74.1)
TypeScript
MobX for state management
React Navigation for routing
React Query for data fetching
Various UI libraries including:
react-native-reanimated
react-native-svg
react-native-fast-image
react-native-gesture-handler
shadcn/ui components
Backend & Infrastructure
Firebase Suite:
Firebase Authentication
Cloud Firestore
Firebase Cloud Functions
Firebase Storage
Firebase Analytics
Firebase Crashlytics
OneSignal for push notifications
Adapty for in-app purchases and paywalls
Development & Build Tools
Node.js (≥18)
Gradle for Android builds
XCode for iOS builds
ESLint and Prettier for code formatting
Core Features
1. User Management & Personalization
Multi-platform authentication (Google, Apple)
Detailed user profiling including:
Health goals
Respiratory conditions
Weight tracking
Experience level
Daily schedule preferences
2. Exercise System
Structured breathing exercises with:
Audio guidance
Visual instructions
Progress tracking
Real-time feedback
Three daily sessions:
Morning routine
Evening practice
Night-time relaxation
Exercise customization based on user's health goals and experience
3. Progress Tracking
Streak tracking system
Daily activity monitoring
Mood tracking after sessions
Performance analytics
Weekly progress reports
4. Notification System
Customizable exercise reminders
Streak maintenance alerts
Progress milestones
Session scheduling based on user's daily routine
5. Subscription Management
Tiered access system (free/pro)
Premium content gating
Integrated paywall system
Subscription status tracking
Technical Architecture
State Management
MobX stores for:
Authentication state (AuthStore)
User data (UserStore)
Exercise data (ExerciseStore)
Activity tracking (DateActivityStore)
Data Flow
User interactions trigger MobX actions
Actions update local state and sync with Firebase
Firebase Functions handle backend logic
Real-time updates propagate through Firebase listeners
UI reflects changes through MobX observers
Firebase Integration
Firestore Collections:
users: User profiles and preferences
master_exercises: Exercise templates
dailyActivities: User activity tracking
dailyExercises: Assigned exercises
streakData: User progress metrics
Key Technical Features
Offline Support
Local state persistence using mobx-persist-store
Efficient data caching
Optimistic updates
Performance Optimization
Lazy loading of exercise content
Image caching with react-native-fast-image
Efficient state updates with MobX
Security
Firebase Authentication integration
Secure data access rules
Protected API endpoints
Encrypted user data
Conclusion
Pulmo demonstrates the successful implementation of a complex mobile application combining real-time data synchronization, user authentication, progress tracking, and subscription management. The application's architecture ensures scalability, maintainability, and a smooth user experience while handling complex state management and data flow requirements.
The use of modern technologies like React Native, Firebase, and MobX allows for rapid development and iteration while maintaining high performance and reliability. The modular architecture and clear separation of concerns make the codebase maintainable and extensible for future feature additions.