diff --git a/frontend/FRONTEND.md b/frontend/FRONTEND.md index 647bb91..b893be4 100644 --- a/frontend/FRONTEND.md +++ b/frontend/FRONTEND.md @@ -6,7 +6,46 @@ Frontend da plataforma GoHorse Jobs construído com **Next.js 15** e **App Router**. -> **Last Updated:** 2024-12-26 +> **Last Updated:** 2026-01-03 + +--- + +## 🚀 Deploy (CI/CD) + +### Ambientes + +| Ambiente | URL | Branch | +|----------|-----|--------| +| **DEV** | https://dev.gohorsejobs.com | `dev` | +| **PRD** | https://gohorsejobs.com | `main` | + +### Pipeline Forgejo + +A pipeline está configurada em `.forgejo/workflows/deploy.yaml` e é triggerada automaticamente ao fazer push em `dev` com mudanças em `frontend/`. + +**Fluxo:** + +1. **Build local:** `podman build -t forgejo-gru.rede5.com.br/rede5/gohorsejobs-frontend:latest .` +2. **Push para registry:** `podman push forgejo-gru.rede5.com.br/rede5/gohorsejobs-frontend:latest` +3. **Commit e push:** `git push origin dev && git push forgejo dev` +4. **Pipeline detecta mudanças** em `frontend/` +5. **Deploy via SSH:** Pull da imagem + restart do serviço + +```bash +# Comandos executados pela pipeline no servidor +podman pull forgejo-gru.rede5.com.br/rede5/gohorsejobs-frontend:latest +sudo systemctl restart gohorsejobs-frontend-dev +``` + +### Verificar Pipeline + +```bash +# Via browser +https://forgejo-gru.rede5.com.br/rede5/gohorsejobs/actions + +# Testar se está rodando +curl -s https://dev.gohorsejobs.com | head -c 200 +``` --- diff --git a/frontend/src/lib/auth.ts b/frontend/src/lib/auth.ts index a019c82..a0f0f30 100644 --- a/frontend/src/lib/auth.ts +++ b/frontend/src/lib/auth.ts @@ -99,8 +99,9 @@ export function getCurrentUser(): User | null { console.log("%c[AUTH] User Loaded from Storage", "color: #10b981", user.email); return user; } + // Only log warning in browser, not during SSR + console.warn("%c[AUTH] No user found in storage", "color: #f59e0b"); } - console.warn("%c[AUTH] No user found in storage", "color: #f59e0b"); return null; }