Skip to content

Commit edf1b44

Browse files
feat: bootstrap Tauri 2 + React/TypeScript foundation (issue #14)
* feat: bootstrap tauri2 react-typescript foundation (issue #14) * fix(rust): resolve lib.rs cfg lint condition * chore(ts): add lint/check workflow and commit rules * chore(ts): make rust lint self-sufficient in clean environments * refactor(rust): remove mobile entry attribute for macOS-only scope * chore(process): enforce in-place implementation workflow
1 parent 1e81e7f commit edf1b44

27 files changed

+7105
-4
lines changed

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
src-tauri/icons
15+
16+
# Editor directories and files
17+
.vscode/*
18+
!.vscode/extensions.json
19+
.idea
20+
.DS_Store
21+
*.suo
22+
*.ntvs*
23+
*.njsproj
24+
*.sln
25+
*.sw?

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
3+
}

AGENTS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
- Create pull requests per issue.
1313
- Include unit tests for each implementation issue.
1414
- Add or update CI test coverage when applicable.
15+
- Always implement directly inside this repository working directory (`/Users/fengliu/Code/ai-manager`); do not use temporary clones or parallel worktrees for implementation.
16+
- Commit and push from this repository directory, then open/update PRs from the same local workspace.
17+
- Before every commit, run lint and unit tests (`pnpm run lint` and `pnpm test`) and commit only after both pass.
18+
- Keep Rust and TypeScript changes in separate commits when both are touched in the same issue.
1519

1620
## Phase Gate
1721

@@ -20,7 +24,8 @@
2024

2125
## Toolchain Policy
2226

23-
- Use latest stable libraries unless constrained.
27+
- Always select the latest stable library versions when adding or updating dependencies.
28+
- Before creating a PR, verify there are no stale dependencies with `pnpm outdated`.
2429
- Target Node.js `v24` and Rust `2024 edition`.
2530
- Always use `pnpm` commands instead of `npm` (for example: `pnpm install`, `pnpm test`).
2631
- Use `pnpm` as the package manager.

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1-
# ai-manager
1+
# AI Manager
22

3-
Tauri 2 based AI MCP/Skills manager.
3+
Tauri 2 + React/TypeScript desktop foundation for managing MCP and Skills across supported AI clients.
4+
5+
## Prerequisites
6+
7+
- Node.js `v24+`
8+
- pnpm `10.x`
9+
- Rust stable toolchain (`edition = 2024`)
10+
11+
## Commands
12+
13+
- Install dependencies: `pnpm install`
14+
- Frontend dev server: `pnpm dev`
15+
- Desktop dev mode: `pnpm tauri:dev`
16+
- Frontend production build: `pnpm build`
17+
- Desktop production build: `pnpm tauri:build`
18+
- Lint checks (TypeScript + Rust): `pnpm lint`
19+
- Pre-commit verification (lint + unit tests): `pnpm check`
20+
- Unit tests: `pnpm test`
21+
22+
## Project Structure
23+
24+
- `src/`: React frontend application.
25+
- `src-tauri/`: Rust backend and Tauri application shell.
26+
- `docs/spec/`: MVP requirements and contracts.
27+
- `schemas/`: JSON schema contracts for specs.
28+
- `tests/`: Node.js unit tests for spec and bootstrap contracts.
29+
30+
## Notes
31+
32+
- The frontend calls a Rust command (`greet`) to validate frontend-backend wiring.
33+
- `src-tauri/tauri.conf.json` is configured to use `pnpm` for both dev and build hooks.
34+
- `scripts/ensure-tauri-icon.mjs` generates the required Tauri icon in clean environments.

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Tauri + React + Typescript</title>
8+
</head>
9+
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="/src/main.tsx"></script>
13+
</body>
14+
</html>

package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,33 @@
88
"node": ">=24.0.0"
99
},
1010
"scripts": {
11+
"ensure:tauri-icon": "node ./scripts/ensure-tauri-icon.mjs",
12+
"pretauri:dev": "pnpm run ensure:tauri-icon && pnpm dev",
13+
"pretauri:build": "pnpm run ensure:tauri-icon && pnpm build",
14+
"lint:ts": "tsc --noEmit",
15+
"lint:rust": "pnpm run ensure:tauri-icon && cargo clippy --workspace --all-targets --manifest-path src-tauri/Cargo.toml -- -D warnings",
16+
"lint": "pnpm run lint:ts && pnpm run lint:rust",
17+
"check": "pnpm run lint && pnpm test",
18+
"dev": "vite",
19+
"build": "tsc && vite build",
20+
"preview": "vite preview",
21+
"tauri": "tauri",
22+
"tauri:dev": "tauri dev",
23+
"tauri:build": "tauri build",
1124
"test": "node --test"
25+
},
26+
"dependencies": {
27+
"@tauri-apps/api": "^2.10.1",
28+
"@tauri-apps/plugin-opener": "^2.5.3",
29+
"react": "^19.2.4",
30+
"react-dom": "^19.2.4"
31+
},
32+
"devDependencies": {
33+
"@tauri-apps/cli": "^2.10.0",
34+
"@types/react": "^19.2.14",
35+
"@types/react-dom": "^19.2.3",
36+
"@vitejs/plugin-react": "^5.1.4",
37+
"typescript": "~5.9.3",
38+
"vite": "^7.3.1"
1239
}
1340
}

0 commit comments

Comments
 (0)