Code Monkey home page Code Monkey logo

emotionrennteam / log-storage-client Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 4.01 MB

A desktop app written with Flutter to upload and download log files to an S3-based object storage.

License: GNU General Public License v3.0

Kotlin 0.05% Go 0.64% Swift 0.16% Objective-C 0.02% Dart 84.20% CMake 5.96% C++ 8.30% C 0.65% Shell 0.02%
flutter dart s3 minio logging telemetry-data desktop-app windows-app linux-app flutter-desktop formula-student

log-storage-client's Introduction

Log Storage Client

The Log Storage Client is a desktop app for uploading and downloading log files to an S3-based object storage. It's written in Dart using the Flutter framework and can connect to any storage system that implements the S3 protocol (e.g. Amazon S3 or MinIO). It comes with an auto upload function and helps you to collect log files in a central place / storage.

Log Storage Client screen recording

Features

  • ๐ŸŽ‰ Can be connected to any storage system which implements the S3 protocol
  • ๐Ÿ“„ List files on local file system (offline) and on storage system (online)
  • ๐Ÿ’พ Upload and download (log) files
  • ๐Ÿ“Ÿ Compatible with MinIO (on-premises deployment)
  • โ˜๏ธ Compatible with Amazon S3 (SaaS / cloud / managed)
  • ๐Ÿ”ง Settings view for configuring the connection details / credentials of the storage system (endpoint, port, TLS, etc.)
  • ๐Ÿ“‹ Upload profiles which are attached to log files during upload as metadata
  • ๐Ÿค– Auto upload on creation of a trigger file
  • ๐Ÿ’ป Runs on Windows, OS X, and Linux
  • ๐ŸŒˆ Customizable accent color

Installation

Download the latest release from the release page. We provide builds for Windows (exe & msi), OS X (pkg), and Linux (deb, tar.gz).

If you want to try out this application but don't have access to an Amazon S3 bucket or a MinIO server, you can use these publicly available credentials which let you connect to the official MinIO demo server:

Configuration key Configuration value
Endpoint play.minio.io
Port 443
Region us-east-1
Bucket unknown (the list of available buckets changes every 24 hours, please login at http://play.minio.io/minio/)
Access key Q3AM3UQ867SPQQA43P2F
Secret key zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
TLS enabled

Color Palette & Mock-ups

The directory mockups/ contains mock-ups and the color palette used for this application. The design of this application was inspired by Valery Pevnev (Podcast Dashboard) and Kirill Kalita (Desktop app - Settings).

Development

For getting started with Flutter, view the online documentation which offers tutorials, samples, guidance on mobile development, and a full API reference.

Setup your development environment

There are several tutorials in the internet which explain how to setup Flutter for building desktop applications:

The following two sections provide simplified installation instructions:

Flutter

Prerequisites: Git, Visual Studio Code, Flutter (dev channel)

flutter channel dev
flutter upgrade

# Follow all instructions provided by Flutter Doctor (no need to install Android Studio though)
flutter doctor

flutter config --enable-windows-desktop # on Windows
flutter config --enable-macos-desktop   # on macOS
flutter config --enable-linux-desktop   # on Linux

git clone https://github.com/emotionrennteam/log-storage-client.git
cd log-storage-client/

flutter run

โš ๏ธ When using flutter run or when starting this application from Visual Studio Code, you won't be able to use the file picker integration. In order to test this functionality or work on it, you will have to install Go and hover and execute the application from the command line with hover run. The following paragraph describes how to install Go and hover.

Go and hover

Desktop support in Flutter is still in technical preview / alpha. Therefore, some features are not available or don't work out of the box. The project go-flutter brings support for special features such as file pickers on Linux, MacOS, and Windows.

โš ๏ธ The tool hover is used as the build tool for this application. You will need to install Go and hover to compile this app and to be able to use all features. In specific, this application makes use of the Dart package file_picker which requires Go and hover. Please follow these installation instructions (install Go and hover). Short summary:

  1. Install Go and add the directory which contains the Go binary to your PATH environment variable. Also make sure to add the directory $GOPATH/bin to your PATH variable, too:

    export PATH=$PATH:/usr/local/go/bin
    export PATH=$PATH:$(go env GOPATH)/bin
  2. The build tool hover requires the installation of GCC:

    • Windows: please install Cygwin to use GCC on Windows. The gcc version of Cygwin somehow didn't work with hover. Instead, I had to use tdm-gcc as denoted here on StackOverflow.

    • Linux (requires some additional packages on top of GCC):

      sudo apt install gcc xorg-dev
  3. Install hover (Go will install hover to $GOPATH/bin/hover):

    GO111MODULE=on go get -u -a github.com/go-flutter-desktop/hover
  4. Run hover in Cygwin (on Windows) or in your favorite shell (on Linux):

    cd git clone https://github.com/emotionrennteam/log-storage-client.git
    cd log-storage-client/
    
    hover run

Debugging

  1. You can run this application either from Visual Studio Code or from the command line:

    1. From within Visual Studio Code:

      1. Open Visual Studio Code
      2. Open any *.dart file
      3. Hit F5 to run and debug the app
    2. From the command line:

      hover run
  2. Start a local MinIO server (=on-premises S3 storage system):

    • Windows:

      1. Download MinIO Server from https://min.io/download#/windows.

      2. Start the Minio server:

        mkdir data
        
        ./minio.exe server data/
    • Linux:

      wget https://dl.min.io/server/minio/release/linux-amd64/minio
      
      chmod +x minio
      
      mkdir data
      MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_REGION_NAME=de-south-1-aalen ./minio server ./data/
    • Docker:

      docker run \
          -p 9000:9000 \
          -e MINIO_ACCESS_KEY=minioadmin \
          -e MINIO_SECRET_KEY=minioadmin \
          -e MINIO_REGION_NAME=de-south-1-aalen \
          -v /tmp/data:/data minio/minio \
          server /data
  3. Configure the Log Storage Client so that it can connect to the MinIO server.

  4. Hint: after starting the MinIO server, you can access the web UI of MinIO on http://127.0.0.1:9000. The default credentials are:

    • User: minioadmin
    • Password: minioadmin

Building a release

For building a release of this app, Docker, Go, and hover must be installed.

# Linux executable
hover build linux --docker
# Linux deb
hover build linux-deb --docker

# OS X pkg
hover build darwin-pkg --docker

# Windows exe
hover build windows --docker
# Windows MSI
hover build windows-msi --docker

The resulting binaries are located in go/build/outputs/. You can also build without the option --docker. In this case, you can only build the app for your current OS only but you won't need Docker.

FAQ

Where does this application store its configuration?

The configuration of this application (connection details to S3 storage, etc.) is stored in a file named shared_preferences.json. Depending on your OS, this configuration file might be stored in one of the following locations:

  • Linux:
    • ~/.local/share/log_storage_client/shared_preferences.json
  • Windows:
    • C:\Users\$USER\AppData\Roaming\log_storage_client\shared_preferences.json
    • C:\Users\$USER\AppData\Roaming\de.aalen.university.emotion.logstorageclient\emotion\shared_preferences.json
  • OS X: ?

log-storage-client's People

Contributors

emotionrennteam avatar philenius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.