# ==============================================================================
# ASIFlow.AI - Enterprise .gitignore
# Comprehensive exclusion patterns for multi-technology stack
# ==============================================================================

# ==============================================================================
# SECURITY & SECRETS - CRITICAL
# ==============================================================================
# Environment files
# Block root .env files
# TEMP: allow viewing env files for debugging
#!.env
#!.env.*
#!frontend/.env
#!frontend/.env.*
#!infrastructure/config/production.env

# Google Cloud & Authentication
# asiflow-*.json
# *-key.json
# *-credentials.json
#client_secret_*.json
# service-account-*.json
#gcp-credentials.json

# API Keys and Secrets
*.key
*.pem
*.p12
*.pfx
secrets/
.secrets/

# Security and sensitive configuration files
setting.md
infrastructure/monitoring/MONITORING_RUNBOOK.md
docs/README_v3.md
docs/DEPLOYMENT.md
infrastructure/config/production.env
owasp-report-extracted/
infrastructure/config/staging.env
infrastructure/config/development.env

# ==============================================================================
# PYTHON - Backend & Agent Core
# ==============================================================================
# Virtual environments
.venv/
venv/
/env/
/ENV/
.Python

# Python cache and compiled files
__pycache__/
*.py[cod]
*$py.class
*.so
.pytest_cache/
.coverage
.coverage.*
htmlcov/
.tox/
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Python build artifacts
build/
develop-eggs/
# dist/
downloads/
eggs/
.eggs/
# lib/ - Removed for frontend remediation
# lib64/ - Removed for frontend remediation
parts/
s# dist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
*.manifest
*.spec

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# Celery
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# ==============================================================================
# NODE.JS / JAVASCRIPT / TYPESCRIPT - Frontend
# ==============================================================================
# Dependencies
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Package manager files (keeping package-lock.json for reproducible builds)
# package-lock.json  # ✅ Removed - needed for npm ci in Cloud Build
yarn.lock
pnpm-lock.yaml

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Coverage directory used by tools like istanbul
coverage/
*.lcov
.nyc_output/

# ESLint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next/
out/

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# public - commented out to allow frontend/public directory

# Storybook build outputs
.out
.storybook-out

# Rollup.js default build output
# dist/

# Uncomment the public line in if the project is for a library or npm package
# public/

# Vite build tool
# dist-ssr
# *.local - Commented out to allow .env.local files

# ==============================================================================
# TYPESCRIPT
# ==============================================================================
*.tsbuildinfo
.tscache/

# SWC
.swc/

# ==============================================================================
# DOCKER & CONTAINERIZATION
# ==============================================================================
# Docker
.dockerignore
docker-compose.override.yml
docker-compose.*.yml
!docker-compose.yml
!docker-compose.yaml

# ==============================================================================
# KUBERNETES & INFRASTRUCTURE
# ==============================================================================
# Kubernetes secrets and temporary files
k8s/secrets/
k8s/temp/
*.kubeconfig
kubeconfig
.kube/config

# Helm
charts/*/charts/
charts/*/requirements.lock
.helm/

# Terraform
*.tfstate
*.tfstate.*
.terraform/
.terraform.lock.hcl
terraform.tfvars
terraform.tfvars.json
*.tfvars
*.auto.tfvars
crash.log
crash.*.log
override.tf
override.tf.json
*_override.tf
*_override.tf.json
.terraformrc
terraform.rc

# Ansible
*.retry
.vault_pass.txt

# ==============================================================================
# CLOUD PLATFORMS
# ==============================================================================
# Google Cloud SDK
.gcloud/
google-cloud-sdk/

# AWS
.aws/
.boto

# Azure
.azure/

# ==============================================================================
# IDE & EDITORS
# ==============================================================================
# Visual Studio Code
.vscode/
*.code-workspace

# IntelliJ IDEA
.idea/
*.iws
*.iml
*.ipr
out/

# Eclipse
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

# NetBeans
/nbproject/private/
/nbbuild/
/# dist/
/nb# dist/
/.nb-gradle/

# Vim
*.swp
*.swo
*~
.vim/

# Emacs
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*

# Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project

# Windsurf
.windsurf/
.windsurfrules

# ==============================================================================
# OPERATING SYSTEMS
# ==============================================================================
# macOS
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
*.stackdump
[Dd]esktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msix
*.msm
*.msp
*.lnk

# Linux
*~
.fuse_hidden*
.directory
.Trash-*
.nfs*

# ==============================================================================
# LOGS & MONITORING
# ==============================================================================
# Log files
# logs/  # Commented out to allow API logs routes
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
mcp_server.log

# Runtime data
pids/
*.pid
*.seed
*.pid.lock

# ==============================================================================
# TESTING & QUALITY ASSURANCE
# ==============================================================================
# Test results
test-results/
playwright-report/
test-results.xml
junit.xml

# Coverage reports
coverage/
.nyc_output/
htmlcov/
.coverage
.coverage.*
lcov.info
clover.xml

# SonarQube
.sonar/
.scannerwork/

# ==============================================================================
# BUILD ARTIFACTS & TEMPORARY FILES
# ==============================================================================
# Build directories
build/
# dist/
out/
target/
tmp/
temp/
.tmp/

# Backup files
*.bak
*.backup
*.old
*.orig
*.rej
*~
.#*

# ==============================================================================
# DATABASES & CACHES
# ==============================================================================
# SQLite
*.sqlite
*.sqlite3
*.db

# Redis dump files
dump.rdb

# ==============================================================================
# DOCUMENTATION GENERATION
# ==============================================================================
# Generated documentation
docs/_build/
docs/build/
site/

# ==============================================================================
# MISCELLANEOUS
# ==============================================================================
# Temporary folders
backups/
archive/
scratch/

# Large data files (adjust as needed)
*.dump
*.sql
# Allow specific migration SQL files
!backend/database/migrations/*.sql
# Allow all database SQL files
!backend/database/*.sql
# Allow compliance database SQL files
!backend/compliance/database/*.sql
*.csv
*.xlsx
*.zip
*.tar.gz
*.rar

# Media files that shouldn't be in version control
*.mp4
*.avi
*.mov
*.wmv
*.flv
*.webm

# Large image files
*.psd
*.ai
*.eps

# ==============================================================================
# PROJECT-SPECIFIC EXCLUSIONS
# ==============================================================================
# ASIFlow specific patterns
mcp_server.log

# Large binary files and build artifacts
*.bin
*/bin/istioctl
*/bin/
*.tar.gz
*.tgz
*.zip
*.dmg
*.pkg
*.deb
*.rpm

# Development and testing artifacts that shouldn't be committed
validate_*.py
test_*_integration.py
demo_*.py

# ==============================================================================
# SONARQUBE
# ==============================================================================
sonarqube_issues_p1.json
sonarqube_issues_p2.json
sonarqube_issues_p3.json
sonarqube_issues_p4.json
sonarqube_issues_p5.json
sonarqube_issues_p6.json
sonarqube_issues_p7.json
sonarqube_quality_gates.json
sonarqube_active_rules.json
SONARQUBE_REMEDIATION_SUMMARY.md
test_analyzer.py
sonar-project.properties
SONARQUBE_COMPREHENSIVE_ANALYSIS.md
istio-*/
