https://github.com/mrgravity817/ushaaa
An experimental HATEOAS web template for savvy Rust developers.
https://github.com/mrgravity817/ushaaa
alpinejs askama axum docker flyio hateoas htmx rust surrealdb unocss
Last synced: about 2 months ago
JSON representation
An experimental HATEOAS web template for savvy Rust developers.
- Host: GitHub
- URL: https://github.com/mrgravity817/ushaaa
- Owner: MRGRAVITY817
- Created: 2024-01-26T06:02:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-04T13:41:27.000Z (10 months ago)
- Last Synced: 2025-01-07T12:14:44.218Z (4 months ago)
- Topics: alpinejs, askama, axum, docker, flyio, hateoas, htmx, rust, surrealdb, unocss
- Language: HTML
- Homepage:
- Size: 133 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# USHAAA stack
USHAAA is my preferred stack for developing web apps with Rust.
I'm still doing experiments with this template, so please use it at your own risk.
## What does "USHAAA" stand for?
- [**U**noCSS](https://unocss.dev/), as a lightweight CSS with superpowers
- [**S**urrealDB](https://surrealdb.com/), as a multi-purpose database
- [**H**tmx](https://htmx.org/), for building a hypermedia-driven app
- [**A**lpine](https://alpinejs.dev/), to get a bit of power to manipulate clientside state
- [**A**xum](https://docs.rs/axum/latest/axum/), as a backend library
- [**A**skama](https://github.com/djc/askama), for easy templating in Rust projectWell, for now, I will use the name _USHAAA_, but I cannot promise that I'll still stick to this name once
I switch some of the tools inside the stack.## Prerequisites
### Docker & Docker Compose
This template uses Docker primarily for managing both local and remote infrastructure.
The instructions to install _Docker_ for each platform can be found [here](https://docs.docker.com/engine/install/).
For installing _Docker Compose_, [here](https://docs.docker.com/compose/install/linux/#install-the-plugin-manually).### Fly.io account & `flyctl`
I've found that Fly.io is currently the easiest platform to deploy Dockerized apps.
If you don't have a Fly.io account, head to their [website](https://fly.io/) and create one.You'll also need to install `flyctl`, which is a CLI tool for managing Fly.io apps.
The instruction to install `flyctl` for each platform can be found [here](https://fly.io/docs/hands-on/install-flyctl/).Once you installed it, run this command to log in to your Fly.io account.
```bash
$ fly auth login
```### `cargo-watch`
For live-reloading your source code, install `cargo-watch`.
```bash
$ cargo install cargo-watch
```## Local Development
First you should run SurrealDB. Run this script.
```bash
$ ./scripts/local_db.sh up# The command above will use "surreal" as default DB user & password.
# To provide custom user & password, run
# $ SURREAL_USER= SURREAL_PASS= ./scripts/local_db.sh up
````local_db.sh` accepts `up` or `down` option.
When you want to stop database, replace the command above with `down` options.## Deployment
TODO: Add description