Skip to content

Latest commit

 

History

History
230 lines (159 loc) · 5.38 KB

File metadata and controls

230 lines (159 loc) · 5.38 KB

Shift Master

Flutter Dart License

Shift Master is an intuitive mobile app for shift planning on Android and iOS. The app allows you to create shift cycle profiles, track shifts in a calendar view, and add notes to individual days.

✨ Features

📅 Shift Calendar

  • Monthly overview with color-coded shifts
  • Automatic calculation of shifts using modulo arithmetic
  • Codes and shapes for each shift (accessibility)
  • Day notes with visual indicators

🔧 Shift and Profile Management

  • Global shift library (A/B/C...) with colors and shapes
  • Cycle profiles - recurring work day patterns
  • Visual editor for easy cycle creation
  • Templates for quick start (24h, Week days, Carousel, 5-2)

📊 Statistics and Previews

  • Live cycle statistics (average hours/month, work:rest ratio)
  • Mini calendar preview when creating profiles
  • Pre-calculation of shifts for the entire month

🔄 Import/Export

  • Complete data export (shifts + profiles + notes)
  • Import with overwrite or merge options
  • JSON format with versioning

🏗️ Architecture

The app uses Clean Architecture with a Feature-First approach:

lib/
├── core/                    # Shared components
│   ├── logging/            # Logging system
│   └── ...
├── features/
│   └── shift_scheduler/     # Main functionality
│       ├── domain/         # Business logic
│       │   ├── entities/   # Domain entities
│       │   ├── repositories/ # Repository interfaces
│       │   └── usecases/   # Business use cases
│       ├── data/           # Data layer
│       │   ├── models/     # Hive models
│       │   ├── datasources/ # Data sources
│       │   ├── repositories/ # Repository implementations
│       │   └── mappers/    # Data mappers
│       └── presentation/   # UI layer
│           ├── providers/  # Riverpod providers
│           ├── screens/    # Screens
│           └── widgets/    # Components
└── main.dart

🛠️ Technologies

  • Flutter - UI framework
  • Dart - Programming language
  • Riverpod - State management
  • Hive-CE - Local database
  • Table Calendar - Calendar component
  • Flex Color Picker - Color picker
  • Google Fonts - Typography

🚀 Installation

Prerequisites

  • Flutter SDK (latest stable)
  • Dart SDK (latest stable)
  • Android Studio or Xcode (for native builds)

Project Setup

  1. Clone the repository:

    git clone https://github.com/your-username/shift_master.git
    cd shift_master
  2. Install dependencies:

    flutter pub get
  3. Generate code (Hive adapters, Riverpod):

    flutter pub run build_runner build
  4. Run the app:

    flutter run

Build for Android/iOS

Android APK:

flutter build apk --release

iOS (requires macOS + Xcode):

flutter build ios --release

Web:

flutter build web --release

📱 Usage

1. Creating a Shift

  • Go to Shift Library
  • Add a new shift with code (1-2 characters), name, color and shape
  • Set the shift duration in hours

2. Creating a Profile

  • Use a template or create a custom cycle
  • Select the start date
  • Edit the cycle pattern using the visual editor
  • Check the preview and statistics

3. Working with Calendar

  • Browse months with colored shifts
  • Click on a day for details and notes
  • Notes are automatically saved

4. Import/Export

  • Export all data to a JSON file
  • Import data from other devices
  • Choose between overwrite or merge

🧪 Testing

# Run all tests
flutter test

# Run tests with coverage
flutter test --coverage

🔧 Development

Code generation

# Generate Hive adapters
flutter pub run build_runner build

# Watch mode for changes
flutter pub run build_runner watch

Code analysis

# Flutter analyze
flutter analyze

# Format code
flutter format .

🌐 Localization

The app supports Slovak (primary UI language) using the intl package for date formatting.

📋 Specification

Detailed technical specification can be found in ShiftMaster_SPEC.md.

🤝 Contributing

Contributions are welcome! Please:

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Contribution Guidelines

  • Use English for code and comments
  • Follow Clean Architecture principles
  • Add tests for new functionality
  • Update documentation

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👥 Author

Tad - Initial development

🙏 Acknowledgments

  • Flutter team for the great framework
  • Hive team for the simple local database
  • Riverpod team for state management
  • Flutter developer community

⭐ If you like this app, give it a star on GitHub!