create-rust-app 2.0.0

Set up a modern rust+react web app by running one command.
create-rust-app-2.0.0 is not a library.
Visit the last successful build: create-rust-app-11.0.3

Create Rust App

Set up a modern rust+react web app by running one command.

Requirements

  • tsync (see install section)
  • yarn (or npm)
  • Stable rust

Install

cargo install tsync
cargo install create-rust-app

Quick start

# Creates a new rust+react project
create-rust-app --project ./workspace/my-todo-app

cd my-todo-app

# Add authentication to your app
create-rust-app --add plugin auth

# Scaffold CRUD for a Note model
create-rust-app --add resource note

Features

  • Project creation (create-rust-app --project my_project)
    • Rust backend
      • Fastest backend server (via actix_web)
      • Database migrations (via diesel.rs)
      • Sending mail (via lettre)
      • PostgreSQL (via r2d2)
    • React frontend
      • Typescript, with backend type definition generation (via tsync)
      • Routing (via react-router-dom)
      • Update to latest create-react-app (generated frontend is not ejected from create-react-app)
  • Resource creation (create-rust-app --add resource UserRatings)
    • CRUD code-gen to reduce boileplate
  • Auth plugin (create-rust-app --add plugin auth)
    • Add JWT token-based auth with a simple command
    • Session management: restoration of previous session, revoking of refresh tokens
    • Credentials management/recovery
    • Email validation / activation flow
    • Adds frontend UI + react hooks
    • Adds auth service, and user / session models
    • Block your endpoints via Auth guard
    • Follows OWASP security best practices

Walkthrough

Gif