# Netlify Configuration for Influent Package Maker

[build]
  # Directorio de publicación (sitio estático)
  publish = "docs"
  
  # Directorio de funciones serverless
  functions = "netlify/functions"
  
  # Comando de construcción
  command = "npm install"

[dev]
  # Puerto para desarrollo local
  port = 8888
  
  # Directorio de funciones en desarrollo
  functions = "netlify/functions"

# Redirecciones para SPA
[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

# API Redirects
[[redirects]]
  from = "/.netlify/functions/*"
  to = "/.netlify/functions/:splat"
  status = 200

# Headers para seguridad y rendimiento
[[headers]]
  for = "/*"
  [headers.values]
    X-Content-Type-Options = "nosniff"
    X-Frame-Options = "SAMEORIGIN"
    X-XSS-Protection = "1; mode=block"
    Referrer-Policy = "strict-origin-when-cross-origin"
    Permissions-Policy = "geolocation=(), microphone=(), camera=()"

# Cache headers para archivos estáticos
[[headers]]
  for = "/docs/*"
  [headers.values]
    Cache-Control = "public, max-age=31536000, immutable"

[[headers]]
  for = "/docs/index.html"
  [headers.values]
    Cache-Control = "public, max-age=0, must-revalidate"

# Variables de entorno (deben configurarse en Netlify UI)
[env.production]
  environment = { GEMINI_API_KEY = "" }

