Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vaadin/hilla
Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://github.com/vaadin/hilla
client-side frontend java lit lit-element react reactive reactjs stateless typescript vaadin
Last synced: 8 days ago
JSON representation
Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
- Host: GitHub
- URL: https://github.com/vaadin/hilla
- Owner: vaadin
- License: apache-2.0
- Created: 2021-04-27T13:25:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T14:40:10.000Z (12 days ago)
- Last Synced: 2024-10-29T15:56:02.355Z (11 days ago)
- Topics: client-side, frontend, java, lit, lit-element, react, reactive, reactjs, stateless, typescript, vaadin
- Language: Java
- Homepage: https://hilla.dev
- Size: 44.5 MB
- Stars: 918
- Watchers: 24
- Forks: 58
- Open Issues: 436
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Hilla
The modern web framework
for Java![Latest Stable Version](https://img.shields.io/npm/v/@hilla/frontend.svg)
[![Releases](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fdev%2Fhilla%2Fhilla%2Fmaven-metadata.xml)](https://github.com/vaadin/hilla/releases)
[hilla.dev](https://hilla.dev) · [Docs](https://hilla.dev/docs) · [Forum](https://vaadin.com/forum/c/hilla/18)---
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.
## Simple type-safe server communication
Hilla helps you access the backend easily with type-safe endpoints.
`index.ts`
```ts
// Type info is automatically generated based on Java
import Person from 'Frontend/generated/com/vaadin/hilla/demo/entity/Person';
import { PersonEndpoint } from 'Frontend/generated/endpoints';async function getPeopleWithPhoneNumber() {
const people: Person[] = await PersonEndpoint.findAll();// Compile error: The property is 'phone', not 'phoneNumber'
return people.filter((person) => !!person.phoneNumber);
}console.log('People with phone numbers: ', getPeopleWithPhoneNumber());
````PersonEndpoint.java`
```java
@Endpoint
@AnonymousAllowed
public class PersonEndpoint {private PersonRepository repository;
public PersonEndpoint(PersonRepository repository) {
this.repository = repository;
}public @Nonnull List<@Nonnull Person> findAll() {
return repository.findAll();
}
}
````Person.java`
```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 [hilla.dev](https://hilla.dev)
## Get started
Follow the tutorials at https://hilla.dev/docs
## Contributing
The best way to contribute is to try out Hilla and provide feedback to the development team in our [Forum](https://vaadin.com/forum/c/hilla/18) or with [GitHub issues](https://github.com/vaadin/hilla/issues).
### Development
If you want to develop Hilla, you can clone the repo and run tests using the following commands:
```sh
git clone https://github.com/vaadin/hilla.git
npm install
npm run build
npm test
```You need the following versions of Node.js and npm:
- **Node.js**: `>= 18 LTS` (native support for ES Modules and NodeJS execution of the newest hooks),
- **npm**: `^9` (`package-lock.json` is of version 3)---
![Frontend CI](https://github.com/vaadin/hilla/actions/workflows/ts.yml/badge.svg)
![Java CI](https://github.com/vaadin/hilla/actions/workflows/java.yml/badge.svg)
[![codecov](https://codecov.io/gh/vaadin/hilla/branch/main/graph/badge.svg?token=PQMTMS8ECC)](https://codecov.io/gh/vaadin/hilla)