Windows Development Setup Guide
This guide walks you through setting up the rframe development environment on Windows using WSL (Windows Subsystem for Linux).
Table of Contents
- Install WSL
- Install Docker Desktop
- Set Up Your WSL Environment
- Install mise (Tool Version Manager)
- Install Rust
- Clone and Configure the Project
- Start the Database
- Run Database Migrations
- Build and Run the Application
- Troubleshooting
1. Install WSL
WSL (Windows Subsystem for Linux) lets you run a Linux environment directly on Windows. We'll use Ubuntu.
Step 1.1: Open PowerShell as Administrator
- Press
Win + X - Click "Terminal (Admin)" or "PowerShell (Admin)"
Step 1.2: Install WSL with Ubuntu
Run this command:
This will:
- Enable WSL
- Install the latest Ubuntu distribution
- May require a restart
Step 1.3: Restart Your Computer
If prompted, restart your computer.
Step 1.4: Complete Ubuntu Setup
After restart, Ubuntu will open automatically (or search for "Ubuntu" in Start menu).
- Wait for the installation to complete
- Create a username (lowercase, no spaces) - e.g.,
mark - Create a password (you'll need this for
sudocommands)
Step 1.5: Update Ubuntu
In the Ubuntu terminal, run:
2. Install Docker Desktop
Docker is required to run the PostgreSQL database.
Step 2.1: Download Docker Desktop
- Go to https://www.docker.com/products/docker-desktop/
- Download "Docker Desktop for Windows"
- Run the installer
Step 2.2: Configure Docker for WSL
- Open Docker Desktop
- Go to Settings (gear icon)
- Go to Resources → WSL Integration
- Enable integration with your Ubuntu distribution
- Click "Apply & Restart"
Step 2.3: Verify Docker Works in WSL
Open your Ubuntu terminal and run:
Both commands should show version numbers. If docker command is not found, close and reopen the Ubuntu terminal.
3. Set Up Your WSL Environment
Step 3.1: Install Essential Build Tools
Step 3.2: Set Up Git (if not already configured)
Step 3.3: (Optional) Set Up SSH Keys for GitHub
Press Enter to accept defaults. Then add the key to your GitHub account:
Copy the output and add it at https://github.com/settings/keys.
4. Install mise (Tool Version Manager)
mise manages tool versions (Node.js, pnpm, spawn, etc.) for the project.
Step 4.1: Install mise
Step 4.2: Add mise to Your Shell
Step 4.3: Verify mise Installation
5. Install Rust
Step 5.1: Install rustup
When prompted:
- Press
1for default installation - Press Enter
Step 5.2: Configure Your Shell
Or close and reopen the terminal.
Step 5.3: Verify Rust Installation
Step 5.4: Install cargo-watch (for development)
6. Clone and Configure the Project
Step 6.1: Create a Projects Directory
Step 6.2: Clone the Repository
Using HTTPS:
Or using SSH (if you set up SSH keys):
Step 6.3: Navigate to the Project
Step 6.4: Let mise Install Project Tools
mise will automatically read .mise.toml and install required tools:
This installs:
- Node.js 24
- pnpm 10
- spawn v0.2.0 (database migration tool)
Step 6.5: Verify Tools Are Installed
node --version # Should show v24.x.x
pnpm --version # Should show 10.x.x
spawn --version # Should show v0.2.0
Step 6.6: Create Your Local Environment File (Optional)
The project includes sensible defaults in .mise.toml that work for local development. You only need a .env file if you want to override specific values.
The defaults in .mise.toml include:
- Database connection to the local Docker PostgreSQL
- Test SMTP credentials (Mailtrap)
- Test GitHub OAuth credentials
- Development-friendly settings (caching disabled, debug enabled)
Step 6.7: Install Frontend Dependencies
7. Start the Database
Step 7.1: Start PostgreSQL Container
This starts a PostgreSQL 18 container. You'll see database logs streaming - this is normal.
Step 7.2: Open a New Terminal Tab
Press Ctrl+Shift+T or open a new Ubuntu window to continue working while the database logs stream.
Step 7.3: Verify Database is Running
You should see a container named rframe-db running.
8. Run Database Migrations
Step 8.1: Apply Migrations with Spawn
This creates all the database tables, functions, and initial data.
Step 8.2: (Optional) Connect to the Database
To explore the database directly:
This opens a PostgreSQL prompt. Type \dt to list tables, \q to quit.
9. Build and Run the Application
You'll need two terminal windows - one for the backend and one for the frontend.
Step 9.1: Start the Backend (Terminal 1)
This:
- Compiles the Rust application
- Starts the web server on http://localhost:3002
- Automatically recompiles when you change Rust files
Step 9.2: Start the Frontend (Terminal 2)
Open a new terminal tab (Ctrl+Shift+T) and run:
This:
- Starts the Vite dev server with hot module replacement (HMR)
- Automatically updates the browser when you change Svelte components
- No need to refresh the page manually
Step 9.3: Open the Application
Visit http://localhost:3002 in your browser.
10. Troubleshooting
Docker commands not found
Make sure Docker Desktop is running and WSL integration is enabled (see Step 2.2).
Close and reopen your Ubuntu terminal after enabling WSL integration.
Permission denied errors with Docker
Add your user to the docker group:
Then log out and back into WSL:
Then reopen Ubuntu.
mise: command not found
Make sure you added mise to your shell profile:
spawn: command not found
Run mise install in the project directory to install all tools.
Database connection refused
- Make sure Docker Desktop is running
- Make sure the database container is running:
docker ps - If not running, start it:
mise run compose-up
Rust compilation errors about OpenSSL
Install the OpenSSL development package:
Port already in use
If port 3002 or 5437 is already in use:
# Find what's using the port
sudo lsof -i :3002
# Kill the process (replace PID with actual process ID)
kill -9 PID
WSL is very slow
- Make sure your project files are in the Linux filesystem (
~/projects/), not in/mnt/c/(Windows filesystem) - Add Windows Defender exclusions for WSL - search "Windows Security" → Virus & threat protection → Manage settings → Exclusions → Add exclusion → Folder →
\\wsl$\Ubuntu
How do I access WSL files from Windows?
In Windows Explorer, navigate to:
Or type explorer.exe . in your WSL terminal to open the current directory in Windows Explorer.
Quick Reference
| Task | Command |
|---|---|
| Start database | mise run compose-up |
| Stop database | mise run compose-down |
| Apply migrations | spawn migration apply |
| Connect to database | mise run db:connect |
| Run dev server | mise run watch |
| Run frontend dev | mise run frontend |
| Build frontend | cd frontend && pnpm build |
Next Steps
- Read CLAUDE.md for an overview of the project architecture
- Explore the
src/bin/example/directory for the example application - Check out
frontend/src/pages/for Svelte page components