Skip to main content
This guide covers the development workflow for building Kit applications, including the dev server, hot reloading, and useful commands.

Development Server

Start the development server with:
This starts:
  • Backend server on http://localhost:8080
  • Vite dev server on http://localhost:5173 (for frontend assets)

Backend Only Mode

If you only need the Rust backend (no frontend):

Custom Ports

Configure ports using environment variables:

Project Structure

A typical Kit project structure:

Development Workflow

1. Make Changes

Edit your Rust code in src/ or React code in frontend/src/.

2. Automatic Recompilation

Kit watches for changes:
  • Rust changes: Recompiles automatically
  • React changes: Hot module replacement (instant updates)

3. Test Your Changes

Visit http://localhost:8080 to see your changes.

Database Development

Running Migrations

Syncing Entities

After modifying migrations, regenerate entity files:

Fresh Database

Reset and re-run all migrations:

Code Generation

Kit provides generators to scaffold common components:

Environment Configuration

Configure your app using .env:

Debugging

Logging

Kit uses Rust’s standard logging. Enable debug output:

Database Queries

Enable SQL query logging:

Testing

Run your test suite:

Frontend Tests

Building for Production

Build the Backend

Build the Frontend

Run Production Server

Useful Commands