Skip to content

Control center skeleton instructions 24.8 #4382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion articles/building-apps/forms-data/replace-h2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
= Replace H2
:toclevels: 2

Many Spring Boot applications start with H2 because it's lightweight and easy to configure. For instance, Vaadin's <</getting-started/walk-through#,Walking Skeleton>> uses H2. However, you typically don't run H2 in production. Switching to your production database early in development helps catch compatibility issues sooner and lets you leverage database-specific features for performance.
Many Spring Boot applications start with H2 because it's lightweight and easy to configure. However, you typically don't run H2 in production. Switching to your production database early in development helps catch compatibility issues sooner and lets you leverage database-specific features for performance.

This guide teaches you how to replace H2 with PostgreSQL, although the same principle can be applied to other databases such as MySQL, Oracle, and Microsoft SQL Server. A hands-on mini-tutorial at the end helps you apply these concepts in a real Vaadin application.

Expand Down Expand Up @@ -215,6 +215,9 @@

In this tutorial, you'll replace H2 with PostgreSQL in a real Vaadin application.

[IMPORTANT]
This tutorial applies to skeletons generated for Vaadin 24.7. Skeletons generated for Vaadin 24.8 and newer already have support for PostgreSQL.

Check warning on line 219 in articles/building-apps/forms-data/replace-h2.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/building-apps/forms-data/replace-h2.adoc", "range": {"start": {"line": 219, "column": 87}}}, "severity": "WARNING"}

Check warning on line 219 in articles/building-apps/forms-data/replace-h2.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/building-apps/forms-data/replace-h2.adoc", "range": {"start": {"line": 219, "column": 50}}}, "severity": "WARNING"}

.Set Up the Project
[%collapsible]
====
Expand Down
2 changes: 2 additions & 0 deletions articles/building-apps/security/add-login/flow.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@

In this mini-tutorial, you'll enable security and add a login form to a real Vaadin application. This serves as a foundation for future *security-related mini-tutorials*.

[IMPORTANT]
This tutorial applies to skeletons generated for Vaadin 24.7. Skeletons generated for Vaadin 24.8 and newer already have a security configuration.

Check warning on line 98 in articles/building-apps/security/add-login/flow.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/building-apps/security/add-login/flow.adoc", "range": {"start": {"line": 98, "column": 87}}}, "severity": "WARNING"}

Check warning on line 98 in articles/building-apps/security/add-login/flow.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/building-apps/security/add-login/flow.adoc", "range": {"start": {"line": 98, "column": 50}}}, "severity": "WARNING"}

.Set Up the Project
[%collapsible]
Expand Down
4 changes: 4 additions & 0 deletions articles/building-apps/security/add-login/hilla.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@

In this mini-tutorial, you'll enable security and add a login form to a real Vaadin application. This serves as a foundation for future *security-related mini-tutorials*.

[IMPORTANT]
This tutorial applies to skeletons generated for Vaadin 24.7. Skeletons generated for Vaadin 24.8 and newer already have a security configuration.

Check warning on line 188 in articles/building-apps/security/add-login/hilla.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/building-apps/security/add-login/hilla.adoc", "range": {"start": {"line": 188, "column": 87}}}, "severity": "WARNING"}

Check warning on line 188 in articles/building-apps/security/add-login/hilla.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/building-apps/security/add-login/hilla.adoc", "range": {"start": {"line": 188, "column": 50}}}, "severity": "WARNING"}


.Set Up the Project
[%collapsible]
====
Expand Down
3 changes: 3 additions & 0 deletions articles/building-apps/security/add-logout/flow.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@

In this mini-tutorial, you'll add logout functionality to a real Vaadin application. It uses the project from the <<../add-login/flow#try-it,Add Login>> guide. If you haven't completed that tutorial yet, do it now before proceeding.

[IMPORTANT]
This tutorial applies to skeletons generated for Vaadin 24.7. Skeletons generated for Vaadin 24.8 and newer already have a security configuration.

Check warning on line 82 in articles/building-apps/security/add-logout/flow.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/building-apps/security/add-logout/flow.adoc", "range": {"start": {"line": 82, "column": 87}}}, "severity": "WARNING"}

Check warning on line 82 in articles/building-apps/security/add-logout/flow.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/building-apps/security/add-logout/flow.adoc", "range": {"start": {"line": 82, "column": 50}}}, "severity": "WARNING"}


.Inject AutheticationContext
[%collapsible]
Expand Down
3 changes: 3 additions & 0 deletions articles/building-apps/security/add-logout/hilla.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@

In this mini-tutorial, you'll add logout functionality to a real Vaadin application. It uses the project from the <<../add-login/hilla#try-it,Add Login>> guide. If you haven't completed that tutorial yet, do it now before proceeding.

[IMPORTANT]
This tutorial applies to skeletons generated for Vaadin 24.7. Skeletons generated for Vaadin 24.8 and newer already have a security configuration.

Check warning on line 83 in articles/building-apps/security/add-logout/hilla.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/building-apps/security/add-logout/hilla.adoc", "range": {"start": {"line": 83, "column": 87}}}, "severity": "WARNING"}

Check warning on line 83 in articles/building-apps/security/add-logout/hilla.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/building-apps/security/add-logout/hilla.adoc", "range": {"start": {"line": 83, "column": 50}}}, "severity": "WARNING"}


.Import `useAuth`
[%collapsible]
Expand Down
3 changes: 3 additions & 0 deletions articles/building-apps/security/protect-services/flow.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public class ProtectedService {

In this mini-tutorial, you'll learn how to use Spring method security in a real Vaadin application. The tutorial uses the project from the <<../protect-views/flow#try-it,Protect Views>> guide. If you haven't completed that tutorial yet, do it now before proceeding.

[IMPORTANT]
This tutorial applies to skeletons generated for Vaadin 24.7. Skeletons generated for Vaadin 24.8 and newer already have a security configuration.


.Enable Method Security
[%collapsible]
Expand Down
3 changes: 3 additions & 0 deletions articles/building-apps/security/protect-services/hilla.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ Spring method security has support for the JSR-250 annotations that Vaadin uses

In this mini-tutorial, you'll learn how to secure browser-callable services in a real Vaadin application. The tutorial uses the project from the <<../protect-views/hilla#try-it,Protect Views>> guide. If you haven't completed that tutorial yet, do it now before proceeding.

[IMPORTANT]
This tutorial applies to skeletons generated for Vaadin 24.7. Skeletons generated for Vaadin 24.8 and newer already have a security configuration.


.Create Role Constants
[%collapsible]
Expand Down
3 changes: 3 additions & 0 deletions articles/building-apps/security/protect-views/flow.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ public class MyView extends Main {

In this mini-tutorial, you'll learn how to add declarative view security to a real Vaadin application. You'll also learn how to control access programmatically inside a view. The tutorial uses the project from the <<../add-logout/flow#try-it,Add Logout>> guide. If you haven't completed that tutorial yet, do it now before proceeding.

[IMPORTANT]
This tutorial applies to skeletons generated for Vaadin 24.7. Skeletons generated for Vaadin 24.8 and newer already have a security configuration.


.Create Role Constants
[%collapsible]
Expand Down
3 changes: 3 additions & 0 deletions articles/building-apps/security/protect-views/hilla.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ export default function MyView() {

In this mini-tutorial, you'll learn how to control access to Hilla views both declaratively and programmatically. It uses the project from the <<../add-logout/hilla#try-it,Add Logout>> guide. If you haven't completed that tutorial yet, do it now before proceeding.

[IMPORTANT]
This tutorial applies to skeletons generated for Vaadin 24.7. Skeletons generated for Vaadin 24.8 and newer already have a security configuration.


.Add Roles to Authentication Context
[%collapsible]
Expand Down
41 changes: 36 additions & 5 deletions articles/getting-started/build.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,49 @@ mvnw clean package -Pproduction
----
--

Once the build has finished, check the `target` directory. If your skeleton was named `my-application`, you should find a file called `my-application-1.0-SNAPSHOT.jar`.

[IMPORTANT]
Running this JAR directly will fail due to a missing production database. The skeleton uses H2 or PostgreSQL Testcontainers in development mode but expects PostgreSQL in production. You'll learn how to address this later in this guide.

The `production` profile not only builds the frontend, but also excludes the development server bundle since it contains features that aren't used in production.


== Try It
[role="since:com.vaadin:vaadin@V24.8"]
== Build a Docker Image

Starting with Vaadin 24.8, the walking skeleton includes a `Dockerfile` that allows you to package your application as a Docker image.

Once the build has finished, check the `target` directory. If your skeleton was named `my-application`, you should find a file called `my-application-1.0-SNAPSHOT.jar`. Start the application from the JAR by running the following command:
.Install Docker
[NOTE]
You must install Docker on your system before you can build an image.

After creating a production build, run the following command from your project root:

[source,terminal]
----
java -jar my-application-1.0-SNAPSHOT.jar
docker build -t my-application:latest .
----

The application should start up in production mode. Try it out by navigating to: http://localhost:8080
This command produces a Docker image tagged `my-application:latest`, including the JAR file from the `target` directory.


[role="since:com.vaadin:vaadin@V24.8"]
== Deploy with Control Center

Once the Docker image is built, you can deploy it using <</control-center#,Control Center>>, a tool designed to simplify managing Vaadin applications on Kubernetes clusters.

.Install Control Center
[NOTE]
You must first install Control Center into a Kubernetes cluster. This cluster can be local or cloud-based. For installation instructions, see the <</control-center/getting-started#,Getting Started>> guide.

The walking skeleton is preconfigured to work with Control Center. Specifically, it *requires* the following features to be enabled for the application to run in production without modification:

* *Identity Management* via <</control-center/identity-management#,Keycloak>> for authentication and user management.
* *PostgreSQL Database* provisioned through the <</control-center/database#,Control Center UI>>.

If you choose not to use these features, you'll need to manually adjust the application's configuration to work with a different authentication mechanism or database setup.

// TODO Write a guide or deep-dive about removing Control Center.

Stop the application by pressing Ctrl-C.
For full deployment instructions, see the <</control-center/application-deployment#,Application Deployment>> guide.
43 changes: 33 additions & 10 deletions articles/getting-started/start/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,35 +45,58 @@ Click the [guibutton]*Download* button to download a zip-file with your new proj

== Try It

Once you have downloaded your new project, unzip it into a directory of your choice. Then start the application by running the following command:
After downloading your new project, unzip it into a directory of your choice.


=== Start the Application

Open a terminal in the project directory and run the following command:

[.example]
--
.Terminal
[source,terminal,subs="+attributes"]
----
<source-info group="macOS / Linux"></source-info>
./mvnw spring-boot:run
./mvnw
----

.PowerShell
[source,terminal,subs="+attributes"]
----
<source-info group="Windows"></source-info>
mvnw spring-boot:run
mvnw
----
--

It takes some time for the application to start for the first time, depending on how many dependencies Maven and npm have to download. When everything is ready, you can access the application at: http://localhost:8080
The first startup may take a while as Maven and npm download the required dependencies. Once initialization is complete, the application will be available at: http://localhost:8080

.Are you behind a proxy?
[TIP]
Vaadin uses Node.js to download the frontend toolchain during the build. If you are behind a proxy, you may need to configure Node to use that. See the <<{articles}/flow/configuration/development-mode/node-js#proxy-settings-for-downloading-frontend-toolchain,Flow Reference>> guide for details.


[role="since:com.vaadin:vaadin@V24.8"]
=== Log In

It should look like this:
Starting with Vaadin 24.8, the skeleton includes a default security configuration. When you open the application in your browser, you'll see the *development-mode login screen*, which displays a list of sample users and their credentials.

Choose one of the users and log in. You'll be taken to the main view, which should look like this:

image::images/screenshot.png[A walking skeleton running in the Chrome web browser]

Enter a description into the field, pick a due date and click the [guibutton]*Create* button. The task shows up in the grid. Now enter the word `fail` and click the button. This triggers an exception that gets handled by the error handler, and pops up an error notification.
=== Interact with the Application

Stop the application by pressing Ctrl-C.
To test basic functionality:

.Are you behind a proxy?
[TIP]
Vaadin uses Node.js to download the frontend toolchain during the build. If you are behind a proxy, you may need to configure Node to use that. See the <<{articles}/flow/configuration/development-mode/node-js#proxy-settings-for-downloading-frontend-toolchain,Flow Reference>> guide for details.
1. Enter a task description in the text field.
2. Select a due date.
3. Click the [guibutton]*Create* button.

The new task appears in the grid below.

Next, try entering the word `fail` into the description field and click [guibutton]*Create* again. This simulates an error, which is caught by the built-in error handler and results in a visible error notification.

=== Stop the Application

To shut down the application, press Ctrl+C in the terminal.
Loading
Loading