{"id":22083199,"url":"https://github.com/refactor-group/ambi","last_synced_at":"2026-05-03T05:31:40.167Z","repository":{"id":41895539,"uuid":"448737685","full_name":"refactor-group/ambi","owner":"refactor-group","description":"An Elixir-based IoT ambient room sensor web service (backend + frontend).","archived":false,"fork":false,"pushed_at":"2022-12-20T20:13:03.000Z","size":436,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T04:44:02.270Z","etag":null,"topics":["elixir","elixir-lang","iot-platform","javascript","phoenix","phoenix-framework","phoenix-liveview"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refactor-group.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-17T03:07:06.000Z","updated_at":"2022-06-19T01:35:27.000Z","dependencies_parsed_at":"2023-01-30T01:45:55.336Z","dependency_job_id":null,"html_url":"https://github.com/refactor-group/ambi","commit_stats":null,"previous_names":["refactor-group/ambi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactor-group%2Fambi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactor-group%2Fambi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactor-group%2Fambi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactor-group%2Fambi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refactor-group","download_url":"https://codeload.github.com/refactor-group/ambi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245170390,"owners_count":20572060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","elixir-lang","iot-platform","javascript","phoenix","phoenix-framework","phoenix-liveview"],"created_at":"2024-12-01T00:11:22.528Z","updated_at":"2026-05-03T05:31:35.148Z","avatar_url":"https://github.com/refactor-group.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ambi\n\nAmbi is an Elixir-based web service that presents a Phoenix LiveView frontend to display real time ambient room conditions\nlike temperature, humidity, pressure, air quality, dust concentration, etc. It uses the Bulma CSS framework\nfor some attractive base UI components and Phoenix LiveView to push updates to the client with no page\nrefresh needed.\n\nWhat Ambi's web-based UI looks like as of April, 2022\n\n\u003cimg width=\"1482\" alt=\"Screen Shot 2022-04-23 at 19 23 51\" src=\"https://user-images.githubusercontent.com/3219120/164950502-6e58e0ed-5f58-4018-ae67-908960bb94a3.png\"\u003e\n\n## Set Up Git Hooks\n\nThe Ambi repository makes use of several Git hooks to ensure that code quality standards are met and consistent. To automatically configure these hooks for your local workspace, you can run the following:\n```bash\n./scripts/create-git-hooks\n```\n\nThis will create symlinks to the Git hooks, preserving any hooks that you may have already configured.\n\n## Install Postgresql\n\nFor macOS the [Postgreql.app](https://postgresapp.com/) is the easiest and best option for your local development machine. Version 12\nis the most tested version of the DB at the time of writing.\n\nFor Linux, use the system package manager to install Postgresql@14\n\nKeep the local db instance running on port 5432 and make sure to set up a postgres user/password:\n\n`$ sudo -u postgres psql -c \"ALTER USER postgres PASSWORD 'postgres';\"`\n\nTo allow Ambi to access your Postgresql cluster via localhost, make sure your `/etc/postgresql/14/main/pg_hba.conf` looks like the following:\n\n```\n# Database administrative login by Unix domain socket\nlocal   all             postgres                                peer\n\n# TYPE  DATABASE        USER            ADDRESS                 METHOD\n\n# \"local\" is for Unix domain socket connections only\nlocal   all             all                                     peer\nhost    all             postgres        localhost               trust\n# IPv4 local connections:\nhost    all             all             127.0.0.1/32            scram-sha-256\n# IPv6 local connections:\nhost    all             all             ::1/128                 scram-sha-256\n# Allow replication connections from localhost, by a user with the\n# replication privilege.\nlocal   replication     all                                     peer\nhost    replication     all             127.0.0.1/32            scram-sha-256\nhost    replication     all             ::1/128                 scram-sha-256\n```\n\n## Install Node\n\nMake sure to install [Node.js](https://nodejs.org/en/download/package-manager/), version 14 is the most tested version at the time of writing.\nIf you have multiple versions of Node installed, make sure that version 14 is run when running `node -v` from a command line.\n\nFor example, at the time of writing, for Ubuntu 22.04:\n```\n$ node -v\nv14.19.1\n```\n\n## Starting the Ambi backend (Elixir)\n\nTo start your Phoenix server:\n\n  * Install dependencies with `mix deps.get`\n  * Create and migrate your database with `mix ecto.setup`\n  * Install Node.js dependencies with `npm install` inside the `assets` directory\n  * Start Phoenix endpoint with `mix phx.server`\n\nNow you can visit [`localhost:4000`](http://localhost:4000) from your browser.\n\n## Running as a systemd service on Linux (Ubuntu)\n\nTo automatically run your Ambi backend as a service that starts up when your Linux system boots, create the file `/etc/systemd/system/ambi.service`:\n\n```\n[Unit]\nDescription=Ambi Backend\nAfter=display-manager.service\nStartLimitIntervalSec=0\n\n[Service]\nType=simple\nRestart=on-failure\nRestartSec=5\nUser=jhodapp\nWorkingDirectory=/home/\u003cuser\u003e/Projects/ambi\nExecStart=/usr/bin/mix phx.server\n\n[Install]\nWantedBy=multi-user.target\n```\n\nNote: replace `\u003cuser\u003e` with your username that you've cloned the Ambi repo as\n\nNext, enable your new service to start on bootup: `sudo systemctl enable ambi`\nFinally, start your new service: `sudo systemctl start ambi`\n\nNote: if it does not start for you, check to make sure you have a valid service to start after (i.e. `After=display-manager.service`. Check in `/etc/systemd/system/` for available services that your system has.\n\n## Running in a Docker container\n\nTo run ambi in a Docker container along with another one for Postgresql 11:\n\n * Build the web/DB containers: `docker-compose build`\n * Create the DB in the DB container: `docker-compose run web mix ecto.create`\n * Run the Ecto DB migrations inside the web container: `docker-compose run web mix ecto.migrate`\n * Run the application in the container: `docker-compose up`\n\n Note: this basic Docker setup was done following this [guide](https://dev.to/hlappa/development-environment-for-elixir-phoenix-with-docker-and-docker-compose-2g17)\n\nReady to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).\n\n## Learn more\n\n  * Official website: https://www.phoenixframework.org/\n  * Guides: https://hexdocs.pm/phoenix/overview.html\n  * Docs: https://hexdocs.pm/phoenix\n  * Forum: https://elixirforum.com/c/phoenix-forum\n  * Source: https://github.com/phoenixframework/phoenix\n\n## License\n\nThis project is licensed under the [BSD + Patent license](https://opensource.org/licenses/BSDplusPatent).\n\nAny submissions to this project (e.g. as Pull Requests) must be made available under these terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefactor-group%2Fambi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefactor-group%2Fambi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefactor-group%2Fambi/lists"}