Coder Social home page Coder Social logo

freedomotic / fd-vue-webapp Goto Github PK

View Code? Open in Web Editor NEW
65.0 7.0 65.0 7.83 MB

A Vue.js web application for Freedomotic Open IoT framework

Home Page: http://fd-vue-webapp.herokuapp.com/

License: GNU Affero General Public License v3.0

JavaScript 19.04% HTML 0.40% Vue 80.42% Sass 0.14%
javascript vuejs iot webapp vuex axios vue-router iot-platform opensource open-source

fd-vue-webapp's Introduction

fd-vue-webapp

A Vue.js client for Freedomotic framework.


Build Status Code Triagers Badge

Scope of the project

This repository contains the implementation of a front end client for Freedomotic. The aim of this project is to reproduce all features already integrated in our Java frontend, that's available here.

To have a broad idea about its features you can have a look at our YouTube channel.

Screenshoot

Dashboard Page

Dashboard page Dashboard page with environment menu open

Things Panel

Things Panel

Plugins Panel

Plugins Panel

Automations Panel

Automations Panel

Mobile

Mobile home page Mobile things page Mobile plugins page Mobile automations page

Pre-requirements

In order to execute this fd-vue-webapp client locally, first you need to download and launch an instance of Freedomotic on your machine. Freedomotic is a framework built in Java, so the only pre-requirement to make it running is to have a Jre8 installation on your machine.

Download and launch the latest build of the framework

You can download the latest available daily build available here

The zipped version of this daily build contains a jar file, named freedomotic.jar that you can run by executing the following command:

java -jar freedomotic.jar

Freedomotic RESTful endpoints

Once launched, a local setup of Freedomotic RESTful APIs will be available at localhost:9111.

Freedomotic Polymer client, an inspiration

Some time ago we developed a first client prototype using Polymer (here it is a brief video showing its features). Polymer client source code is hosted here on GitHub: maybe you can look at it to have some inspiration.

WARNING: At the moment that project is deprecated.

Technical notes

This project uses Vue.js and Quasar framework.

How to launch it

Clone or fork this repository, then follows the following set of commands:

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run serve

# create a production build
npm run build

Contributing

If you like to contribute to this project, please follow our guidelines, available here.

Partners

This project is supported by:

fd-vue-webapp's People

Contributors

atgg avatar berksaribas avatar bestmazzo avatar bryanjhv avatar dennybiasiolli avatar jeff-duke avatar jooaodanieel avatar jtommy avatar leobia avatar m1aw avatar martijndeb avatar mcicolella avatar mclovinn avatar michelvosje avatar nowackipatryk avatar p3trur0 avatar rafmjr avatar shiifu avatar tarotato avatar tubacase avatar ubaldop avatar wellart avatar williamparry avatar xp0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fd-vue-webapp's Issues

Reorganize Vuex with modules

Now we have a single file for actions, a single file for mutations etc. We could create different modules to collect all actions related to triggers or commands or plugins etc.
The same for mutations and application state.

Introduce a static background for the client

At the moment, the background of each screen of the client is randomly selected from a set of Flickr URL.

We'd like to get rid of this behavior by introducing a single static asset, namely a background.png. Since the color of Freedomotic logo is a green one, we'd like to have an image containing either #8bae2d or #75c200.

Some problems with i18n inside attributes

When you try to add an i18n string inside an attribute an exception is raised.
For example in Dashboard component
tooltip="{{$t('user_account')}}": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id="{{ val }}">, use <div :id="val">

Populate Environment component with things

Every Environment component should be populated with a list of related things.
For developing purpose it's possible to retrieve the list of things from

environmentThings,
.
Every element in the list has x,y coordinates for position and a reference to the right icon to show (based on the current representation).
We need to add an 'edit mode' to enable drag and drop.
Right click on each of them calls Things Editor component to manage them.
Mouse over an icon shows its details.
#41

Introducing Trello board for organizing project implementation

What do you think to organize a Trello board to define priorities for all the issues opened so far?
Indeed, at the moment, the opened issues are definitely ok, but maybe we need to prioritize them a little in order to have a cleaner approach to development itself.

Environment component

This component is intended to show a map with all the things in the environment.
Some features:

  • drag and drop things
  • show things' properties
  • add new environments
  • delete existent environments
  • change environments' properties (name, rooms)

environment

Add AddButton component

This type of component could be useful for each panels requiring an 'add' function.
E.g. add a new automation, add a new thing, add a new plugin...

It could be similar to CloseButton but located at right bottom corner and having a property "function to call". This way you can reuse it in different component.

Add PanelToolbar component

Now every "Panel" component has a duplicated code for the toolbar as

<md-toolbar class="md-accent">
          <md-content class="small-icon" @click="openSettings">
            <md-icon>undo</md-icon>
          </md-content>
          <md-content class="small-icon" @click="closeWindow">
            <md-icon>clear</md-icon>
          </md-content> 
          <h3 class="md-title">{{$t('automations').toUpperCase()}}</h3>
</md-toolbar>

We'd consider to extract this code and create a reusable component "PanelToolbar" with a property "title" and maybe another "background-color" for customization.

Slider component

We need a slider component to manage some behaviors as lights' dimming but it's missing in Vue Material.
It's on the way as reported here but there isn't a deadline.
Maybe we should adopt a temporarly (or not) alternative solution. Any idea?

ThingsPanel component

Things Panel component shows a list of things based on the current selected environment.

Create a connector for RESTful API

Our framework exposes a RESTful API (see code https://github.com/freedomotic/freedomotic/tree/master/plugins/devices/restapi-v3).
To try it start Freedomotic and point your browser to http://localhost:9111 (API documented by Swagger).

restful

We want to connect this Vue.js client to the RESTful service.

In the case consider a possible reuse of code written for another client in Polymer:
https://github.com/freedomotic/fd-polymer-api-settings
https://github.com/freedomotic/fd-polymer-webapp
https://github.com/freedomotic/fd-polymer-rest-service

Bad color rendering in production

I tried to update our webserver plugin with the new Vue client but the rendering of colors is wrong.
In attachment a sample image. The same for Chrome and Firefox.

build

Advanced Mode option

This option could be useful to enable/disable advanced features.
It should be added to the System component.

System component

Currently Polymer client shows only a button to shutdown the system.
We should define which controls to add to this component.

system

system2

AutomationPanel component

This component is intended to manage Freedomotic automations (aka reactions).
We'd think about the best UX.

Note: no component is currently implemented in Polymer client.

automations

Markerplace component

It is used to represent the plugins' marketplace.
It shows a list of categories and for each of them a list of available plugin.

We can start from related Polymer component.

Here a screenshot from Jfrontend
marketplace

Thing component

IMHO current Polymer implementation requires some improvements

  • sensors don't show values directly but only their icon as shown in the attached image
  • things' behaviors are not shown
  • it's possible to create a new thing only by duplicating an existing one (after pressing '+' button that enables 'copy' feature) so you can't select a template not already present on the map

things-list

Looking for web developers to create a Vue.js application

We'd like to create a webapp for our domotic framework.

The aim is to reproduce all features integrated int our Java frontend https://github.com/freedomotic/freedomotic/tree/master/plugins/devices/frontend-java
To have an idea you can look at our YouTube channel https://www.youtube.com/freedomotic

Time ago we developed a first prototype in Polymer.You can try it by downloading Freedomotic and pointing your browser to http://localhost:8090. A brief video is available on https://www.youtube.com/watch?v=0pN-8mbNuQk
And the source code is hosted on https://github.com/freedomotic/fd-polymer-webapp

Maybe some components can be reused in Vue.js.

The interaction with our framework is based on a RESTful API https://github.com/freedomotic/freedomotic/tree/master/plugins/devices/restapi-v3/src/main/java/com/freedomotic/plugins/devices/restapiv3

Demo available at try http://104.236.92.231:8090/ (credentials admin/admin)
We are defining the webapp structure and the tasks to execute.
If you want to contribute please comment.

Manage websockets

We need to manage some websockets to receive updates about plugins or things state or messages from the framework.

We could create a component for this based on vue-websocket or other solutions.

Here the Polymer component developed for that.

Prepare webpack scaffolding

In order to setup a proper environment for this project it could be useful to define a clean scaffolding containing the structure of the source code to start to work on.

It is adviced to use Webpack 2.x.

The Javascript framework of use is Vue.js.

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.