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 Framework 5 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
You can see a variant of this project software design in this functional-bean-registration branch:
- Functional bean registration
- Pure Spring Framework project (without Spring Boot)
- No CGLIB proxy
- No kotlin-spring plugin needed
- Language: Kotlin
- Web framework: Spring Boot and Spring Web Reactive 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
- Use
::findAll
instead ofthis@BlogController::findAll
when KT-15667 will be fixed - Use Kotlin Javascript when generated JS size will be optimized or compile to WebAssembly if supported
- Update to Gradle Kotlin Script 0.9.0 to avoid freezing IDEA when modifying
build.gradle.kts
- Install Git
- Fork and clone the project
- Install Java 8
- Install Gulp for development mode
- Depending on your platform, you may have to install libpng (On mac with
brew install libpng
for example)
- Run
./gradlew bootRun
in another terminal - Run
gulp 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
2016.3.6
or2017.1.x
and IDEA Kotlin plugin1.1.1+
(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 and make sure to uncheck "Create Module for each SourceSet" to avoid a nasty bug that prevent to run the app in IDEA
- In IntelliJ IDEA, right click on
Application.kt
thenRun ...
orDebug ...
- Run
gulp 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
./gradlew clean build
cf push
curl https://mixitconf.org/api/blog | python -m json.tool > blog.json
curl https://mixitconf.org/api/event | python -m json.tool > events.json
curl https://mixitconf.org/api/user | python -m json.tool > users.json
curl https://mixitconf.org/api/2017/talk | python -m json.tool > talks_2017.json
commit -a -m "Update data from PROD"