Skip to content

FlipWarthog/rust-monorepo

 
 

Repository files navigation

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

About

Rust REST Server + PrimeReact UI

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 58.2%
  • SCSS 19.4%
  • Rust 16.4%
  • JavaScript 2.5%
  • PLpgSQL 1.5%
  • HTML 1.0%
  • Other 1.0%