This simple full-stack project consists of three parts: Springboot app (backend_app), Web React.js app (web_app), and a multiplatform library for image validation.
AWS Kotlin SDK to save images in the S3 Kotlin DL to check if an uploaded image contains a human face Kotlin multiplatform to make a library that one can use both on a JS and JVM project
Do not forget to load Gradle projects (backend_app and image_validation_lib) in IDEA after cloning this repository!
- Build multiplatform library
- For JVM: run
publishJvmPubllicationToMavenLocal
Gradle task inpublishing
As a result, the JVM library will be published in your local Maven repository. - For JS: run
packJsNpmPublication
Gradle task inbuild
. As a result, the JS library will be created inbuild/publications/npm/image_validation_lib-0.0.1.tgz
. You will need it in the Front build phase.
- Build and run the backend application
- You will need S3 credentials in place: https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html#get-started-setup
- You will need to initialize the following environment variables (AWS prefix is used because initially, the project used PostgreSQL on AWS, but you can use a local one):
AWS_DB_HOST
AWS_DB_PORT
AWS_DB_USERNAME
AWS_DB_PASSWORD
- Run
./gradlew bootRun
in a terminal in the backend_app project folder
- Build and run the web application
- Copy the contents of the
image_validation_lib-0.0.1.tgz
to thevalidator
folder of theweb_app
module - In the terminal in the
web_app
folder, runnpm install.
- run
npm install validator
. - run
npm start