This project purpose is to power the MiXiT website.
This project software design goal is to demonstrate what a functional web application developed with Spring Boot 2, Spring WebFlux and Kotlin can look like:
- Reactive and non-blocking
- More functional style and less annotation based than typical Spring applications
- Leverage Kotlin features like Kotlin extensions and reified type parameters for cleaner code
- Simple, fast to start, efficient request processing, low memory consumption
- Constructor based injection
- Immutable Pojos
- Cloud Native
- Language: Kotlin
- Framework: Spring Boot 2.x with Spring 5 Kotlin support and Spring WebFlux functional
- Engine: Netty used for client and server
- Templates: Mustache (will be migrated later to Kotlin typesafe templates)
- Reactive API: Reactor
- Persistence : Spring Data Reactive MongoDB
- Build: Gradle Script Kotlin
- Testing: Junit 5
- Use Kotlin Javascript with dead code elimination tool
- Install Git
- Install Docker
- Fork and clone the project
- Install Java 11
We use a mongodb instance and this database is managed with a docker file
- Run
docker compose up
to start the database and the console - Open
http://0.0.0.0:8081
to open the mongodb console - At any moment you can stop and remove and restart the container if you need to reinit the database
- Run
./gradlew bootRun
in another terminal - Run
./gradlew watch
in another terminal - Open
http://localhost:8080/
in your browser - If you want to debug the app, add
--debug-jvm
parameter to Gradle command line
Sass, TypeScript, messages*.properties
and templates should be live reloaded.
- Make sure you have at least IntelliJ IDEA
2017.2.x
and IDEA Kotlin plugin1.1.4+
(menu Tools -> Kotlin -> configure Kotlin Plugin Updates -> make sure "Stable" channel is selected -> check for updates now -> restart IDE after the update) - Import it in IDEA as a Gradle project
- In IntelliJ IDEA, right click on
Application.kt
thenRun ...
orDebug ...
- Run
./gradlew watch
in another terminal - Open
http://localhost:8080/
in your browser
Sass, TypeScript, messages*.properties
and templates should be live reloaded.
./gradlew clean build
java -jar build/libs/mixit-1.0.0-SNAPSHOT.jar
When you merge a PR into
prod
branch (usually frommaster
branch) it will trigger a deployment on Clever Cloud.
curl https://mixitconf.org/api/blog | python3 -m json.tool > blog.json
curl https://mixitconf.org/api/event | python3 -m json.tool > events.json
curl https://mixitconf.org/api/event/images | python3 -m json.tool > events_image.json
curl https://mixitconf.org/api/user | python3 -m json.tool > users.json
curl https://mixitconf.org/api/2023/talk | python3 -m json.tool > talks_2023.json
git commit -a -m "Update data from PROD"