A "2025" version of the official Axum-Leptos template
Frontend:
Backend:
Testing:
Other:
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
npm run watch
This will start your application at `127.0.0.1:3000` and automatically rebuild CSS when Tailwind classes change.
2. For production build:
```bash
cargo leptos build --release
Run end-to-end tests:
cargo leptos end-to-end
src/
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 definitionspages/
- Application pages/routesHome.rs
- Homepage componentAbout.rs
- About page with API integrationmod.rs
- Pages module definitionsserver/
- Backend server codehandlers.rs
- API endpoint handlersroutes.rs
- API route definitionsmod.rs
- Server module setupstyle/
- CSS and TailwindCSS filesend2end/
- End-to-end tests with Playwrighttests/
- Test specificationsplaywright.config.ts
- Playwright configurationpublic/
- Static assetsCargo.toml
- Rust dependencies and build configurationpackage.json
- Node.js dependenciestailwind.config.js
- TailwindCSS configurationThis project is released under the Unlicense. Feel free to use it as a starting point for your own applications.