MirrorHR is a health monitoring application developed by FightTheStroke Foundation under MIT License. This guide provides comprehensive information for developers working on the MirrorHR project.
At MirrorHR, we believe it is fundamental to co-design and co-develop solutions with patients, for patients. Our development process centers the voices and needs of those living with epilepsy and their families, ensuring that the tools we build are truly meaningful and effective.
- macOS 14.0+
- Xcode 15.0+
- iOS 17.0+
- watchOS 10.0+
- Apple Developer account
- Swift 5.9+
-
Clone the repository
git clone https://github.com/FightTheStroke/MirrorHR-Epilepsy-Research-Kit-OSS.git cd MirrorHR-Epilepsy-Research-Kit-OSS -
Install development tools
brew install swiftlint
-
Set up environment variables
cp .env.example .env
Edit
.envwith your development credentials
-
Branch Management
main- production-ready codedevelop- integration branchfeature/*- new featuresbugfix/*- bug fixesrelease/*- release preparation
-
Commit Guidelines
type(scope): description [optional body] [optional footer]Types: feat, fix, docs, style, refactor, test, chore
-
Code Review Process
- All changes require pull requests
- CI checks must pass
- At least one reviewer approval required
- All comments must be resolved
-
Unit Tests
swift test --enable-code-coverage -
UI Tests
- Run through Xcode's Test Navigator
- Required for all UI changes
-
Performance Tests
- Battery impact testing
- Memory usage monitoring
- Network efficiency testing
-
Logging
- Use
mainDebugger.append()for consistent logging - Log levels: .event, .error, .warning, .info
- Enable verbose logging in debug builds
- Use
-
Common Issues
- HealthKit permissions
- Watch connectivity
- Background processing
- Memory management
-
HealthKit Integration
- Request minimal necessary permissions
- Handle data privacy carefully
- Follow Apple's HealthKit guidelines
-
Data Storage
- Use CoreData for persistent storage
- Implement proper error handling
- Regular data backup
-
Watch App
- Minimize background processing
- Optimize battery usage
- Handle connectivity changes gracefully
-
iOS App
- Efficient memory management
- Optimize video processing
- Handle large datasets efficiently
-
Data Protection
- Encrypt sensitive data
- Secure API communications
- Follow HIPAA guidelines
-
Authentication
- Implement proper session management
- Handle timeouts appropriately
- Secure credential storage
- Code signing problems
- Dependencies resolution
- SwiftLint violations
- Test failures
- HealthKit permission errors
- Watch connectivity problems
- Background processing limitations
- Memory warnings
For development support:
- Email: helpme@mirrorhr.org
- Issue Tracker: GitHub Issues
- Documentation: docs/
Copyright © FightTheStroke Foundation
Released under MIT License