Skip to content

bluecherrydvr/unity

Repository files navigation


Bluecherry DVR client to run across range of devices.

WebsitePurchaseChat

License

Copyright © 2022, Bluecherry DVR.

This project & work under this repository is licensed under GNU General Public License v3.0.

Download

Android iOS Windows GNU/Linux MacOS
arm64 .apk App Store Windows Setup AppImage 🚧 SOON App Store
armabi .apk 🚧 SOON winget install bluecherry Ubuntu/Debian .deb
x86_64 .apk 🚧 SOON Microsoft Store Raw Executable .tar.gz
🚧 SOON Play Store Fedora/Red Hat Linux .rpm

Installation

Most platforms will not require any extra steps to install the app.

Linux

You need mpv & libmpv-dev installed:

sudo apt install mpv libmpv-dev

To install the .deb file, run:

sudo dpkg -i bluecherry-linux-x86_64.deb

Features

  • 🎛️ Interactive camera grid viewer, with support for multiple layouts:
    $~~~~$ 💻 For larger screens, compact and multiple layout views are available.
    $~~~~~$📱 For smaller screens, see multiple cameras in 2x3, 2x2, 2x1 or 1x1 view
    $~~~~~$👆 Re-orgderable drag-and-drop camera viewer
    $~~~~~$🛞 Cycle through different layout views automatically
  • 🔎 Pinch-to-zoom fullscreen camera viewer.
  • 🏃 Events List Viewer
  • 🚡 Events Timeline Viewer
  • 📸 Direct camera viewer.
  • 🎮 Pan-Tilt-Zoom controls for supported cameras.
  • 🌓 Consistent & configurable system-aware, light & dark app theme.
  • ⏲️ Configurable in-app date & time format.
  • 📰 System camera event notifications with screenshot thumbnails.
  • ⏰ Ability to snooze notifications directly from notification or within the app.
  • 📺 Adaptive and responsive design for larger screens
  • 🕸️ Directionality support for right-to-left languages
  • 📱 Cross-platform

Translate

You may provide translations for the application to see it running in your own language. Please follow these steps:

Let's say, we're adding French (fr) translation.

  1. Fork the repository & navigate here.
  2. Create a new file named app_fr.arb.
  3. Add your translations to your new app_fr.arb file in correspondence to existing English translations.
  4. Send us a new pull-request. 🎉

When adding new strings, run bin/l10n_organizer.dart. This script will ensure that the new strings are added to all l10n files and that they are in the same location. It will also remove any unused strings. The base file is app_en.arb, so all strings must be added there first.

Bug-Reports

Send us details about any issues you discover in the issues or in the forums.

Contribute & Technical Review

The code uses Provider for state-management because it is widely known by Flutter community, doesn't bring any unnecessary complexity to the codebase & is scalable/stable enough.

Most ChangeNotifiers are available as singletons, though de-coupled from each other. This is important to handle things like loading app configuration before runApp, handling background notification button actions & few other asynchronous operations performed outside the widget tree. By having singletons, we are able to avoid a strict dependency on the BuildContext & do certain things in a more performant way.

Everything is well-documented (e.g. this). Other important comments & work-arounds may be found throughout the code.

Current source tree has following files:

lib
│
├───api                                                [API wrapper around Bluecherry DVR server.]
│   └──api.dart
│   └──ptz.dart  [API related to Pan-Tilt-Zoom controls]
│
├───l10n [Tranlations]
│
├───models                                             [model classes to serve & bind type-safe data together in various entities.]
│   ├───device.dart
│   ├───event.dart
│   ├───layout.dart
│   └───server.dart
│
├───providers                                          [core business logic of the application.]
│   ├───desktop_view_provider.dart                     [stores, provides & caches desktop camera layout]
│   ├───downloads_provider.dart                        [manages events downloading and progress]
│   ├───events_playback_provider.dart                  [caches data about the events playback view]
│   ├───home_provider.dart                             [stores, provides & caches data about the home page]
│   ├───mobile_view_provider.dart                      [stores, provides & caches mobile camera layout etc.]
│   ├───server_provider.dart                           [stores, provides & caches multiple DVR servers added by the user.]
│   └───settings_provider.dart                         [stores, provides & caches various in-app configurations & settings.]
│   └───update_provider.dart                           [manages app updates and app status.]
│
├───utils                                              [constant values, helper functions & theme-related stuff.]
│   ├───constants.dart
│   ├───extensions.dart
│   ├───methods.dart
│   ├───storage.dart
│   ├───theme.dart
│   ├───video_player.dart
│   └───window.dart
│
├───widgets                                            [UI/UX & widgets used to display content.]
│
├───firebase_messaging_background_handler.dart         [handles in-app notifications, snoozing, thumbnails etc. & other Firebase related hooks.]
├───firebase_options.dart                              [auto-generated firebase configuration.]
└───main.dart                                          [entry-point of the application.]

Feel free to send any pull-requests to add any features you wish or fix any bugs you notice.

Build

The build process is pretty straight-forward. You need to have Flutter installed on your system.

git clone https://github.com/bluecherrydvr/unity
cd unity
flutter pub get
flutter gen-l10n
flutter build [linux|windows|android|ios]

The automated build process is done using GitHub Actions. You may find the workflow here. The workflow builds the app for all supported platforms & uploads the artifacts to the release page.

On Linux, a Flutter executable with different environment variables is used to build the app for different distributions. This tells the app how the system is configured and how it should install updates. To run for Linux, you need to provide the following environment variables based on your system, where [DISTRO_ENV] can be appimage (AppImage), deb (Debian), rpm (RedHat) or tar.gz (Tarball).

flutter run --dart-define-from-file=linux/env/[DISTRO_ENV].json

About

[work-in-progress] Bluecherry DVR client to run across range of devices. 💙

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6