Kratos Selfservice WASM

September 9, 2025 ยท View on GitHub

Web Preview

An SPA recreation of kratos-selfservice-ui-node using Dioxus, tailwindcss, and daisyUI.

All runtime code is compiled to WASM using a fork of the kratos-client-rust that allows the use of the native Fetch API.

Local user state is managed with a combination of Dioxus state (similar to React) and a custom session_expiry cookie for persistence.

Docker

Build

Run the following command in the root of the project:

docker build -t kratos-selfservice-rust:latest .

Run

docker run --rm --init -p 4455:4455 kratos-selfservice-rust:latest

Docker Compose

  1. Download or copy the Docker Compose example file
  2. Run docker-compose up --force-recreate
  3. Open the web app at http://127.0.0.1:4455
  4. Open MailSlurper at http://127.0.0.1:4436 to test email verification

Development

Requirements

Tailwind CSS

  1. Run the following command in the root of the project:
bun install
  1. Run the following command in the root of the project to start the Tailwind CSS compiler:
bunx @tailwindcss/cli -i ./tailwind.css -o ./assets/tailwind.css --watch

Starting Kratos

Run the following command in the root of your project:

docker-compose -f docker-compose.dev.yml up --force-recreate

Serving The App

Run the following command in the root of your project to start developing with the default platform:

dx serve --addr 127.0.0.1 --port 4455