Giter VIP home page Giter VIP logo

rev-service's People

Contributors

daftfox avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

garronej

rev-service's Issues

Configure Board pins

Instances of Board class should allow the pins to be configured during constructing or after. This would allow the boards that don't have a specific class instance (like Major Tom) to be more flexible.

Implement ProgramService to run consecutive actions

The service contains an executeProgram method allowing consecutive actions to be executed on a board. Such a program would consist of an array of Command class instances with the following structure:

{ action: "BLINKOFF", duration: 3000, parameter: <optional> }

action should correspond with any of the available actions in an instance of the Board class, or any of the extending classes.
duration is the delay (in ms) after which the next command is executed. Therefore being the duration for which a command is valid.
parameter is optional and only required for actions that require a parameter to execute.

The executeProgram method should consume an instance of Board and an array of Command instances.

mime types enum

private static ALLOWED_FILETYPES = { // todo: filter out unwanted filetypes?

Can also structure your domain model a bit better if you include models and their allotted mime-types in a different file. Following the single responsibility principle. The http service should just make the request. You would have another entity which just checks allotted mime-types. In the end it makes everything easier to test and also removes added complexity in a specific class.

Fix broken SerialService

After refactoring a few times and neglecting to update the SerialService, it needs to be fixed.

Persist programs through DatabaseService

A user should be able to create, update and remove programs. For this, I wish to implement the corresponding methods in the ProgramService and a DatabaseService that is able to interface with (at least) an sqlite database. Use Sequelize to create an ORM.

Remove EtherPort dependency

Swap the EtherPort dependency in favor of a custom integration that allows for multiplexing. This would greatly decrease the complexity of the EthernetService and remove the need for an extra dependency.

Create a demo folder

The database is now included inside of the code repo. Would be best to make a demo folder and include a instance there for reviewing purposes. A simple hello world would be fine. Then include Rev as a node_module (external dep)

This way you can keep the core clean.

Allow execution of programs through WebSocket messages

The user should be able to execute programs on a board using the WebSocket interface. The user should be able to choose one from a list of programs that are shared with the user as soon as a WebSocket connection is made.

Shorten

const databaseOptions = {

object lookups are fast, but considering you do not have a blazing fast device (IoT) would be best to shorten the lookup by saving the object into a reference

const blabla = this.options
or
const {prop, prop2, prop3} = this.options

Expose pins and their properties in IBoard interface

Clients connected through the WebSocket interface (and any other) should be able to see the current state of device pins. Update these values and share with connected clients as soon as anything is changed.

exclude public output

Any artifact created from develop should be predictable and not include state. This is why it's beneficial to have anything generated in the public folder (including the folder itself) to be in the build step.

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.