A simple project, Based on default settings of my previous project springboot-multimodule-kotlin, that demonstrating my programming skills.
In this project. I especially focused on showcasing:
-
Spring boot as RESTful API backend,
-
Test-driven-development practice,
-
Integration of Flutter as web frontend into Spring boot.
-
OpenJDK 13 or above.
-
Flutter SDK is also required for build process.
-
(Optional, Recommended) IntelliJ IDEA Ultimate for debugging.
Tested and built under This 3 major operating systems in 2020: Windows, MacOS and Linux.
Due to inadequate support of Gradle and Kotlin plugin, unfortunately this project is cannot be run under in Eclipse IDE. I’m still trying to find a workaround for this.
-
Build tools:
-
Languages:
-
Java 13 - platform runtime
-
Kotlin 1.4 - backend unit test
-
Groovy 2.5 - backend integration test
-
Dart 2.10 - web frontend
-
-
Frameworks and runtimes:
-
Code quality:
-
Spock framework with Groovy
-
Spring RESTDocs with Asciidoctor - Automatic documentation
Ensure that both Java SDK and Flutter SDK commands are directly accessible
via PATH
, before build process.
./gradlew clean assemble [-PbuildConfig={local|release}]
-
buildConfig
will be defaulted aslocal
if the option is omitted. -
Standalone executable JAR file will be created in
app-main/build/outputs
directory afterassemble
task is finished.
You must place an application.yml
file before running this application in project root or execution context root.
In order to help a quick start, there is application.yml.sample
file is in root directory. Just copy that file and
change name to application.yml
, and you’re all set to go.
Run server after build by following:
java -jar app-main/build/libs/app-main-1.0.jar
and access to localhost with port number specified in your own application.yml
file.
This project is written under TDD practice, thus there are many test cases to prove logical integrity. As we know, integration tests are tests but running them takes long time rather than unit tests. Therefore, those two tests are separated in this project, and you can run both of them by following:
./gradlew test integrationTest jacocoTestReport
to run all tests and coverage reports in each build/reports
directory.
There is a good article about testing - read Google Testing Blog post for more details.
This project uses detekt as a static analyser.
Gradle detekt
task will perform a static analysis by following:
./gradlew detekt
For your own configuration, read the official document and modify gradle/scripts/detekt.gradle file.
There are translations in several languages. You can read this document in español(castellano), 한국어, and 日本語.