This repository serves as a comprehensive template for building web applications using Next.js for the frontend and Rust compiled to WebAssembly (WASM) for performance-intensive or shared logic. The entire project is structured as a Turborepo monorepo for efficient management.
It comes pre-configured with a modern tech stack designed for developer experience and performance.
wasm-pack
and integrate it into the Next.js app.cargo test
) for Rust logic.wasm-bindgen-test
) for Rust bindings.wasm-bindgen
, wasm-pack
cargo test
, wasm-bindgen-test
(Rust/WASM)Ready to use this template? Follow the detailed steps in the Getting Started Guide.
Once you have set up your project using the Getting Started Guide, these are the main commands you'll use from the root directory:
pnpm install
pnpm run dev
pnpm run build
pnpm run lint # Run linters (Biome, Cargo Clippy)
pnpm run format # Format code with Biome and Cargo Fmt
pnpm run test # Run Vitest unit/integration tests for 'web' app
pnpm run test:wasm # Run wasm-bindgen integration tests for 'wasm-lib'
# Note: Rust unit tests (cargo test) are run as part of `pnpm run test:wasm` script in wasm-lib or can be run directly within the package
pnpm run test:e2e # Run Playwright E2E tests (builds 'web' first)
pnpm run clean
/
โโโ .github/ # GitHub Actions workflows (CI)
โโโ apps/
โ โโโ web/ # Next.js application
โโโ packages/
โ โโโ wasm-lib/ # Rust WASM library
โ โโโ tsconfig/ # Shared TypeScript configs
โ โโโ config/ # Shared configurations (e.g., Tailwind preset)
โโโ biome.json # Biome (Lint/Format) config
โโโ package.json # Root dependencies & scripts
โโโ pnpm-workspace.yaml # pnpm workspace config
โโโ turbo.json # Turborepo pipeline config
โโโ tsconfig.json # Root TS config
To help AI coding assistants (like Claude Code) generate code that aligns with this project's structure and conventions, please refer to the AI Coding Guidelines.
Contributions are welcome! Please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.