GithubHelp home page GithubHelp logo

esron / systranca-server Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 10.0 2.47 MB

RESTful API server for a home automation controller server built in Express

License: MIT License

JavaScript 99.38% HTML 0.26% CSS 0.16% Dockerfile 0.19%
internet-of-things home-security expressjs express-validator hacktoberfest

systranca-server's Introduction

SysTranca Server Project

JavaScript Style Guide Build Status CodeQL

This project was born when I came too early at my work building. We are a small startup on Vale do São Francisco, Brazil.

The objective of this project is provide an API with authentication and authorization for users to login into a home automation server that can, for now, open a electronic lock.

Instructions

This project uses MongoDB as database through the Mongoose library.

Install the dependencies:

npm install

Copy the .env.example file to .env:

cp .env.example .env

Update the variables to correspond your environment.

Generate the RSA keys:

npm run key:generate

or

node keys.js

Docker SetUp

You will also need a MongoDb instance and a MQTT broker.

This project comes with a docker-compose.ym file to help you deploy that locally, just:

docker-compose up

If you see this error when to execute node container:

Internal watch failed: ENOSPC: System limit for number of file watchers reached, watch '/home/node/app/README.md'

execute this to fix it:

sudo sysctl fs.inotify.max_user_watches=582222 && sudo sysctl -p

Create the super user

docker-compose exec app node initDatabase.js

This project doesn't have a front-end, yet.

systranca-server's People

Contributors

dependabot[bot] avatar esron avatar franciscoemanuel avatar geidsonc avatar jhidalgoesp avatar viniciusarre avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

systranca-server's Issues

Implement Tests

The controllers are getting bigger, that are already a lot of routes. It's time to invest in some TDD.

I like Jest, but everybody is free to suggest the test framework they like the most.

WIP: Administration panel

An simple listing of the users and their phones.

An action button for blocking and unblocking a user.

Pin code validation

A request to activate a device, such as opening a door, should receive the user pin code as a form of security manner. If the request pin code does not match the user pin code the response should be a 403 HTTP response.

Update the docs

Add,

docker-compose up

and

docker-compose exec  node node initDatabase.js 

instead of node initDatabase.js

And port will be opened on localhost:3000 if all okay.

The localization configuration is not in accord with the layout

There is a select in the top right of the app main screen where you can select the idiom of the application.

There is already the portuguese and the english localization file.

The idioms that are not translated yet should not appear in the select.

The label of the select should be more informative.

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.