# ============================================
# 前后端分离项目 .gitignore 示例文件
# 后端：Hyperf 3.1 | 前端：Vite + Vue3 + AntDV 4
# ============================================

# ==================== 后端 (Hyperf/PHP) ====================
backend/vendor/
backend/runtime/
backend/.env
backend/.phpintel/
backend/*.cache
backend/.phpunit*
backend/phpstan.neon
backend/phpunit.xml
backend/.php_cs.cache
backend/.php-cs-fixer.cache
backend/composer.lock

# ==================== 前端 (Vue3/Vite) ====================
frontend/node_modules/
frontend/dist/
frontend/dist-ssr/
frontend/.DS_Store
frontend/coverage/
frontend/*.local
frontend/.eslintcache
frontend/*.tsbuildinfo
frontend/package-lock.json
frontend/pnpm-lock.yaml
frontend/yarn.lock

# 前端日志文件
frontend/logs/
frontend/*.log
frontend/npm-debug.log*
frontend/yarn-debug.log*
frontend/yarn-error.log*
frontend/pnpm-debug.log*
frontend/lerna-debug.log*

# 前端测试相关
frontend/test-results/
frontend/playwright-report/
frontend/__screenshots__/
frontend/cypress/videos/
frontend/cypress/screenshots/

# ==================== 数据目录 ====================
# 数据库文件
data/*.db
data/*.sqlite
data/*.sqlite3

# 临时数据文件
data/*.tmp
data/*.temp
data/*.bak
data/*.backup

# 数据导出文件
data/exports/
data/cache/
data/logs/

# ==================== 文档目录 ====================
# 文档生成文件
docs/.vuepress/dist/
docs/.vuepress/.cache/
docs/.vuepress/.temp/
docs/node_modules/

# 文档草稿
docs/*.draft.md
docs/*.wip.md

# ==================== IDE & 编辑器 ====================
# VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# AI 工具
.claude/
.cursor/
.aider*
.copilot/
.windsurf/
**/.aider*

# JetBrains IDEs (PhpStorm, WebStorm, IntelliJ)
.idea/
*.iml
*.iws
*.ipr
.idea_modules/

# Eclipse
.buildpath
.project
.settings/

# Sublime Text
*.sublime-project
*.sublime-workspace

# Vim
*.swp
*.swo
*~
.*.sw?

# ==================== 操作系统 ====================
# macOS
.DS_Store
.AppleDouble
.LSOverride
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Windows
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
Desktop.ini
$RECYCLE.BIN/
*.lnk

# Linux
.directory
.Trash-*
.nfs*

# ==================== 环境配置 ====================
# 环境变量文件
.env
.env.local
.env.*.local
.env.development
.env.production
.env.staging

# ==================== Docker ====================
docker-compose.override.yml
.dockerignore

# ==================== 版本控制 ====================
*.patch
*.diff

# ==================== 临时文件 ====================
*.tmp
*.temp
*.log
*.bak
*.swp
*.swo
*~

# ==================== 依赖锁文件（可选）====================
# 如果团队使用统一的包管理器，可以取消注释以下行
# composer.lock
# package-lock.json
# yarn.lock
# pnpm-lock.yaml

# ==================== 构建产物 ====================
build/
dist/
out/

# ==================== 其他 ====================
# 调试文件
*.map
*.orig

# 压缩文件
*.zip
*.tar.gz
*.rar
*.7z
