.mvn/wrapper | ||
src | ||
.gitignore | ||
Dockerfile | ||
LICENSE.md | ||
mvnw | ||
mvnw.cmd | ||
pom.xml | ||
README.md |
App README
- TODO Replace or update this README with instructions relevant to your application
Project Structure
The sources of your App have the following structure:
src
├── main/frontend
│ └── themes
│ └── default
│ ├── styles.css
│ └── theme.json
├── main/java
│ └── [application package]
│ ├── base
│ │ └── ui
│ │ ├── component
│ │ │ └── ViewToolbar.java
│ │ ├── MainErrorHandler.java
│ │ └── MainLayout.java
│ ├── examplefeature
│ │ ├── ui
│ │ │ └── TaskListView.java
│ │ ├── Task.java
│ │ ├── TaskRepository.java
│ │ └── TaskService.java
│ └── Application.java
└── test/java
└── [application package]
└── 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
base
package 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
examplefeature
package 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.
Starting in Development Mode
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:
./mvnw
Building for Production
To build the application in production mode, run:
./mvnw -Pproduction package
To 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 .
Getting Started
The Getting Started guide will quickly familiarize you with your new App 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.