This is a Rust + Tauri + Vue project.
- Dev:
pnpm tauri dev - Build:
pnpm tauri build - Frontend Only:
pnpm dev/pnpm build - Backend Only:
cd src-tauri && cargo build
- Use pnpm.
- Rust: Follow
cargo fmtand Clippy. - Vue/TS: Follow ESLint/Prettier (standard Vue 3 style).
- Naming:
snake_casefor Rust,camelCasefor TS/JS.
src/: Vue frontend.src-tauri/: Rust backend.legacy/: Old C++ implementation (Reference only).
- TDD Requirement: Test-Driven Development is NOT optional.
- Red: Write a failing test first.
- Green: Implement just enough to pass.
- Refactor: Improve code quality under test protection.
- Frameworks:
- Rust: Built-in
cargo test. - Frontend: Vitest (To be setup).
- Rust: Built-in
- No Tests = No Code: Do not write implementation code without a corresponding test.
🔒 CRITICAL RULE: The
masterbranch is PROTECTED. Direct commits, modifications, or force pushes tomasterare STRICTLY PROHIBITED.
- DO NOT run
git push origin master. - DO NOT commit directly to the
masterbranch. - DO NOT edit files directly on
master(including documentation). - DO NOT use
git mergeto merge intomasterlocally and push.
The master branch is reserved exclusively for production-ready code that has passed all tests and reviews.
- Source: Merges must originate from
dev(development) orrelease/*branches. - Mechanism: Changes must be introduced via Pull Requests (PRs) or Merge Requests (MRs).
- Requirements:
- Pass CI/CD pipelines (Build & Test).
- Receive Code Review approval.
- Pass Quality Gate checks.
- Automatic Rejection: Push attempts to
masterwill be rejected by the remote repository. - Rollback: Any accidental bypass will trigger an automatic rollback.
- Alerts: Violations trigger immediate security alerts to the team lead.
Incorrect (Prohibited):
# ❌ NEVER DO THIS
git checkout master
git add .
git commit -m "quick fix"
git push origin masterCorrect (Required):
# ✅ ALWAYS DO THIS
git checkout -b feature/my-feature
# ... make changes ...
git commit -m "feat: add new feature"
git push origin feature/my-feature
# -> Go to GitHub/GitLab and open a PR to 'dev'- Renaming/Moving: ALWAYS use
git mvfor renaming or moving files to preserve version history.
⛔ CRITICAL RULE: The
.gitdirectory is ABSOLUTELY PROTECTED. Deleting, modifying, or damaging the.gitdirectory is STRICTLY PROHIBITED under any circumstances.
- DO NOT delete the
.gitdirectory (rm -rf .git,Remove-Item -Recurse .git, etc.). - DO NOT move or rename the
.gitdirectory. - DO NOT manually edit files inside the
.gitdirectory. - DO NOT run any commands that may corrupt or damage the
.gitdirectory.
- Data Loss: Deleting
.gitwill result in complete loss of version history. - Work Disruption: Repository will need to be re-cloned and re-configured.
- Critical Alert: Any attempt to delete
.gittriggers immediate security alert.
If .git is accidentally deleted:
- STOP all operations immediately.
- DO NOT create new files or modify existing files.
- Run
git initto reinitialize. - Run
git remote add origin <repo-url>to reconnect remote. - Run
git fetch originandgit reset --hard origin/masterto restore.