Skip to main content
Version: Next

Set Up Your Project

This page is about getting Storm into a real project: what it needs from your toolchain, which of the four setup routes fits your situation, and how to prove the wiring works before you write application code.

Just want to see it work?

The Quickstart takes about five minutes, needs no database server, and ends with a working query and the SQL it generated. It is the fastest way to judge Storm, and it is the recommended first stop. Come back here when you are setting up a project you intend to keep.

Prerequisites

RequirementVersion
JDK (Kotlin path)21 or later
JDK (Java path)21 exactly; preview class files are version-locked
Kotlin (if using Kotlin)2.0 or later
Build toolMaven 3.9+ or Gradle 8+ (Gradle 8.5+ for the Storm plugin)
DatabaseAny JDBC-compatible database

Kotlin users need no preview flags. Java users must enable --enable-preview on compilation, tests, and execution, and must build and run on a JDK 21 toolchain. Installation covers both in full, including the exact Maven and Gradle configuration.

The JDK 21 pin is a property of the platform, not of Storm: the Java API is built on String Templates (JEP 430), a preview feature, and preview class files only load on the JDK that compiled them. When the JDK ships a stable successor, the Java API drops the preview flags and the version pin and stands alongside Kotlin as a first-class path. String Templates covers where that stands today, and which modules are affected (only storm-java21; the core framework and the Kotlin API are not).

Choose a Setup Route

All four routes end at the same place: a project with the Storm dependencies, the metamodel processor, and the Kotlin compiler plugin wired up.

One plugin application imports the BOM, adds the core dependencies, wires the metamodel processor through KSP, selects the compiler-plugin variant matching your Kotlin version, and sets the Java preview flags.

plugins {
kotlin("jvm") version "2.4.0"
id("com.google.devtools.ksp") version "2.3.10"
id("st.orm") version "1.13.1"
}

Add the dialect module and JDBC driver for your database, and you are done. See Installation for the plugin's configuration options and the per-Kotlin-version matrix.

Verify the Wiring

Two checks catch almost every setup mistake before it reaches application code.

Does the metamodel generate? After a build, a User entity should have a generated User_ alongside it. If it does not, the annotation processor (Java) or KSP (Kotlin) is not on the compile path. See Metamodel for how generation is configured per build tool.

Do the entities match the database? Schema validation compares every mapped entity against the live schema and reports missing tables, missing columns, type mismatches, and nullability disagreements in one pass. validateSchemaOrThrow() fails loudly; validateSchema() returns the findings as a list so you can assert on them:

dataSource.orm.validateSchemaOrThrow()

Run it at startup in development, or as a test. Schema Validation covers what is checked, how to scope it to specific entities, and the strict mode.

Next

With the project wired, work through the model:

  1. First Entity -- define entities, insert and fetch records
  2. First Query -- filtering, repositories, and streaming
  3. Entities -- annotations, nullability, naming conventions

Integrating with a framework instead? Go straight to Spring Integration or Ktor Integration, which cover dependency injection, transaction management, and configuration for each.

The full map of the documentation, including paths for migrating from JPA and for evaluating Storm in production, is on the introduction page.

Stuck on the setup, or something here did not match what you saw? Ask in Discord or open a discussion.