{"repo":"saschagrunert/webapp.rs","free":true,"listed":false,"github":"https://github.com/saschagrunert/webapp.rs","clone":"git clone https://github.com/saschagrunert/webapp.rs.git","description":"A web application completely written in Rust. 🌍","language":"Rust","stars":2245,"topics":["webapp","rust","frontend","backend","website","http-server","actix-web","postgresql","diesel-rs","diesel"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"webapp.rs A web application completely written in Rust Target of this project is to write a complete web application including backend and frontend within Rust. Blog Posts 1. A Web Application completely in Rust. 2. Lessons learned on writing web applications completely in Rust. Architecture Component Technology ----------- ------------ Frontend Leptos (WebAssembly with SSR + hydration) Backend Axum (via leptos axum) Database PostgreSQL (via SQLx) Auth JWT tokens (jsonwebtoken) + Argon2 password hashing The application uses Leptos server functions to communicate between frontend and backend, eliminating the need for a separate REST API layer. Both server and client are compiled from a single Rust crate. Features - User registration with Argon2 password hashing - Login with username and password - JWT-based session management with automatic renewal - PostgreSQL session and user storage - CSRF protection via origin validation - Health check endpoint ( /healthz ) for container orchestration - Server-side rendering with client-side hydration - Single binary deployment Prerequisites - Rust (stable) - cargo-leptos: cargo install cargo-leptos - PostgreSQL - wasm32-unknown-unknown target: rustup target add wasm32-unknown-unknown - wasm-bindgen-cli: cargo install wasm-bindgen-cli Getting Started Start a PostgreSQL instance: Run the application: The application will be available at http://127.0.0.1:3000 . Register a new account using the \"Register\" link on the login page, then log in w","default_branch":null,"files":null,"tree":[],"storefront":"/r/saschagrunert","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/saschagrunert/webapp.rs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}