1.0 KiB
1.0 KiB
Segurança e Performance
Requisitos de Segurança
Segurança Frontend:
- CSP Headers: Configurado em
next.config.js - XSS Prevention: React auto-escapes, validação de input
- Secure Storage: Tokens em httpOnly cookies
Segurança Backend:
- Input Validation: Validar params, sanitize input
- Rate Limiting: Vercel built-in ou Upstash
- CORS Policy: Next.js default same-origin
Segurança de Autenticação:
- Token Storage: httpOnly cookies via Supabase Auth Helpers
- Session Management: Supabase gerencia refresh automático
- Password Policy: Min 8 caracteres (configurar Supabase)
Otimização de Performance
Performance Frontend:
- Bundle Size Target: < 200KB initial bundle
- Loading Strategy: SSR para pages, lazy load modals
- Caching Strategy: Vercel Edge Cache, SWR para hooks
Performance Backend:
- Response Time Target: < 500ms P95
- Database Optimization: Indexes em
user_id - Caching Strategy: Redis futuro para cache de status