A "2025" version of the official Axum-Leptos template
-
Frontend:
- Leptos - A modern Rust web framework for building reactive web applications
- TailwindCSS - A utility-first CSS framework for rapid UI development
- WebAssembly - For running Rust code in the browser
-
Backend:
- Axum - Ergonomic and modular web framework built with Tokio, Tower, and Hyper
- Tokio - Asynchronous runtime for Rust
- Tower - Tower is a library of modular and reusable components for building robust networking clients and servers.
- Tower-http - HTTP specific Tower utilities
-
Testing:
- Playwright - End-to-end testing framework
-
Other:
- reqwasm - A simple HTTP client for WebAssembly
- serde - A data serialization framework for Rust
- serde_json - A JSON serialization/deserialization library for Rust
- cargo-leptos - Build tool for Leptos applications
- Install Rust (nightly):
rustup toolchain install nightly --allow-downgrade
rustup target add wasm32-unknown-unknown- Install cargo-leptos:
cargo install cargo-leptos --locked- Install Node.js dependencies:
npm install
cd end2end && npm install- Start the development server and Tailwind watcher in separate terminals:
# Terminal 1: Start the Leptos dev server
cargo leptos watch
# Terminal 2: Watch for Tailwind changes
npm run watchThis will start your application at 127.0.0.1:3000 and automatically rebuild CSS when Tailwind classes change.
- For production build:
cargo leptos build --releaseRun end-to-end tests:
cargo leptos end-to-endsrc/main.rs- Server entry point with Axum configurationlib.rs- Shared code and WASM hydration setupapp.rs- Main application component and routing setupcomponents/- Reusable UI componentsCounter.rs- Example counter componentmod.rs- Components module definitions
pages/- Application pages/routesHome.rs- Homepage componentAbout.rs- About page with API integrationmod.rs- Pages module definitions
server/- Backend server codehandlers.rs- API endpoint handlersroutes.rs- API route definitionsmod.rs- Server module setup
style/- CSS and TailwindCSS filesend2end/- End-to-end tests with Playwrighttests/- Test specificationsplaywright.config.ts- Playwright configuration
public/- Static assetsCargo.toml- Rust dependencies and build configurationpackage.json- Node.js dependenciestailwind.config.js- TailwindCSS configuration
- Full-stack Rust development with shared types
- Server-side rendering (SSR) with hydration
- Client-side routing
- API integration example
- Reactive state management
- Modern CSS with TailwindCSS
- End-to-end testing setup
- Development hot-reload
This project is released under the Unlicense. Feel free to use it as a starting point for your own applications.