https://github.com/santhosh7403/realword-app-leptos-axum-sqlite
A near realworld leptos web application with sqlite
https://github.com/santhosh7403/realword-app-leptos-axum-sqlite
argon2 axum fts5 full-text-search fullstack leptos sqlite ssr tailwindcss uuid webassembly
Last synced: about 2 months ago
JSON representation
A near realworld leptos web application with sqlite
- Host: GitHub
- URL: https://github.com/santhosh7403/realword-app-leptos-axum-sqlite
- Owner: santhosh7403
- License: unlicense
- Created: 2025-07-13T03:06:10.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-08-20T00:36:01.000Z (about 2 months ago)
- Last Synced: 2025-08-20T01:26:34.138Z (about 2 months ago)
- Topics: argon2, axum, fts5, full-text-search, fullstack, leptos, sqlite, ssr, tailwindcss, uuid, webassembly
- Language: Rust
- Homepage:
- Size: 220 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A near realworld leptos web app with axum sqlite backend
=======
This is another Leptos demo application that I worked on as part of my learning Rust/Leptos and carrying out experiments. This one is little more complex compared to the previously shared one [ demo-tools-app-leptos-07-actix-tailwind ](https://github.com/santhosh7403/demo-tools-app-leptos-07-actix-tailwind). I hope this code may help someone who is considering Leptos framework in their next project and wants a hands-on or a peek on more realworld working example.
To make it run in few simple steps, made a sqlite version (though, [ recent opinions ](https://dev.to/shayy/everyone-is-wrong-about-sqlite-4gjf) suggest sqlite itself is good enough if your app isn't too many writes ). So to see it, just clone the project and run.
Before proceeding to clone, you may take a look on the [ screenshots here ](https://github.com/santhosh7403/realword-app-leptos-axum-sqlite/blob/main/App_Screenshots.md), that will give a quick good insight into this app and you can decide.
There is a Postgres version of this (full-text-search had slight differences, though) as well and you can [ find it here ](https://github.com/santhosh7403/realword-app-leptos-axum).
This app includes:
Leptos
axum
SSR
sqlite
fts5
Modal Windows
argon2(password encrypt)
uuid
tailwindcss
fontawesome iconsTo test it out, clone the repo and run.
`git clone https://github.com/santhosh7403/realword-app-leptos-axum-sqlite.git`
`cd realword-app-leptos-axum-sqlite`
`source .env` - set the DATABASE_URL env variable
`cargo leptos watch` or `cargo leptos serve`
Above command expects rust toolchains and cargo-leptos are installed already, if you don't have `cargo-leptos` installed you can install it with
`cargo install cargo-leptos --locked`
By default, `cargo-leptos` uses `nightly` Rust, `cargo-generate` etc. If you run into any trouble, you may need to install one or more of these tools. Please refer [ rustup here ](https://rustup.rs).
1. `rustup toolchain install nightly --allow-downgrade` - make sure you have Rust nightly
2. `rustup update` - update the rust toolchains to latest
3. `rustup target add wasm32-unknown-unknown` - add the ability to compile Rust to WebAssembly
4. `cargo install cargo-generate` - install cargo-generate binaryNow you may run the build.
`cargo leptos watch` or `cargo leptos serve`
# Application access
Once application started, access application from you web browser [ localhost:3000 ](http://localhost:3000/)
The application screen looks like this
![]()
![]()
More screenshots are [ available here ](https://github.com/santhosh7403/realword-app-leptos-axum-sqlite/blob/main/App_Screenshots.md)
To showcase the app and test, some sample users and data are populated. User names 'user1' to 'user5' are available and password is same as username. In case if you want to remove this data, you may delete the 'basedata' files inside migrations folder and setup database as explained in [ database readme ](https://github.com/santhosh7403/realword-app-leptos-axum-sqlite/blob/main/README_DATABASE.md).
# Sqlite fts5 (full-text search)
The full-text search feature added covers three fields from articles table. If you are interested to learn how it works or want to experiment different search methods, please refer the sqlite fts5 documentation [ here ](https://www.sqlite.org/fts5.html#overview_of_fts5)
# Inspiration and Thanks
The base of this app is from [ here ](https://github.com/Bechma/realworld-leptos), though there may be other original versions some where else, not sure.
I initially started this as leptos06 to 07 change in this app (though, above reference repo also seems updated now!) as my learning and got interest to try out more experiments. Overall user interface changed, some with modal windows, tailwindcss and fontawesome icons, re-wired pages, some functionality changes etc. Currently added sqlite supported FTS5 (full text search) feature to enable a wide search (see the screenshot above). Search results pagination changed to a new way to avoid results page reload.