A web application for managing and tracking high-intensity interval training workouts. Built with Rust and Leptos, deployed on CloudFlare Workers.
This application provides a minimalistic, responsive interface for executing HIIT workouts. It's built as a full-stack Rust application using:
- Leptos framework for reactive UI components
- Rust compiled to WebAssembly for client-side logic
- CloudFlare Workers for serverless deployment
- Tailwind CSS for styling
- Nix for reproducible development environments
Determinate Systems has the best Nix:
# Install Nix using Determinate Systems installer
curl -fsSL https://install.determinate.systems/nix | sh -s -- install --determinate
git clone https://github.com/lemmih/hiit.git
cd hiit
To preview the site before deployment:
nix run .#preview
# Visit http://localhost:8787 in your browser
Development is best done by running two commands at the same time:
nix run .#local-dev
nix run .#wrangler -- dev --env local
# Visit http://localhost:8787 in your browser
# Create a production build
nix build .#hiit
# Create a development build with better debugging
nix build .#hiit-dev
# Run all checks (formatting, linting, etc.)
nix flake check
E2E tests require a local installation of Firefox.
nix run .#e2e
The application is configured to deploy to CloudFlare Workers.
- CloudFlare account with Workers enabled
- Wrangler CLI authenticated with your CloudFlare account
To deploy to your own CloudFlare account:
- Update the
wrangler.toml
file with your domain and route information:
routes = [
{ pattern = "your-domain.com", zone_name = "your-domain.com", custom_domain = true },
]
- Deploy using Wrangler:
# Authenticate with CloudFlare (if not already done)
nix run .#wrangler login
# Deploy to CloudFlare
nix run .#deploy
If your application requires environment variables (secrets, API keys, etc.):
# Set environment variables
nix run .#wrangler secret put SECRET_NAME
# Then enter your secret value when prompted
See the LICENSE file for details.