Hilla Documentation

Hilla Introduction

The Modern Web Framework for Java

Hilla is a framework for building reactive web apps on Java backends. It seamlessly integrates a reactive Lit TypeScript frontend with a Spring Boot backend.

Hilla is designed to be simple enough for small utilities, but robust enough to build complex, enterprise-grade apps.

Automatic Java to TypeScript Code Generation

Automatic TypeScript code generation helps ensure that the frontend always stays in sync with the backend, so you can build apps faster and with greater confidence, even when your team grows bigger. The strong type-safety also means you can explore server endpoint methods and their input and return types right from your IDE as you type.

@Endpoint
@AnonymousAllowed
public class PersonEndpoint {
    private PersonRepository repository;

    public PersonEndpoint(PersonRepository repository) {
        this.repository = repository;
    }

    public @Nonnull List<@Nonnull Person> findAll() {
        return repository.findAll();
    }
}
import { PersonEndpoint } from 'Frontend/generated/endpoints';
import Person from 'Frontend/generated/com/example/application/Person';

export class PersonView extends View {
  @state() people: Person[] = [];

  async firstUpdated() {
    this.people = await PersonEndpoint.findAll();
  }

  render() {
    return html`
      <vaadin-grid .items=${this.people}>
        <vaadin-grid-column path="firstName"></vaadin-grid-column>
        <vaadin-grid-column path="lastName"></vaadin-grid-column>
      </vaadin-grid>`;
  }
}

UI Components Included

Hilla helps you build professional-looking UIs faster by including more than 40 UI components ranging from text fields to data grids. In addition to the built-in components, you can use any web components and JavaScript components.

Secure and Scalable

Hilla blocks access to all endpoint methods by default. You can allow public access or restrict access by login status or role. Hilla uses Spring Security and JWT-based stateless authentication to ensure that your server can scale easily.

First Steps

  • Read the Getting Started section to create an empty project to get started.

  • Follow the Quick Start tutorial to build a small app and learn the basics.