251 lines
6.1 KiB
Markdown
251 lines
6.1 KiB
Markdown
# 🌊 LifeFlow - Personal Life Management System
|
|
|
|
> Transform your daily routines into enjoyable habits
|
|
|
|
[](https://flutter.dev)
|
|
[](LICENSE)
|
|
|
|
## 📱 Overview
|
|
|
|
LifeFlow is a comprehensive life management app that helps you track:
|
|
- 💊 Medications & Vitamins
|
|
- 📅 Appointments & Meetings
|
|
- 😴 Sleep Schedule
|
|
- 🍎 Food & Nutrition
|
|
- 💧 Hydration
|
|
- 🏃 Exercise
|
|
- 🧼 Hygiene
|
|
- 🧘 Self Care
|
|
|
|
### ✨ Features
|
|
|
|
- **Easy Logging** - One-tap routine completion
|
|
- **Smart Notifications** - Never miss a routine
|
|
- **Gamification** - Points, streaks, badges, levels
|
|
- **Home Assistant** - Full integration with sensors & buttons
|
|
- **SMS Parsing** - Auto-detect appointments from texts
|
|
- **Cross-Platform** - Android, PC app, Web
|
|
|
|
---
|
|
|
|
## 🚀 Quick Start
|
|
|
|
### Prerequisites
|
|
|
|
- Flutter SDK 3.19 or higher
|
|
- Android Studio (for Android SDK)
|
|
- Git
|
|
|
|
### Installation
|
|
|
|
1. **Clone the repository**
|
|
```bash
|
|
git clone https://git.lemonlink.eu/impulsivefps/LifeFlow.git
|
|
cd LifeFlow
|
|
```
|
|
|
|
2. **Install Flutter** (if not already installed)
|
|
```bash
|
|
# Option 1: Use the provided script
|
|
bash scripts/install_flutter.sh
|
|
source ~/.bashrc
|
|
|
|
# Option 2: Manual installation
|
|
# Download from: https://docs.flutter.dev/get-started/install
|
|
```
|
|
|
|
3. **Navigate to Android app**
|
|
```bash
|
|
cd android
|
|
```
|
|
|
|
4. **Get dependencies**
|
|
```bash
|
|
flutter pub get
|
|
```
|
|
|
|
5. **Build APK**
|
|
```bash
|
|
# Debug APK (for testing)
|
|
flutter build apk --debug
|
|
|
|
# Release APK (for distribution)
|
|
flutter build apk --release
|
|
```
|
|
|
|
6. **Find your APK**
|
|
```
|
|
build/app/outputs/flutter-apk/app-release.apk
|
|
```
|
|
|
|
---
|
|
|
|
## 📂 Project Structure
|
|
|
|
```
|
|
LifeFlow/
|
|
├── android/ # Flutter Android App
|
|
│ ├── lib/
|
|
│ │ ├── main.dart # App entry point
|
|
│ │ ├── models/ # Data models
|
|
│ │ │ ├── routine.dart # Routine, Schedule, Reminder
|
|
│ │ │ ├── activity.dart # Activity logging
|
|
│ │ │ └── gamification.dart # Points, badges, levels
|
|
│ │ ├── repositories/ # Data access layer
|
|
│ │ ├── screens/ # UI screens
|
|
│ │ │ ├── dashboard/ # Main dashboard
|
|
│ │ │ ├── routines/ # Routine management
|
|
│ │ │ ├── calendar/ # Calendar view
|
|
│ │ │ ├── stats/ # Statistics & progress
|
|
│ │ │ └── settings/ # App settings
|
|
│ │ ├── services/ # Business logic
|
|
│ │ │ ├── database_service.dart # Hive database
|
|
│ │ │ └── notification_service.dart # Local notifications
|
|
│ │ └── theme/ # App theming
|
|
│ └── pubspec.yaml # Dependencies
|
|
│
|
|
├── home-assistant/ # Home Assistant Integration
|
|
│ └── custom_components/
|
|
│ └── lifeflow/
|
|
│ ├── __init__.py
|
|
│ ├── sensor.py # 6 sensors
|
|
│ ├── button.py # 4 buttons
|
|
│ ├── config_flow.py
|
|
│ └── manifest.json
|
|
│
|
|
├── scripts/ # Build scripts
|
|
│ └── install_flutter.sh # Flutter SDK installer
|
|
│
|
|
└── docs/ # Documentation
|
|
└── DEVELOPMENT_PLAN.md
|
|
```
|
|
|
|
---
|
|
|
|
## 🛠️ Development
|
|
|
|
### Running in Debug Mode
|
|
|
|
```bash
|
|
cd android
|
|
flutter run
|
|
```
|
|
|
|
### Running Tests
|
|
|
|
```bash
|
|
flutter test
|
|
```
|
|
|
|
### Building for Different Platforms
|
|
|
|
```bash
|
|
# Android APK
|
|
flutter build apk --release
|
|
|
|
# Android App Bundle (for Play Store)
|
|
flutter build appbundle --release
|
|
|
|
# Windows
|
|
flutter build windows --release
|
|
|
|
# Linux
|
|
flutter build linux --release
|
|
|
|
# macOS
|
|
flutter build macos --release
|
|
```
|
|
|
|
---
|
|
|
|
## 🏠 Home Assistant Integration
|
|
|
|
### Installation
|
|
|
|
1. Copy the `home-assistant/custom_components/lifeflow` folder to your Home Assistant `config/custom_components/` directory
|
|
2. Restart Home Assistant
|
|
3. Go to Settings > Devices & Services > Add Integration
|
|
4. Search for "LifeFlow"
|
|
|
|
### Available Entities
|
|
|
|
**Sensors:**
|
|
- `sensor.lifeflow_medications_today` - Medications taken today
|
|
- `sensor.lifeflow_water_intake` - Water consumed (mL)
|
|
- `sensor.lifeflow_sleep_quality` - Sleep quality (%)
|
|
- `sensor.lifeflow_daily_progress` - Daily completion (%)
|
|
- `sensor.lifeflow_current_streak` - Current streak (days)
|
|
- `sensor.lifeflow_total_points` - Total points
|
|
|
|
**Buttons:**
|
|
- `button.lifeflow_log_vitamins` - Log vitamins
|
|
- `button.lifeflow_log_water` - Log water
|
|
- `button.lifeflow_log_medication` - Log medication
|
|
- `button.lifeflow_complete_routine` - Complete routine
|
|
|
|
### Example Automation
|
|
|
|
```yaml
|
|
automation:
|
|
- alias: "Morning Routine Complete"
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.lifeflow_daily_progress
|
|
above: 50
|
|
condition:
|
|
- condition: time
|
|
after: "06:00:00"
|
|
before: "09:00:00"
|
|
action:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.bedroom
|
|
data:
|
|
brightness_pct: 100
|
|
```
|
|
|
|
---
|
|
|
|
## 📋 Feature Checklist
|
|
|
|
- [x] Flutter app structure
|
|
- [x] Data models (Routine, Activity, Gamification)
|
|
- [x] Repository layer with Riverpod
|
|
- [x] Dashboard UI with progress ring
|
|
- [x] Routine cards with categories
|
|
- [x] Light/Dark theme support
|
|
- [x] Local notifications service
|
|
- [x] Hive database setup
|
|
- [x] Home Assistant integration
|
|
- [ ] SMS parsing implementation
|
|
- [ ] PC app (Flutter Desktop)
|
|
- [ ] Cloud sync
|
|
- [ ] AI suggestions
|
|
|
|
---
|
|
|
|
## 🤝 Contributing
|
|
|
|
1. Fork the repository
|
|
2. Create a feature branch: `git checkout -b feature/amazing-feature`
|
|
3. Commit your changes: `git commit -m 'Add amazing feature'`
|
|
4. Push to the branch: `git push origin feature/amazing-feature`
|
|
5. Open a Pull Request
|
|
|
|
---
|
|
|
|
## 📄 License
|
|
|
|
This project is licensed under the MIT License.
|
|
|
|
---
|
|
|
|
## 🙏 Acknowledgments
|
|
|
|
- Flutter Team for the amazing framework
|
|
- Home Assistant Community for the integration platform
|
|
|
|
---
|
|
|
|
**Ready to transform your daily routines? Let's flow! 🌊**
|