Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 2.12 KB

README.md

File metadata and controls

49 lines (33 loc) · 2.12 KB

License: MIT Actions CI

Rust Monorepo

This 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:

  • Actix Web to expose the REST endpoints
  • Diesel ORM to perform the CRUD operations on the database to automatically update database
  • PostgreSQL database; see below to run one via Docker
  • React + PrimeReact for a top notch user interface including lazy datatable
  • TanStack Query for powerful asynchronous state management for TypeScript
  • Orval to generate TanStack Query client Typescript from OpenAPI definition
  • React Hook Forms to validate user input data

Requirements

To compile and run this demo you will need:

  • Rust/Cargo
  • Docker

In addition, you will need either a PostgreSQL database, or Docker to run one.

Developing

Building frontend

The UI static assets are configured to be served up from the backend, along with the exposed API that the SPA uses to retrieve data.

$ npm install
$ npm run build

Running backend

With Rust/Cargo installed, you can build and run the backend with:

$ cargo r

Now open your web browser to http://localhost:8080/ to see it in action.

Quarkus Monorepo