https://github.com/robertwayne/template-axum-htmx-tailwind
Axum-based MPA using htmx for SPA-like functionality, styled with Tailwind.
https://github.com/robertwayne/template-axum-htmx-tailwind
axum htmx minijinja postgresql tailwind template
Last synced: 5 months ago
JSON representation
Axum-based MPA using htmx for SPA-like functionality, styled with Tailwind.
- Host: GitHub
- URL: https://github.com/robertwayne/template-axum-htmx-tailwind
- Owner: robertwayne
- License: mit-0
- Created: 2023-08-05T04:41:56.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-08-02T22:49:02.000Z (11 months ago)
- Last Synced: 2025-10-10T15:09:35.186Z (8 months ago)
- Topics: axum, htmx, minijinja, postgresql, tailwind, template
- Language: Rust
- Homepage:
- Size: 180 KB
- Stars: 32
- Watchers: 1
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Template: axum + htmx + tailwind
## Backend
- __[Axum](https://github.com/tokio-rs/axum)__
- __[PostgreSQL](https://www.postgresql.org)__
- __[minijinja](https://docs.rs/minijinja/latest/minijinja/)__
## Frontend
- __[htmx](https://htmx.org)__
- __[TypeScript](https://www.typescriptlang.org)__
- __[Tailwind](https://tailwindcss.com)__
- __[bun](https://bun.sh/)__
## Getting Started
_This is an experimental template that I use as a base for my personal projects.
There are a lot of opinionated and probably controversial design choices that
I've made here. I cannot recommend using this template for your own projects,
especially if you're new to Rust._
## Notes
- Internally caches asset files. JavaScript and CSS files are pre-compressed at
startup with `brotli` with a max compression level.
- Compresses HTML fragments with `brotli` at a lower compression level via
`tower-compression` at runtime.
- Sets Cache-Control headers for CSS, JS, WEBP, SVG, and WOFF2 by default.
- Uses `bun` via the `build.rs` script to minify, hash, and bundle JS/TS/CSS.
- Run with `cargo watch -x run` to automatically rebuild on asset / source
changes.
## Other Templates
- __[Axum + SolidJS](https://github.com/robertwayne/template-axum-solidjs-spa)__
- __[Rocket +
Svelte](https://github.com/robertwayne/template-rocket-svelte-spa)__