https://github.com/melloware/quarkus-primereact
Quarkus REST Server + PrimeReact UI
https://github.com/melloware/quarkus-primereact
monorepo orval primereact quarkus react tanstack-react-query typescript
Last synced: about 2 months ago
JSON representation
Quarkus REST Server + PrimeReact UI
- Host: GitHub
- URL: https://github.com/melloware/quarkus-primereact
- Owner: melloware
- License: mit
- Created: 2022-07-31T12:51:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-05T13:22:44.000Z (about 2 months ago)
- Last Synced: 2025-04-05T14:24:51.078Z (about 2 months ago)
- Topics: monorepo, orval, primereact, quarkus, react, tanstack-react-query, typescript
- Language: TypeScript
- Homepage:
- Size: 14.6 MB
- Stars: 28
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![]()
# Quarkus PrimeReact
[](https://opensource.org/licenses/MIT)
[](https://github.com/melloware/quarkus-primereact/actions/workflows/build.yml)
[](https://github.com/quarkusio/quarkus)

**If you like this project, please consider supporting me ❤️**
[](https://github.com/sponsors/melloware)
[](https://www.paypal.me/mellowareinc)This [monorepo](https://en.wikipedia.org/wiki/Monorepo) is a minimal CRUD service exposing a couple of endpoints over REST,
with a front-end based on React so you can play with it from your browser.While the code is surprisingly simple, under the hood this is using:
- [Quarkus REST](https://quarkus.io/guides/rest) for REST API endpoints with OpenAPI documentation
- [Quarkus REST Problem](https://github.com/quarkiverse/quarkus-resteasy-problem) for consistent REST API error handling
- [Quarkus WebSockets Next](https://quarkus.io/guides/websockets-next-tutorial) for real-time WebSocket communication
- [Quarkus Quinoa](https://github.com/quarkiverse/quarkus-quinoa) to handle allowing this monorepo to serve React and Java code
- [Hibernate ORM with Panache](https://quarkus.io/guides/hibernate-orm-panache) to perform the CRUD operations on the database
- [PostgreSQL](https://www.postgresql.org/) database; automatically starts an embedded DB
- [Liquibase](https://www.liquibase.com/) to automatically update database
- [React + PrimeReact](https://primereact.org/) for a top notch user interface including lazy datatable
- [React Websocket](https://github.com/robtaussig/react-use-websocket) to handle websocket connections
- [TanStack Form](https://tanstack.com/form/latest) to validate user input data
- [TanStack Query](https://tanstack.com/query/latest) for powerful asynchronous state management for TypeScript
- [Orval](https://orval.dev/) to generate TanStack Query client Typescript from the OpenAPI definition
- [Zod](https://zod.dev/) for TypeScript-first schema validation## Requirements
To compile and run this demo you will need:
- JDK 17+
- Apache Maven## Code Generation
This project uses [Orval](https://orval.dev/) to generate the [TanStack Query](https://tanstack.com/query/latest) client Typescript from the OpenAPI definition.
[](https://github.com/melloware/quarkus-primereact)
## Developing
### Live coding with Quarkus
The Maven Quarkus plugin provides a development mode that supports
live coding. To try this out:```bash
$ ./mvnw quarkus:dev
```Watch as it starts up a temporary PostreSQL database just for this session. In this mode you can make changes to the code and have the changes immediately applied, by just refreshing your browser.
> :bulb:
Hot reload works add a new REST endpoint and see it update in realtime. Try it!Now open your web browser to http://localhost:8080/ to see it in action.
[](https://github.com/melloware/quarkus-primereact)
## Building
### Run Quarkus PrimeReact in JVM mode
When you're done iterating in developer mode, you can run the application as a
conventional jar file.First compile it:
```bash
$ ./mvnw clean package
```Then run it with:
```bash
$ java -jar ./target/quarkus-app/quarkus-run.jar
```Or build it as a single executable JAR file (known as an uber-jar):
```bash
$ ./mvnw clean package -Dquarkus.package.type=uber-jar
```Then run it with:
```bash
$ java -jar ./target/quarkus-primereact-{version}-runner.jar
```Navigate to:
### Run Quarkus PrimeReact in Docker
You can easily build a Docker image of this application with the following command:
```bash
$ ./mvnw -Pdocker
```You will be able to run this binary directly where ${version} is the current project version:
```bash
$ docker run -i --rm -p 8000:8000 melloware/quarkus-primereact:latest
```> :bulb:
Now observe the time it took to boot, and remember: that time was mostly spent to generate the tables in your database and import the initial data.## See it in your browser
Navigate to: