-
Notifications
You must be signed in to change notification settings - Fork 0
Initialize Tauri v2 + React scaffold with file-based routing and Tailwind v4 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… tooling Co-authored-by: Crauzer <18646077+Crauzer@users.noreply.github.com>
Co-authored-by: Crauzer <18646077+Crauzer@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR scaffolds a complete Tauri v2 desktop application with React 19, TanStack Router (file-based routing), Tailwind CSS v4, and modern tooling for the LeagueToolkit/ltk-forge project. The scaffold includes a working example with a "greet" command demonstrating Rust-frontend communication.
Key changes:
- Full Tauri v2 project structure with Rust backend and React frontend
- TanStack Router with file-based routing and automatic type generation
- Tailwind CSS v4 via Vite plugin with Base UI component library
- Complete development toolchain: ESLint flat config, Prettier, TypeScript 5.8
- CI/CD workflow for linting, type checking, and building
Reviewed changes
Copilot reviewed 24 out of 48 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Defines dependencies and npm scripts for the scaffold |
| vite.config.ts | Configures Vite with React, TanStack Router, and Tailwind plugins |
| tsconfig.json / tsconfig.node.json | TypeScript configuration for source and build files |
| src/main.tsx | React app entry point with RouterProvider setup |
| src/routes/__root.tsx | Root route with Router Devtools |
| src/routes/index.tsx | Landing page with example Tauri command integration |
| src/routeTree.gen.ts | Auto-generated route tree from TanStack Router |
| src-tauri/Cargo.toml | Rust dependencies for Tauri v2 application |
| src-tauri/src/lib.rs | Rust library with "greet" command example |
| src-tauri/src/main.rs | Rust main entry point |
| src-tauri/tauri.conf.json | Tauri v2 configuration with bundle identifier |
| eslint.config.js | ESLint flat config with TypeScript and React support |
| .prettierrc | Prettier configuration with Tailwind plugin |
| .github/workflows/ci.yml | CI workflow for lint, typecheck, and build |
| index.html | HTML entry point for the application |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Tauri + React + Typescript</title> |
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HTML title "Tauri + React + Typescript" doesn't match the application name "LTK Forge" used throughout the rest of the codebase. This should be updated to "LTK Forge" for consistency with the product name defined in tauri.conf.json.
| <title>Tauri + React + Typescript</title> | |
| <title>LTK Forge</title> |
| // @ts-expect-error process is a nodejs global | ||
| const host = process.env.TAURI_DEV_HOST; |
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @ts-expect-error directive suppresses the error for process.env.TAURI_DEV_HOST, but this is a valid Node.js global in the Vite config context. Consider adding proper type definitions instead of suppressing the error, or use import.meta.env.TAURI_DEV_HOST if available in Tauri v2, as this would be more idiomatic for Vite projects.
| "react": "^19.1.0", | ||
| "react-dom": "^19.1.0", | ||
| "@tauri-apps/api": "^2", | ||
| "@tauri-apps/plugin-opener": "^2", | ||
| "@tanstack/react-router": "^1.98.0", | ||
| "@base-ui/react": "^1.0.0-rc.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/react": "^19.1.8", | ||
| "@types/react-dom": "^19.1.6", |
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package.json lists React 19.1.0 as a dependency. React 19 is a relatively new major release that may have breaking changes and limited ecosystem support. Consider verifying that all dependencies (particularly @base-ui/react at rc.0) are fully compatible with React 19, or consider using React 18 LTS for better stability and ecosystem support.
| "react": "^19.1.0", | |
| "react-dom": "^19.1.0", | |
| "@tauri-apps/api": "^2", | |
| "@tauri-apps/plugin-opener": "^2", | |
| "@tanstack/react-router": "^1.98.0", | |
| "@base-ui/react": "^1.0.0-rc.0" | |
| }, | |
| "devDependencies": { | |
| "@types/react": "^19.1.8", | |
| "@types/react-dom": "^19.1.6", | |
| "react": "^18.2.0", | |
| "react-dom": "^18.2.0", | |
| "@tauri-apps/api": "^2", | |
| "@tauri-apps/plugin-opener": "^2", | |
| "@tanstack/react-router": "^1.98.0", | |
| "@base-ui/react": "^1.0.0-rc.0" | |
| }, | |
| "devDependencies": { | |
| "@types/react": "^18.2.0", | |
| "@types/react-dom": "^18.2.0", |
| "@tauri-apps/api": "^2", | ||
| "@tauri-apps/plugin-opener": "^2", | ||
| "@tanstack/react-router": "^1.98.0", | ||
| "@base-ui/react": "^1.0.0-rc.0" |
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @base-ui/react package is at version 1.0.0-rc.0 (release candidate). Using pre-release versions in production can introduce instability and breaking changes. Consider either using a stable version or documenting that this is an experimental dependency that may require updates.
| "@base-ui/react": "^1.0.0-rc.0" | |
| "@base-ui/react": "^1.0.0" |
| # The `_lib` suffix may seem redundant but it is necessary | ||
| # to make the lib name unique and wouldn't conflict with the bin name. | ||
| # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 | ||
| name = "ltk_forge_lib" |
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The library name in Cargo.toml uses an incorrect suffix. The comment states "The _lib suffix may seem redundant but it is necessary", but the actual name defined is "ltk_forge_lib" which doesn't match the expected binary name "ltk-forge" (note the underscore vs hyphen mismatch). According to the comment referencing the Windows issue, the lib name should be "ltk_forge_temp_lib" or similar to truly avoid conflicts, but it currently just mirrors the package name with underscores.
| name = "ltk_forge_lib" | |
| name = "ltk_forge_temp_lib" |
| #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] | ||
|
|
||
| fn main() { | ||
| ltk_forge_temp_lib::run() |
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main.rs file references "ltk_forge_temp_lib::run()" but the library is named "ltk_forge_lib" in Cargo.toml (line 14). This mismatch will cause a compilation error. The library name should be consistent between the Cargo.toml definition and the Rust code reference.
Scaffolds a Tauri v2 desktop application with React 19, TanStack Router file-based routing, Tailwind CSS v4, and modern tooling. Sets bundle identifier to
com.leaguetoolkit.forge.Stack
Structure
Example Route
Screenshots
Initial UI with Tailwind CSS and Base UI components:
Router Devtools active in development:
Scripts
Note:
pnpm tauri devrequires system dependencies (webkit2gtk on Linux, etc.). See Tauri prerequisites.Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.