Vaadin-on-Kotlin (or VoK for short) is a web-application framework that includes everything necessary to create database-backed web applications in server-side Kotlin.

This is all you need to have a button on a page which, upon clicking, creates new row in your SQL database:

button("Create") {
  onClick { Person(name = "Albert Einstein").save() }

Everything is a component

Need a button? Write button {}. Need a text field? Write textField {}.

Build own components and views by composing existing components with layouts.

Navigate to components by marking them with a @Route("path") annotation.


No JavaEE nor Spring is needed; all complex features are deliberately left out, which makes Vaadin-on-Kotlin a perfect starting point for beginning programmers: you will write only server-side Kotlin code. JavaScript and CSS are needed only if you decide to style up your application or write your own custom rich component.

Note that VoK is not just another REST library, or HTTP route mapping library. On the contrary: it is built on Vaadin which provides you with a wide palette of built-in powerful components: lazy paged tables, color pickers, menu components, sliders. All components have two parts:

  • Rich JavaScript front which runs in the browser and provides the UI with which the user interacts; and
  • The server-side part providing API you use to develop your webapps.

The components use Vaadin to handle the communication between the client-side front and server-side part; for example, the component Grid is basically a scrollable table which shows tabular data The client-side front of the Grid component fetches the tabular data from the server-side part of the Grid component. Grid configures Vaadin to pass the data properly from server-side Grid part to the client-side Grid front. To you as programmer, this process is completely transparent: you develop your webapp using the server-side component API only, in pure server-side Kotlin code; the components then handle client-server communication (see example demo; just press the “Generate test data” button at the top to get some data).

Thanks to this approach, VoK feels more like a desktop widget library (such as Swing or JavaFX) than a web page-based framework.

How to Start

vok is based on latest Vaadin.

You can follow the tutorial or read the guides.

In the side panel you will find full navigation.

Further Reading

For technical description of what Vaadin-on-Kotlin is, please feel free to read the Vaadin-on-Kotlin Github page.

Vaadin-on-Kotlin apps are typically three-tiered:

  • The browser renders HTML and JavaScript constructed by the components orchestrated by the Vaadin framework. Vaadin offers the possibility to orchestrate interactive components entirely server-side using a rich Java API. The Karibu-DSL library wraps Vaadin APIs to provide more pleasant Kotlin experience.
  • Server-side code is typically written using the Kotlin language. This is where your app logic resides and this is where you will add your code.
  • The database access is handled by the VoK-ORM library: a very simple and powerful layer over a SQL database. You can of course decide not to use VoK-ORM and use JPA; you can even decide not to use SQL at all and use a NoSQL database.

Vaadin-on-Kotlin apps typically consist of several pieces. To learn more about a particular piece, just click the box below:

Write your UI in structured Kotlin code
Unleash your database, with a sprinkle of Kotlin magic
Test your UI with speed and reliability
The Productive UI Framework for Java Web Apps
Create and reuse test batteries in a sane way
Sane async code with coroutines

Further Links