Skip to content

Repository files navigation

rs-fullstack — Full-Stack Rust + React Boilerplate

Production-ready full-stack boilerplate: Rust (Axum) backend + React 19 SPA, managed as a pnpm monorepo. Ships with authentication, multi-workspace, i18n (5 languages), dark mode, WASM modules, and one-command Docker deployment.

简体中文

Tech Stack

LayerTech
BackendRust (Axum) · Sea-ORM · PostgreSQL 18
FrontendReact 19 · React Router v7 · TailwindCSS 4 · TanStack Query v5
WASMwasm-bindgen · wasm-pack
TypesZod v4 · TypeScript 5.9 · ts-rs
BuildTurborepo · Vite 7
Dev ToolsCargo clippy · rustfmt · Biome · Docker Compose · pnpm 10
Mini ProgramTaro 4 · React 18 · WeChat

Quick Start

# First-time setup (creates .env, installs deps, starts DB, runs migrations)
make init
# Start dev environment
make dev

Dev servers:

Commands

make init # First-time setup (creates .env, installs deps, starts DB, syncs schema)
make dev # Start dev environment (DB + dev servers)
make build # Production build
make docker # Docker image build
make deploy # One-command deploy to server
make lint # Biome + Cargo clippy + typecheck
make gen:api # Generate TypeScript types from Rust DTOs

Project Structure

packages/
server/ Rust (Axum + Sea-ORM) backend
web/ React Router v7 SPA frontend
wasm/ WebAssembly modules
types/ Shared Zod schemas + TypeScript types
components/ Generic UI components (TailwindCSS, no business logic)
i18n/ Internationalization resources (5 languages)
miniapp/ WeChat Mini Program (Taro 4)

Features

  • End-to-end type safety: Rust DTO → ts-rs → TypeScript, full-chain type safety with Zod v4 validation
  • SPA with client routing: React Router v7 with code splitting and client loaders
  • Multi-workspace: Switchable workspaces with role-based access
  • Admin panel: Super admin / admin / user three-tier roles
  • Object storage: OpenDAL abstraction (local filesystem, extensible to S3)
  • Internationalization: 5 languages (zh-CN / en-US / de-DE / ja-JP / zh-TW)
  • Theming: Light/dark mode + CSS variables + system preference detection
  • Strict dev toolchain: Cargo workspace + clippy pedantic lints, rustfmt, Biome, Turborepo
  • One-command deployment: Multi-stage Docker build with embedded SPA, deploy via SSH
  • Multi-platform: React SPA + WeChat Mini Program (Taro 4) + WASM modules from one monorepo

Deployment

See DEPLOY.md for production deployment guide.

Docker Compose runs 2 services: PostgreSQL + Rust backend (with embedded frontend static files).

Links

License

MIT

About

Production-ready full-stack boilerplate: Rust (Axum) backend + React 19 SPA, managed as a pnpm monorepo. Ships with authentication, multi-workspace, i18n (5 languages), dark mode, WASM modules, and one-command Docker deployment.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages