A modern, cross-platform mobile application designed specifically for police officers to manage and view their duty schedules. Built with Flutter using clean architecture principles for optimal performance and maintainability.
- 📅 Interactive Calendar: Easy-to-use calendar with month/year picker for quick navigation
- 👥 Personal Duty Groups: Set your preferred duty group for personalized schedule views
- 🔄 Offline First: No internet required - all data stored locally on your device
- 🌍 Multi-Language: Full German and English localization
- 📊 Multiple Schedules: Switch between different duty schedule types (Bereitschaftspolizei, ESD, etc.)
- 🎯 Auto Schedule Generation: Automatically generates schedules based on rotation patterns
- 👥 Partner Integration: Track your partner's schedule alongside your own
- 🎨 Customizable Colors: Personalize schedules with custom accent colors
- 📋 Detailed Duty Info: Tap any date to see specific duty details and times
- 🔧 Flexible Duty Types: Support for Frühdienst, Spätdienst, Nachtdienst, and special assignments
- 📚 Holiday Integration: View school holidays and public holidays directly in your calendar
- 🗺️ Federal State Selection: Choose your federal state for accurate holiday data
- 📡 Powered by Mehr-Schulferien.de: Uses the excellent free API from Mehr-Schulferien.de for accurate holiday data
- 🔐 Your Data Stays Private: All schedule data stored locally on your device
- 🚫 No Cloud Sync: Your personal schedule information never leaves your device
- 📊 Optional Analytics: Help improve the app with optional Sentry analytics (can be turned off)
- 🛡️ GDPR Compliant: Full compliance with European data protection regulations
- Direct APK: Available in GitHub Releases
# Clone the repository
git clone https://github.com/lusu007/dienstplan.git
cd dienstplan
# Install dependencies
flutter pub get
# Run the app
flutter run
# Build for production
flutter build apk --releaseFor detailed development setup and workflow, see CONTRIBUTING.md.
lib/
├── core/ # Core utilities and services
│ ├── di/ # Dependency injection
│ ├── initialization/ # App initialization
│ ├── services/ # Core services
│ ├── utils/ # Utilities and helpers
│ └── cache/ # Caching mechanisms
├── data/ # Data layer
│ ├── data_sources/ # Data sources (local, remote)
│ ├── models/ # Data models
│ ├── repositories/ # Repository implementations
│ └── services/ # Data services
├── domain/ # Domain layer
│ ├── entities/ # Business entities
│ ├── use_cases/ # Business logic use cases
│ └── repositories/ # Repository interfaces
└── presentation/ # Presentation layer
├── controllers/ # State management controllers
├── screens/ # UI screens
└── widgets/ # Reusable UI components
- No GetIt: The app does not use GetIt. DI is handled via Riverpod providers.
- Providers: Defined in
lib/core/di/riverpod_providers.dartand generated intolib/core/di/riverpod_providers.g.dart. - KeepAlive: Long-lived services (e.g.,
databaseService,languageService,sentryService,scheduleConfigService) are marked with@Riverpod(keepAlive: true)to avoid re-initialization between screens. - Usage: Consumers access dependencies via
ref.read(someProvider)/ref.watch(someProvider)(or.futurefor async providers).
- Entry point:
lib/main.dart - Bootstrap:
AppInitializer.initialize()creates a sharedProviderContainer, warms critical services, and returns the container. - Sentry: Initialized via
AppInitializer.initializeSentry(...)beforerunApp. - Root widget:
presentation/app.dartwrapped inUncontrolledProviderScopeusing the prebuilt container.
Duty schedules are defined using JSON configuration files in assets/schedules/. The format supports comprehensive schedule management.
name: Display name for the schedule configurationcreated_by: Author of the scheduledescription: Detailed description of the schedulestart_week_day: First day of the week (e.g., "Monday")start_date: Reference date for schedule calculationsdays: Array of day abbreviationsicon: Icon identifier for visual representation
id: Short identifier (e.g., "F", "S", "N")label: Human-readable nameall_day: Optional flag for all-day dutiesicon: Optional icon identifier for visual representation
- Defines the display order of duty types in the UI
- Controls sorting and grouping of duties
length_weeks: Duration of the rotation cyclepattern: Array of weekly patternspattern[week][day]: Duty type for each day of each week
id: Unique identifier for the groupname: Display namerhythm: Reference to rhythm configurationoffset_weeks: Week offset from the start date
The icon field supports various Material Design icon names. For a complete list of available icons, see lib/core/utils/icon_mapper.dart. If no icon is specified or an invalid icon name is used, a default schedule icon will be displayed.
- Flutter SDK 3.2.3 or higher
- Dart SDK 3.2.3 or higher
- Android Studio / VS Code
- Git
# Clone the repository
git clone https://github.com/lusu007/dienstplan.git
cd dienstplan
# Install dependencies
flutter pub get
# Run the app
flutter run
# Run tests
flutter test
# Build for production
flutter build apk --releaseWe welcome contributions! Please see our Contributing Guidelines for detailed information on:
- 🚀 Development setup and workflow
- 📝 Code standards and best practices
- 🧪 Testing guidelines
- 📋 Pull request process
- 🐛 Issue reporting
- 🏗 Project structure and architecture
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes following our coding standards
- Test thoroughly with
flutter test - Submit a pull request with a clear description
For questions and discussions, please use GitHub Discussions.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
✅ You may:
- View, study, and modify the source code
- Compile and run the application for personal use
- Distribute modified versions with source code
❌ You may not:
- Use in closed-source projects without publishing source
- Remove or alter license notices
- Distribute compiled versions commercially without permission
- Source code: Open source under AGPL-3.0
- Compiled app: Available commercially in app stores
- Personal builds: Allowed for personal use
- School Holidays & Public Holidays: Powered by the excellent free API from Mehr-Schulferien.de. We thank the developers for providing this valuable service that makes accurate holiday data available to our users. The open-source project is available on GitHub.
This project uses several open-source libraries. See the About Screen in the app for a complete list of licenses.
- GitHub Issues: Report bugs or request features
- Documentation: Check the code comments and this README
- Community: Join discussions in GitHub Discussions
Built with ❤️ for police officers in Germany
