Small project to experiment and learn Kotlin and other libraries.
There is also a CRUD with MongoDB: https://github.com/FernandoAlvarez28/kotlin-crud-mongodb
- Java 17 and a Kotlin/Gradle capable IDE.
- Or Docker and docker-compose.
- Java 17.
- Dockerfile and GitHub Actions to publish amd64 and arm64 images on Docker Hub and Amazon Elastic Container Registry/Service (ECR and ECS).
- Basic REST API endpoints with Kotlin, Spring Boot 3.1.1 and Spring WebFlux.
- Check/Import the Postman collection + environment.
- PostgreSQL database via Docker with Flyway migration.
- Connection informations here.
- Spring Data R2DBC (reactive driver for relational databases, similar to JPA).
- Spring Security with JWT and Spring WebFlux.
- Based on soasada's guide.
- Fake "Users API" with Mockoon via Docker.
- Load test with K6 via Docker.
- Clone this repository.
- Import this project on your Kotlin capable IDE, like IntelliJ.
- Run the dockerized Postgres database (or you can use your own Postgres instance).
- Run the dockerized Mockoon.
- Run KotlincrudApplication.kt.
- Access the endpoints exposed at http://localhost:8080.
- Use the available Postman collection + environment.
- Use the login endpoint to generate a JWT token; it will be save on your active environment and used by the other endpoints.
- Clone this repository.
- Build the Dockerfile and run the Docker image with its dependencies using one of the methods:
- Makefile:
$ make
- Docker compose:
./docker$ docker-compose up --build kotlincrud-postgres
- More details at docker/README.md#kotlincrud-postgres.
- Makefile:
- Run KotlincrudApplication.kt.
- Access the endpoints exposed at http://localhost:8080.
- Use the available Postman collection + environment.
- Use the login endpoint to generate a JWT token; it will be save on your active environment and used by the other endpoints.