Skip to content

jhodapp/ambi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An IoT ambient room sensor web service platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published