Hilla integrates a Spring Boot Java backend with a reactive TypeScript front end. It helps you build apps faster with type-safe server communication, included UI components, and integrated tooling.
Hilla helps you access the backend easily with type-safe endpoints.
index.ts
// Type info is automatically generated based on Java
import Person from 'Frontend/generated/com/vaadin/hilla/demo/entity/Person';
import { PersonService } from 'Frontend/generated/endpoints';
async function getPeopleWithPhoneNumber() {
const people: Person[] = await PersonService.findAll();
// Compile error: The property is 'phone', not 'phoneNumber'
return people.filter((person) => !!person.phoneNumber);
}
console.log('People with phone numbers: ', getPeopleWithPhoneNumber());
PersonService.java
@BrowserCallable
@AnonymousAllowed
public class PersonService {
private PersonRepository repository;
public PersonService(PersonRepository repository) {
this.repository = repository;
}
public @Nonnull List<@Nonnull Person> findAll() {
return repository.findAll();
}
}
Person.java
@Entity
public class Person {
@Id
@GeneratedValue
private Integer id;
@Nonnull private String firstName;
@Nonnull private String lastName;
@Email @Nonnull private String email;
@Nonnull private String phone;
// getters, setters
}
Learn more at vaadin.com/hilla
Follow the tutorials at https://vaadin.com/docs/latest/getting-started
The best way to contribute is to try out Hilla and provide feedback to the development team in our Forum or with GitHub issues.
If you want to develop Hilla, you can clone the repo and run tests using the following commands:
git clone https://github.com/vaadin/hilla.git
npm install
npm run build
mvn install -DskipTests
npm test
mvn verify
You need the following versions of SDKs and tools:
- Node.js:
>= 22 LTS
, - npm:
>=10
(package-lock.json
is of version 3) - JDK:
>=17
- Maven:
>=3