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
- Svelte+index.js for front end
- No ORM, favouring direct usage of queries via sqlx
- spawn 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:
- Mise installed
- Docker and docker-compose
- Spawn
- cargo-watch
To get the example running:
mise run compose-up # Starts the database
spawn migration apply # runs the database migrations
mise run 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.