*** Backup Mirror *** The web interface and JSON api for the ConnectedHumber Air Quality Monitoring Project. https://github.com/ConnectedHumber/Air-Quality-Web
Find a file
2019-01-17 14:51:19 +00:00
.github Add PR template & licence/contributing sections to README 2019-01-17 14:38:13 +00:00
client_src Add title to page 2019-01-17 14:13:22 +00:00
design Add application structure diagram. I might blog about it actually. 2019-01-15 23:52:37 +00:00
lantern-build-engine@da5cd7d7b0 Add some dependencies and set some things up. 2019-01-12 23:21:38 +00:00
lib/SBRL Fix measurement data query, but it's not quite right yet 2019-01-15 17:02:24 +00:00
logic Add cache-control header sending in production mode 2019-01-17 14:51:19 +00:00
.gitignore Get the development server to serve the correct directory 2019-01-14 20:06:30 +00:00
.gitmodules Add some dependencies and set some things up. 2019-01-12 23:21:38 +00:00
api.php Formatting 2019-01-15 19:26:14 +00:00
build Build css with rollup too! 2019-01-17 12:48:09 +00:00
composer.json Add untracked files 2019-01-12 23:23:55 +00:00
composer.lock Add untracked files 2019-01-12 23:23:55 +00:00
di_config.php Add production optimisations 2019-01-15 19:19:17 +00:00
LICENSE Initial commit 2019-01-12 23:22:42 +00:00
package-lock.json Add leaflet-fullscreen 2019-01-17 14:07:31 +00:00
package.json Add leaflet-fullscreen 2019-01-17 14:07:31 +00:00
README.md README: Fix heading 2019-01-17 14:38:32 +00:00
rollup.config.js Get a basic map displaying. 2019-01-17 13:56:25 +00:00
settings.default.toml Add cache-control header sending in production mode 2019-01-17 14:51:19 +00:00

ConnectedHumber-Air-Quality-Interface

The web interface and JSON api for the ConnectedHumber Air Quality Monitoring Project.

This project contains the web interface for the ConnectedHumber air Quality Monitoring system. It is composed of 2 parts:

  • A PHP-based JSON API server (entry point: api.php)
  • A Javascript client application that runs in the browser

The client-side browser application is powered by Leaflet.

System Requirements

In order to run this program, you'll need the following:

  • Git
  • Bash (if on Windows, try Git Bash) - the build script is written in Bash
  • composer - For the server-side packages
  • Node.JS
  • npm - comes with Node.JS - used for building the client-side code

Getting Started

The client-side code requires building. Currently, no pre-built versions are available (though these can be provided upon request), so this must be done from source. A build script is available, however, which automates the process - as explained below.

Building From Source

The build script ensures that everything it does will not go outside the current directory (i.e. all dependencies are installed locally).

To build from source, start off by running the setup and setup-dev build commands like this:

./build setup setup-dev

This will initialise any git submodules and install both the server-side and client-side dependencies. Once done, all you need to do is build the client-side code:

./build client

For development purposes, the client-watch command is available.

Configuration

Some configuration must be done before the application is ready for use. The first time api.php is called from a browser, it will create a new blank configuration file at data/settings.toml, if it doesn't already exist. See the settings.default.toml file in this repository for a list of configurable settings, but do not edit settings.default.toml! Instead, enter your configuration details into data/settings.toml, which overrides settings.default.toml. In particular, you'll probably want to change the settings under the [database] header - but ensure you give the entire file a careful read.

Notes

  • Readings are taken every 6 minutes as standard.

Contributing

Contributions are welcome - feel free to open an issue or (even better) a pull request.

The issue tracker is the place where all the tasks relating to the project are kept.

License

This project is licensed under the Mozilla Public License 2.0. The full text of this license can be found in the LICENSE file of this repository, along with a helpful summary of what you can and can't do provided by GitHub.