The sources of your Vaadin Demo have the following structure:
src
├── main/frontend
│ └── themes
│ └── default
│ ├── styles.css
│ └── theme.json
├── main/java
│ └── org/mvnsearch
│ ├── base
│ │ └── ui
│ │ ├── component
│ │ │ └── ViewToolbar.java
│ │ ├── MainErrorHandler.java
│ │ └── MainLayout.java
│ ├── examplefeature
│ │ ├── ui
│ │ │ └── TaskListView.java
│ │ ├── Task.java
│ │ ├── TaskRepository.java
│ │ └── TaskService.java
│ └── Application.java
└── test/java
└── org/mvnsearch
└── examplefeature
└── TaskServiceTest.java
The main entry point into the application is Application.java. This class contains the main() method that start up
the Spring Boot application.
The skeleton follows a feature-based package structure, organizing code by functional units rather than traditional
architectural layers. It includes two feature packages: base and examplefeature.
- The
basepackage contains classes meant for reuse across different features, either through composition or inheritance. You can use them as-is, tweak them to your needs, or remove them. - The
examplefeaturepackage is an example feature package that demonstrates the structure. It represents a self-contained unit of functionality, including UI components, business logic, data access, and an integration test. Once you create your own features, you'll remove this package.
The src/main/frontend directory contains an empty theme called default, based on the Lumo theme. It is activated in
the Application class, using the @Theme annotation.
To start the application in development mode, import it into your IDE and run the Application class.
You can also start the application from the command line by running:
./mvnwTo build the application in production mode, run:
./mvnw -Pproduction packageTo build a Docker image, run:
docker build -t my-application:latest .If you use commercial components, pass the license key as a build secret:
docker build --secret id=proKey,src=$HOME/.vaadin/proKey .The Getting Started guide will quickly familiarize you with your new Vaadin Demo implementation. You'll learn how to set up your development environment, understand the project structure, and find resources to help you add muscles to your skeleton — transforming it into a fully-featured application.