Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

Health Tracker is a personal health tracking application built with Leptos and Axum.

The problem

Health data is scattered across apps, devices, and spreadsheets. You want a single place to track your metrics, but existing tools are either too complex or too rigid.

The solution

A self-hosted web application that lets you log, visualize, and analyze your health data on your own terms. Built with Rust for performance and reliability, with a responsive Leptos frontend.

How it works

Health Tracker uses SSR + hydration for fast initial loads and smooth client-side interactivity:

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│   Browser   │────▶│  Axum Server │────▶│   SQLite    │
│  (Leptos)   │◀────│  (SSR + API) │◀────│  (Storage)  │
└─────────────┘     └──────────────┘     └─────────────┘

Key technologies

ComponentTechnology
FrameworkLeptos 0.8 (full-stack Rust)
ServerAxum
Buildcargo-leptos
StorageSQLite (via sqlx)
StylingSCSS
APIOpenAPI/Swagger (utoipa)
Validationvalidator (derive)

Architecture

Single-crate workspace with feature-gated compilation:

  • src/main.rs — Axum server entry (ssr feature)
  • src/lib.rs — WASM hydration entry (hydrate feature)
  • src/app.rs — Shared components and routes
  • src/api/mod.rs — Leptos #[server] functions for UI-driven data flow
  • src/server/api/ — REST API for external consumers
  • src/shared/ — Framework-agnostic domain types and validation
  • migrations/ — SQLx migration files

Next steps

  1. Quick Start: Get running in 5 minutes
  2. Architecture: Understand the system design
  3. Configuration: Customize settings