rframe
rframe is a web framework built on top of the axum web framework. It adds extra functionality to help build websites that have this kind of structure:
- PostgreSQL database
- Rust backend (via axum)
- Server side json to be consumed by a frontend
- HTMX or similar solutions for frontend (basically: not a Single Page App)
- No ORM, favouring direct usage of queries via sqlx
- sqitch for database migrations
Usage
It's intended that you create a repository that imports rfame as a library, and builds on top of it. src/bin/example is intended as an example of such a projet, to show how you can extend rframe.
Running the example
Ensure you have installed and working:
- Taskfile installed
- Docker and docker-compose
- sqitch
- cargo-watch
To get the example running:
task compose-up # Starts the database
sqitch deploy # runs the database migrations
task watch # runs the example and watches for code changes to automatically recompile and run
Then visit localhost:3002 in your browser. You can log into the site using your github account.