Commit graph

1002 commits

Author SHA1 Message Date
Tiago Yamamoto
89358acc13 refactor(auth): remove hash hardcoded da migration, seeder gera em runtime
Antes: 010_seed_super_admin.sql tinha hash bcrypt fixo amarrado a um pepper
específico. Qualquer mudança no PASSWORD_PEPPER quebrava todos os logins
silenciosamente após reset do banco.

Agora:
- migration 010: insere superadmin com placeholder inválido + force_change_password.
  ON CONFLICT DO NOTHING preserva o hash se o seeder já rodou.
- seeder users.js: faz upsert de 'lol' com bcrypt(senha + env.PASSWORD_PEPPER)
  em runtime. Mudar o pepper e re-rodar o seeder é suficiente para atualizar
  as credenciais sem tocar em nenhuma migration.
- docs/AGENTS.md: atualiza gotcha #1 explicando o novo fluxo migrate → seed
- docs/DEVOPS.md: fix opção 1 do troubleshooting inclui re-deploy do seeder

Fluxo correto após reset do banco (coberto pelo start.sh opções 2, 6, 8):
  npm run migrate  →  superadmin criado, hash = placeholder
  npm run seed     →  hash recalculado com PEPPER do ambiente, status = active

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 12:05:54 -06:00
Tiago Yamamoto
fcf960381c fix(auth): corrige hash seed e documenta alinhamento do PASSWORD_PEPPER
- Atualiza hash hardcoded em 010_seed_super_admin.sql para hash válido
  gerado com pepper=gohorse-pepper (o antigo hash estava inválido e causava
  AUTH_INVALID_CREDENTIALS em qualquer reset do banco)
- Corrige valor de PASSWORD_PEPPER e CORS_ORIGINS no DEVOPS.md para
  refletir os valores reais do Coolify DEV
- Adiciona seção de troubleshooting no DEVOPS.md com diagnóstico e fix
  passo-a-passo para mismatch de pepper
- Adiciona seção "Known Gotchas" no AGENTS.md documentando:
  * Regra do PASSWORD_PEPPER (deve ser gohorse-pepper em todos ambientes)
  * Campo de login é email no DTO, não identifier
  * Hashes bcrypt em SQL devem usar arquivo -f, nunca -c ($ é expandido)
  * Credenciais de teste do ambiente DEV

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 11:43:35 -06:00
Tiago Yamamoto
dda447e4b6 docs: unify test users in root README and update superadmin to lol login 2026-02-21 14:48:25 -06:00
Tiago Yamamoto
d7b03dad19 docs: add AI context rules and missing READMEs 2026-02-21 13:33:36 -06:00
bohessefm
c9f5cec84c Update .forgejo/workflows/deploy.yaml 2026-02-21 15:05:00 +00:00
bohessefm
742aa7fe8b Update .forgejo/workflows/deploy.yaml 2026-02-21 13:31:22 +00:00
bohessefm
adfc8386fe Update .forgejo/workflows/deploy.yaml 2026-02-21 13:25:41 +00:00
bohessefm
d002a7dbad Update .forgejo/workflows/deploy.yaml 2026-02-21 13:23:48 +00:00
bohessefm
6f97748bd4 Update .forgejo/workflows/deploy.yaml 2026-02-21 13:23:22 +00:00
bohessefm
1b07447550 Update .forgejo/workflows/deploy.yaml 2026-02-21 13:16:38 +00:00
bohessefm
b05456e21c Update .forgejo/workflows/deploy.yaml 2026-02-21 13:14:25 +00:00
bohessefm
c76a5879f9 Update .forgejo/workflows/deploy.yaml 2026-02-18 23:33:44 +00:00
bohessefm
a1091f0ee6 Update .forgejo/workflows/deploy.yaml 2026-02-18 23:31:40 +00:00
bohessefm
4ec574d66a Update .forgejo/workflows/deploy.yaml 2026-02-18 23:30:01 +00:00
bohessefm
37749b0f14 Update .forgejo/workflows/deploy.yaml 2026-02-18 23:27:20 +00:00
bohessefm
8b231b944f Update .forgejo/workflows/deploy.yaml 2026-02-18 23:25:16 +00:00
bohessefm
ee1207e2d9 Update .forgejo/workflows/deploy.yaml 2026-02-18 23:21:50 +00:00
bohessefm
65b2d65b25 Update .forgejo/workflows/deploy.yaml 2026-02-18 23:17:18 +00:00
Tiago Yamamoto
3ac65ce38b fix(ci): correct KUBECONFIG secret name in Forgejo deploy workflow
- Fix secrets.KUBE_CONFIG → secrets.KUBECONFIG (matching actual secret name)
- Update DEVOPS.md with dual pipeline architecture (GitHub→Coolify + Forgejo→K3s)
- Document Forgejo Actions secrets and variables

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:05:03 -06:00
Tiago Yamamoto
e238da0649 docs: add CI/CD pipeline details, credentials reference, and webhook config
- Document Forgejo Actions pipeline (build-and-push OK, deploy FAIL due to K3s)
- Add credentials/tokens reference table (~/.ssh/ files)
- Document GitHub webhooks for Coolify auto-deploy
- Update CI/CD flow diagram with Forgejo Actions runner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:00:36 -06:00
Tiago Yamamoto
21727793aa ci: update Coolify API URL to HTTPS 2026-02-18 12:46:03 -06:00
Tiago Yamamoto
de3f497223 fix: resolve TypeScript build errors preventing Coolify deploy
- Fix nullable location in my-jobs search filter (job.location ?? '')
- Fix Locale type assertion in jobs/new description language select
- Fix nullable location in api.ts transformApiJobToFrontend

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 11:33:45 -06:00
Tiago Yamamoto
9fd5cf5895 docs: update infra diagrams, add test users, fix Coolify URL
- Add full infrastructure Mermaid diagrams (Redbull + Apolo + CI/CD flow)
- Create TEST_USERS.md with all seeder credentials organized by role
- Fix Coolify URL from IP to https://redbull.rede5.com.br
- Update Coolify resources with current domains and status
- Add TEST_USERS.md reference to AGENTS.md, README.md, and doc index
- Update deployment section with both DEV environments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 06:22:56 -06:00
Tiago Yamamoto
7e202bb99e feat(i18n): fully translate /jobs/new page into pt-BR, en, and es
Replace all hardcoded Portuguese strings with locale-aware translations
using contentByLocale object. All 4 steps (job details, preview,
billing, payment), labels, placeholders, options, error messages,
and button texts now adapt to the user's selected language.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 06:06:12 -06:00
Tiago Yamamoto
55705a0fbb fix(i18n): initialize locale from browser/localStorage and add fallback chain
- Initialize useState with getInitialLocale() instead of hardcoded 'en',
  so the correct locale is used from the very first render
- Default to 'pt-BR' instead of 'en' for SSR and fallback
- Add fallback chain in t(): tries current locale -> pt-BR -> en
- Extract resolveKey() helper for cleaner key resolution
- Cast dictionaries as Record<string, unknown> to avoid type issues
- Wrap localStorage access in try-catch for blocked storage scenarios

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 06:02:06 -06:00
Tiago Yamamoto
8fb358a984 fix: remove edge runtime from job detail page and add description fallback
Remove `export const runtime = "edge"` which could interfere with i18n
JSON imports causing translation keys to render as literal text. Also
add fallback text when job description is empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 05:56:59 -06:00
Tiago Yamamoto
f6758c165c fix: resolve merge conflict markers in ApiJob interface and fix requirements type handling
Removed leftover <<<<<<< Updated upstream conflict markers that were breaking TypeScript compilation,
preventing the job detail page (/jobs/[id]) from loading real data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 05:47:08 -06:00
Tiago Yamamoto
ae4dcb4b90
Merge pull request #73 from rede5/codex/verificar-idioma-na-pagina-de-empregos
Codex-generated pull request
2026-02-18 08:41:39 -03:00
Tiago Yamamoto
4edcd22975 fix(frontend): sync job description language with selected locale 2026-02-18 08:41:09 -03:00
Tiago Yamamoto
064211ed11 fix: resolve merge conflicts in api.ts 2026-02-17 16:20:40 -06:00
Tiago Yamamoto
02eb1ed92e
Merge pull request #72 from rede5/codex/fix-language-layout-and-background-color
Codex-generated pull request
2026-02-17 18:48:25 -03:00
Tiago Yamamoto
a6c5bae22d fix(frontend): ajustar idiomas e layout da página de publicar vaga 2026-02-17 18:48:04 -03:00
Tiago Yamamoto
14dbb897b5
Merge pull request #71 from rede5/codex/update-more-jobs-section-to-carousel
Codex-generated pull request
2026-02-17 18:38:32 -03:00
Tiago Yamamoto
c121132f1a feat(frontend): turn more jobs section into carousel 2026-02-17 18:37:24 -03:00
Tiago Yamamoto
df7f3b002d
Merge pull request #70 from rede5/codex/adjust-layout-and-fetch-real-api-data
Job details: load company data from API, robust i18n and layout fallbacks
2026-02-17 18:23:47 -03:00
Tiago Yamamoto
28869a358c Fix job details i18n and load company data from API 2026-02-17 18:23:30 -03:00
Tiago Yamamoto
e6d22b87c3
Merge pull request #69 from rede5/codex/implement-search-functionality
fix(frontend): sync /jobs filters to URL and fix search layout
2026-02-17 18:14:15 -03:00
Tiago Yamamoto
f39dc503d5 fix(frontend): apply jobs query filters and preserve search layout 2026-02-17 18:11:05 -03:00
Tiago Yamamoto
8b37b87398 fix: adiciona CORS_ORIGINS para permitir frontend HTTPS 2026-02-17 11:46:22 -06:00
Tiago Yamamoto
69a5d779c6 fix: corrige deadlock no pool.connect do seeder
Usa pool.on('connect') em vez de override de pool.connect
2026-02-17 10:50:10 -06:00
Tiago Yamamoto
11b40fe700 fix: corrige URLs do frontend para HTTPS e SSL do seeder
- Frontend: adiciona API_URL e BACKOFFICE_URL como variáveis runtime
- Seeder: corrige parsing de sslmode do DATABASE_URL
- Seeder: aumenta timeout do healthcheck para 30s
2026-02-17 10:14:57 -06:00
Tiago Yamamoto
cb4ca69a18
Merge pull request #68 from rede5/codex/find-job-posting-routes
Codex-generated pull request
2026-02-17 09:42:49 -03:00
Tiago Yamamoto
8fbb54c977 refactor job posting routes and add dashboard job creation page 2026-02-17 09:42:31 -03:00
Tiago Yamamoto
77c8a86a0b docs: add Coolify API reference and update DNS records 2026-02-16 20:42:45 -06:00
Tiago Yamamoto
2e632a630b docs: add Cloudflare zone info and DNS management agent 2026-02-16 20:33:20 -06:00
Tiago Yamamoto
6d84b0fa4b
Merge pull request #67 from rede5/codex/definir-cobertura-de-testes-no-backend
Codex-generated pull request
2026-02-16 23:25:44 -03:00
Tiago Yamamoto
15b462b143 test: increase backend use case coverage 2026-02-16 23:25:26 -03:00
Tiago Yamamoto
d9cdec5884 fix: corrige erros de tipagem no build do frontend 2026-02-16 16:07:09 -06:00
Tiago Yamamoto
31bac38f19 fix: improve seeder Dockerfile healthcheck
- Add wget installation for healthcheck
- Increase healthcheck timeout to 10s
- Increase start-period to 10s
- Simplify to Node.js only (remove Go builder stage)
2026-02-16 11:44:02 -06:00
Tiago Yamamoto
e2b2f303e7 fix: replace readAt with read in notifications-dropdown
Align with Notification interface that uses 'read' boolean field
2026-02-16 09:24:15 -06:00