A modern, production-ready boilerplate for building cross-platform desktop applications using Tauri, React, TypeScript, and Tailwind CSS.
This project serves as a foundation for building desktop applications with a professional CI/CD pipeline, theming system, and native platform support (macOS, Windows, Linux, and Android).
- β‘ Tauri Desktop Framework - Lightweight, secure, and fast desktop app runtime
- βοΈ React 19 - Modern UI library with hooks
- π¨ Tailwind CSS - Utility-first CSS framework
- π Dark/Light Theme - Built-in theme switching with
next-themes - π§ TypeScript - Full type safety and better DX
- π± Cross-Platform - macOS, Windows, Linux, and Android support
- π Vite - Lightning-fast build tool
- π Pre-configured Security - Tauri capabilities and security best practices
- π― Modern Tooling - ESLint, Prettier, component library (shadcn/ui)
βββ src/ # Frontend source code (React + TypeScript)
β βββ components/ # React components
β β βββ ui/ # Reusable UI components (shadcn/ui)
β β βββ header.tsx # App header
β β βββ footer.tsx # App footer
β β βββ theme-provider.tsx # Theme configuration
β β βββ mode-toggle.tsx # Dark/light mode toggle
β βββ hooks/ # Custom React hooks
β β βββ useCommon.ts # Generic hooks (useAsync, useLocalStorage, etc.)
β βββ lib/ # Utility libraries
β β βββ utils.ts # Common utility functions
β β βββ download.ts # File download utilities
β β βββ platform.ts # Platform detection
β βββ types/ # TypeScript type definitions
β β βββ common.ts # Shared types and interfaces
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
β βββ index.css # Global styles
β
βββ src-tauri/ # Tauri backend (Rust)
β βββ src/ # Rust source code
β β βββ lib.rs # Library functions
β β βββ main.rs # Application entry
β βββ icons/ # Application icons
β βββ capabilities/ # Tauri security capabilities
β βββ gen/ # Generated build files
β β βββ android/ # Android-specific configuration
β βββ Cargo.toml # Rust dependencies
β βββ tauri.conf.json # Tauri configuration
β βββ build.rs # Build script
β
βββ package.json # Node.js dependencies
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite build configuration
βββ eslint.config.js # ESLint rules
βββ components.json # shadcn/ui components config
- Node.js 20+ and npm
- Rust toolchain (for Tauri development)
- Install: https://rustup.rs/
- For Android development:
- Android SDK & NDK
- Java Development Kit (JDK)
# Clone or use as template
git clone <repository-url>
cd quran-for-all
# Install dependencies
npm install
# For Android setup (optional)
npm run setup-android# Start web development server
npm run dev
# Start Tauri development (desktop app)
npm run tauri dev
# Start Tauri Android development
npm run tauri:android# Build web version
npm run build
# Preview production build
npm run preview
# Build Tauri desktop app
npm run tauri build# Run ESLint
npm run lint
# Format code with Prettier
npm run formatThe project includes a built-in dark/light theme system using next-themes:
import { ThemeProvider } from "./components/theme-provider";
import ModeToggle from "./components/mode-toggle";
function App() {
return (
<ThemeProvider defaultTheme="system" storageKey="vite-ui-theme">
<ModeToggle />
{/* Your app content */}
</ThemeProvider>
);
}Replace the welcome content in src/App.tsx with your application logic:
function App() {
return (
<ThemeProvider>
<Header />
<main className="container mx-auto px-4 py-8">
{/* Your content here */}
</main>
<Footer />
</ThemeProvider>
);
}Create components in src/components/:
// src/components/my-feature.tsx
export function MyFeature() {
return <div>Your feature here</div>;
}Generic hooks are available in src/hooks/useCommon.ts:
import { useAsync, useLocalStorage, useToggle } from "@/hooks/useCommon";
function MyComponent() {
const [isOpen, toggle] = useToggle(false);
const [preferences, setPreferences] = useLocalStorage("prefs", {});
return (
// Your component
);
}Add application-specific types to src/types/common.ts:
export interface DataModel {
id: string;
name: string;
// ... your fields
}Update src-tauri/tauri.conf.json with your app details:
{
"productName": "Your App Name",
"identifier": "com.yourcompany.yourapp",
"version": "1.0.0"
}Tauri uses a capability-based security model. Configure capabilities in src-tauri/capabilities/:
- default.json - Base capabilities (usually sufficient for most apps)
To enable specific features (file system, dialog, etc.), update the capabilities file according to Tauri documentation.
npm install package-namecd src-tauri
cargo add package-name# Build for all platforms
npm run tauri build
# Build for specific platform
npm run tauri build -- --target universal-apple-darwin # macOS
npm run tauri build -- --target x86_64-pc-windows-msvc # Windows
npm run tauri build -- --target x86_64-unknown-linux-gnu # Linuxnpm run tauri build -- --target aarch64-linux-androidnpm run build
# Output will be in dist/ directory- Add UI Components: Use
npx shadcn-ui@latest addto add shadcn/ui components - File Downloads: Use utilities in
src/lib/download.tsfor cross-platform file downloads - Platform Detection: Use
src/lib/platform.tsto detect the running platform - Type Safety: Always define types in
src/types/for better maintainability
MIT License - see LICENSE file for details
For issues or questions:
- Check existing documentation
- Review Tauri and React documentation
- Open an issue with detailed information
Ready to build something amazing! π