Skip to content

Application demoing some realistic use cases with Hilla framework

License

Notifications You must be signed in to change notification settings

czp13/hilla-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom project from start.vaadin.com

This project was created from https://start.vaadin.com. It's a fully working Vaadin application that you continue developing locally. It has all the necessary dependencies and files to help you get going.

The project is a standard Maven project, so you can import it to your IDE of choice. You'll need to have Java 11/17 + and Node.js 16.14+ installed.

To run from the command line, use mvn and open http://localhost:8080 in your browser.

This application is demoing various aspects of Hilla framework

  • Lazy loading data from server
  • Using server side filterign of data
  • Securing statelss Hilla app using Spring Security
  • Demonstrating role based authorities, method level end point security
  • Styling using Lumo utility classes
  • Handling url parameters of the route
  • Navigating with url parameters within the application
  • Using renderer function in vaadin-grid
  • Creating responsive vaadin-grid using ResizeObserver etc.
  • Responsive CSS using media queries
  • Setting tooltip formatter using additionalOptions for vaadin-charts
  • Using Lumo Badge
  • Using custom validator in binder
  • Theming with Lumo CSS custom properties
  • Date input in multiple formats
  • Localization / views
  • Localization of the DatePicker
  • Localization of the binder error messages using its interpolator callback
  • Example of vaadin-confirm-dialog
  • Using static resources from serves (see the flags in language-switch)
  • Using renderer with vaadin-select (see language-switch)
  • Example of class name generator with vaadin-grid
  • How to integrate 3rd party library, see currency-field.ts
  • Example test story of the list view using TestBench Browser testing
  • Using tooltips
  • Dense theme variant

Before running

Create file "config/secrets/application.properties"

use this command to generate new random secret for your app:

openssl rand -base64 32

Copy the to property in application.properties file

com.example.application.app.secret=

Running the app

Use:

mvn spring-boot:run

Project structure

Directory Description
frontend/ Client-side source directory
    index.html HTML template
    index.ts Frontend entrypoint, contains the client-side routing setup using Vaadin Router
    main-layout.ts Main layout Web Component, contains the navigation menu, uses App Layout
    views/ UI views Web Components (TypeScript)
    stores/ Stores, the business logic (TypeScript)
    util/ Custom validator and Localization (TypeScript)
    styles/ Styles directory (CSS)
src/ Server-side source directory
    Application.java Server entrypoint
     data/ Entities and endpoints directory (Java)

What next?

vaadin.com has lots of material to help you get you started:

About

Application demoing some realistic use cases with Hilla framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 63.2%
  • Java 32.5%
  • CSS 3.8%
  • HTML 0.5%