Skip to content

zribktad/shift_master

Repository files navigation

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors