Skip to content

A professional, production-ready starter kit (template) for building desktop applications with Dioxus (Rust). This template features a custom window, multi-language localization, dark/light theme support, and modern styling with Tailwind CSS.

Notifications You must be signed in to change notification settings

YemenOpenSource/dioxus_starter

 
 

Repository files navigation

Dioxus Desktop Starter Kit

A professional, production-ready starter kit (template) for building desktop applications with Dioxus (Rust). This template features a custom window, multi-language localization, dark/light theme support, and modern styling with Tailwind CSS.

🚀 How to Use

Click the green "Use this template" button on top right corner to create your own project based on this starter.

🛠 Rename the Project

After using this template, update the project name in Cargo.toml:

[package]
name = "your-app-name"

📺 Demo Video

Dioxus Desktop Starter Kit Demo

Watch the demo: https://www.youtube.com/watch?v=y5Qv9c9FRzc


✨ Features

  • Dioxus Desktop: Fast, reactive UI in Rust
  • 🪟 Custom Window: Unique window chrome and controls
  • 🌐 Localization: Multi-language support (see src/localization/)
  • 🌗 Dark/Light Themes: Seamless theme switching
  • 🎨 Tailwind CSS: Utility-first styling
  • 🔄 Live CSS Reload: npm run dev for Tailwind watch mode
  • 🧩 Modular, scalable architecture

🚀 Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/safwa1/dioxus_starter.git <your-app-name>
    cd <your-app-name>
  2. Install Rust dependencies:
    cargo build
  3. Install Node.js dependencies (for Tailwind):
    npm install

Development Workflow

  • Start Tailwind in watch mode:

    npm run dev

    This will watch and rebuild your CSS on changes.

  • Run the Dioxus desktop app:

    dx serve

    Runs the app in development mode with hot reload.

  • Build for release:

    dx build --release

    Builds the app for production.

  • Bundle for distribution:

    dx bundle --release

    Bundles the app for release/distribution.


🗂️ Project Structure

├── src/                # Rust source code
│   ├── app/            # App logic, components, router
│   ├── localization/   # Language files (multi-language)
│   ├── models/         # Data models
│   ├── services/       # Service layer
│   ├── state/          # State management
│   └── utils/          # Utilities and macros
├── assets/             # Static assets (CSS, icons)
├── icons/              # App icons for various platforms
├── tailwind.config.js  # Tailwind CSS config
├── tailwind.css        # Tailwind CSS entry
├── Cargo.toml          # Rust project manifest
├── package.json        # Node.js dependencies/scripts
└── README.md           # Project documentation

🌐 Localization

  • Add or edit language files in src/localization/ to support more languages.
  • Language switching is handled in-app.

🌓 Themes

  • Supports both dark and light themes.
  • Theme switching is available in the UI and managed in app state.

🛠️ Development

  • Hot Reload: Use dx serve or your preferred tool for live reload during development.
  • Linting:
    cargo clippy
  • Formatting:
    cargo fmt

🤝 Contributing

Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.


📄 License

This project is licensed under the MIT License.

About

A professional, production-ready starter kit (template) for building desktop applications with Dioxus (Rust). This template features a custom window, multi-language localization, dark/light theme support, and modern styling with Tailwind CSS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 64.7%
  • CSS 35.0%
  • JavaScript 0.3%