Svelte Axum Project

screenshot of Svelte Axum Project
svelte

Starting project template for Rust Axum backend and Svelte frontend

Overview:

The svelte-axum-project is a project template for building a Rust Axum backend and Svelte frontend. It provides a simple Single-Page-App (SPA) example and does not use SvelteKit. The project has been updated to version 0.4.2, which includes a migration of axum-sessions to tower-sessions and the removal of a secret key warning due to the migration. The backend has also been updated to version 0.6.20 of axum, 0.5 of axum-sessions, and 0.4 of tower-http. The frontend has been updated to version 2.4.2 of vite-plugin-svelte, 4.0.5 of svelte, and 4.4.5 of vite. Additionally, the backend has made changes to how servedir works for serving front end static assets.

Features:

  • Rust Axum backend
  • Svelte frontend
  • Simple Single-Page-App (SPA) example
  • Authorization header middleware
  • Session checking middleware
  • Store example for token secret
  • API route example using authorization header
  • Secure route example using sessions for authorization

Summary:

The svelte-axum-project is a project template that provides an example of building a Single-Page-App (SPA) with a Rust Axum backend and Svelte frontend. It includes features such as authorization header middleware, session checking middleware, and examples of using authorization headers and sessions for secure routes. The installation process involves installing NodeJs and Rust, cloning the repository, and running commands to install dependencies and build the project. The template offers flexibility in terms of installation methods and includes a script for building both the backend and frontend concurrently on Linux.

svelte
Svelte

Svelte is a modern front-end framework that compiles your code at build time, resulting in smaller and faster applications. It uses a reactive approach to update the DOM, allowing for high performance and a smoother user experience.