GithubHelp home page GithubHelp logo

jhodapp / ambi Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 477 KB

An IoT ambient room sensor web service platform.

Elixir 65.11% SCSS 2.04% CSS 12.92% JavaScript 6.35% HTML 13.19% Shell 0.07% Dockerfile 0.31%

ambi's Introduction

Ambi

Ambi is a web service that presents a Phoenix LiveView frontend to display real time ambient room conditions like temperature, humidity, pressure, air quality, dust concentration, etc. It uses the Bulma CSS framework for some attractive base UI components and Phoenix LiveView to push updates to the client with no page refresh needed.

What Ambi's web-based UI looks like as of December, 2021

Screen Shot 2021-07-06 at 10 00 20 PM

Install Postgresql

For macOS the Postgreql.app is the easiest and best option for your local development machine. Version 12 is the most tested version of the DB at the time of writing.

For Linux, use the system package manager to install Postgresql@12

Keep the local db instance running on port 5432 and make sure to set up a postgres user/password.

Install Node

Make sure to install Node.js, version 14 is the most tested version at the time of writing. If you have multiple versions of Node installed, make sure that version 14 is run when running node -v from a command line.

E.g.:

$ node -v
v14.18.2

Starting the Ambi backend (Elixir)

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with npm install inside the assets directory
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

Running in a Docker container

To run ambi in a Docker container along with another one for Postgresql 11:

  • Build the web/DB containers: docker-compose build
  • Create the DB in the DB container: docker-compose run web mix ecto.create
  • Run the Ecto DB migrations inside the web container: docker-compose run web mix ecto.migrate
  • Run the application in the container: docker-compose up

Note: this basic Docker setup was done following this guide

Ready to run in production? Please check our deployment guides.

Learn more

ambi's People

Contributors

calebbourg avatar dependabot[bot] avatar jhodapp avatar

Stargazers

 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.