# 环境变量和配置文件（敏感信息）
.env
.env.local
.env.*.local
*.env
config.local.json

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
!frontend-nextjs/src/lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# 虚拟环境
venv/
env/
ENV/
.venv
backend/venv/
backend/.venv/

# 数据库文件
*.db
*.sqlite
*.sqlite3
data/
backend/data/

# FAISS索引文件（运行时生成）
backend/faiss_indexes/
*.faiss
*.pkl

# 日志文件
*.log
logs/
*.log.*
backend/logs/

# Node.js / Frontend
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# 构建产物
dist/
dist-ssr/
*.local
frontend/dist/
widget/dist/
build/

# 编辑器和IDE
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store
*.iml

# 系统文件
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# 测试覆盖率
coverage/
*.cover
.hypothesis/
.pytest_cache/
.coverage
htmlcov/

# 类型检查
.mypy_cache/
.dmypy.json
dmypy.json
*.tsbuildinfo

# Docker
.dockerignore
!frontend-nextjs/.dockerignore
!scrapling-service/.dockerignore
docker-compose.override.yml
ssl/

# 临时文件
tmp/
temp/
*.tmp
*.bak

# 上传的文件
uploads/
files/

# 临时和测试文件
*_test.py
test_*.py
init_test.py
*_old.py
*_old_*.py
*_new.py
*_new_*.py

# 保留后端正式测试套件
!backend/tests/test_*.py
!backend/tests/*_test.py
!backend/tests/init_test.py

# OS生成的文件
.Spotlight-V100
.Trashes
ehthumbs.db

# Playwright 浏览器与缓存（本地开发产生）
backend/.playwright/
backend/.cache/
backend/.config/
backend/.pki/

# E2E 测试结果与产物
test-results/
e2e-test/test-results/
e2e-test/artifacts/
e2e-test/node_modules/
widget/artifacts/

# 测试数据库（本地开发产生）
*.db-wal
*.db-shm
# Local deployment secrets
.env
.env.*
!.env.example

# SSL certificates and private keys
ssl/
*.pem
*.key
*.crt
*.cer
