Air Quality Eye
Gather and visualize air quality data from external sources on a map for Poland (including recent sensor data from Luftdaten and other data sources)
Run and test backend
The current implementation phase has backend only.
$ mvnw install
$ mvnw spring-boot:run -pl backend
Further open the following URL in your browser to see JSON
data: http://localhost:9000/measurements
A tech stack
-
Build tool: Apache Maven,
-
Backend: Spring Boot, Lombok, JDK 13, Mapstruct,
-
Frontend: it’s not yet decided (it’s gonna be some popular and lightweight JS framework supported by GWT JsInterop or J2CL for transpiling Java to JavaScript).
Requirements
In order to use IntelliJ IDEA, please install the Lombok plugin. After this you have to ensure that “Enable annotation processing” checkbox is ticked under: Preferences → Compiler → Annotation Processors, as it is described here.
Contribution
Coding Conventions
Style Guide
The project adheres to the Google Style Guide. The rules are intended to improve the readability of code and make it consistent.
-
Checkstyle Rules configuration file that checks the Google coding conventions,
-
Additionally Findbugs and PDM rules to be found in docs/ folder,
Setting up code formatting
Please configure code style by importing Google Code Style Scheme depending on editor you use:
-
For IntelliJ please download the IntelliJ Code Style Scheme file. Then under File → Settings → Editor → Code Style and there in Scheme settings (settings icon on right side) → import schemes → Intellij IDEA code style XML, select the XML downloaded in the first step:
intellij-java-google-style.xml
.
Static Code Analysis
The SpotBugs Analyzer (formerly known as FindBugs) was installed to ensure the quality of the project.
To perform the check please run the following:
$ cd backend\
$ mvn clean compile
$ mvn com.github.spotbugs:spotbugs-maven-plugin:3.1.12.2:check
The expected result is:
[INFO] --- spotbugs-maven-plugin:3.1.12.2:check (default-cli) @ backend ---
[INFO] BugInstance size is 0
[INFO] Error size is 0
[INFO] No errors/warnings found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
Use GUI for easier warnings analysis if there any:
$ mvn com.github.spotbugs:spotbugs-maven-plugin:3.1.12.2:gui
More options described in plugin SpotBugs Maven Plugin documentation and SpotBugs Analyzer documentation.
Markdown Style Guide
- please find the remark-lint
(for Markdown syntax validation - ensuring that the project’s documentation
will be correctly rendered by all the different implementations of markdown parser).
From docs folder, please Executenpm install
and furthernpm run lint-md
to validate project’s documentation.
Integration with IntelliJ suppose to be also possible .