Git Product home page Git Product logo

aguamenti-backend's Introduction

Aguamenti-backend


Logo

Aguamenti Backend

Backend framework to support the IoT implementation of an Automated Home Water Management System
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

To do

(back to top)

Built With

(back to top)

Getting Started

  • Setting up node-js: Download and Install the latest node-js from their website

    npm i # installs all the packages from package.json
    
  • Running the server

    npm run dev # starts the ts server in development environment with auto restart on code update
    
    npm build # compiles ts server code to js server
    npm start # starts the js server in production environment
    

(back to top)

Features

  • Express HTTP REST API for authentication and configuration
  • Socket IO 4.x server for device side updates
  • Token verification middlewares for both REST and Socket services, ensuring a secure IoT channel
  • Mongoose ODM for accessing Mongo DB - a popular and secure NoSQL database

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

License

Distributed for fair usage under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Repo Owner - Anindya Mitra

Project Link: https://github.com/anindyamitra15/Aguamenti-backend

(back to top)

Acknowledgments

to do

(back to top)

aguamenti-backend's People

Contributors

anindyamitra15 avatar anubhav666 avatar randomdelta6 avatar

Watchers

 avatar

aguamenti-backend's Issues

Schedule functionality

scope of this issue involves:

  • the routes related to schedule
  • the controller and the input received by the endpoints
  • the services to implement and send the schedule logic to db and the particular device(s)

Adding few variables to the model

interface DeviceInterface extends Document {



Add the following to this interface and the model:

    online: boolean,
    schedules: [Schedule]

Following are the necessary interfaces:

export interface Schedule{
    schedule_type: ScheduleType,
    trigger_type: TriggerType,
    repeat_on: [WeekDay],
    end_at: Date    //js built-in date class
}; 

Following are the necessary types:

export type ScheduleType = "on" | "off" | "dim" | "and" | "or";
export type TriggerType = "timing" | "device";
export type WeekDay = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"; // note: I am sure there are alternative to this in-built.

Notes:

  • only device with a valid linked_chip_id can be used as the external trigger device
  • there is controlling device (usually an input device, with a valid linked_chip_id) and there is controlled device (usually an output device)

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.