Commit graph

271 commits

Author SHA1 Message Date
Tiago Yamamoto
2b98552658 feat(dashboard): rewrite jobs/new with all backend fields and location autocomplete
- Add workMode, languageLevel, visaSupport, salaryNegotiable to form
- Add all 10 currency options and all 8 employment types (including dispatch/voluntary)
- Add status selector (draft/review/open/paused/closed)
- Add location autocomplete with country dropdown and city/region search
- Add application channel (email/url/phone) with conditional inputs
- Add resumeRequirement selector and requirements map in payload
- Load companies via adminCompaniesApi (no registration — user is already logged in)
- Extend CreateJobPayload type with workMode, cityId, regionId, languageLevel,
  visaSupport, requirements, expanded currency and status options

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 12:58:03 -06:00
Tiago Yamamoto
edc1b76cfd refactor(routes): remove /publicar-vaga and /register/job
Both routes are fully replaced by /jobs/new. Deleted directories entirely
instead of keeping redirects.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 12:51:57 -06:00
Tiago Yamamoto
878a987749 refactor(routes): redirect /register/job to /jobs/new
Consolidates the two public job posting routes into the single canonical
flow at /jobs/new. The /publicar-vaga route already redirected there.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 12:50:51 -06:00
Tiago Yamamoto
3a26af3df5 fix: global document and phone handling — remove Brazil-specific formatting
Frontend (jobs/new):
- Replace isValidCNPJ (checksum algorithm) with isValidDocument: accepts
  any tax document with 5–30 alphanumeric chars (CNPJ, EIN, VAT, etc.)
- Add cleanPhone(): strips formatting chars (dashes, spaces, parens) and
  keeps only digits + optional leading '+'; replaces cleanDigits+prepend
- Phone sent as '+5511999998888' if user typed '+55...', or '11999998888'
  if no country code was provided — no '+' blindly prepended anymore
- Company document sent stripped of all non-alphanumeric before API call
- Update label placeholder from '00.000.000/0000-00' to 'CNPJ, EIN, VAT...'
- Rename error key invalidCnpj → invalidDocument in all 3 locales (pt, en, es)

Backend (create_company use case):
- Add SanitizePhone() to utils/sanitizer.go: strips all non-digit chars
  except a leading '+'; '(11) 99999-8888' → '11999998888'
- Apply SanitizePhone to input.Phone before persisting to DB

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 12:46:54 -06:00
Tiago Yamamoto
fd085ec193 feat(jobs/new): location autocomplete using /api/v1/locations/search
- Replace free-text location input with debounced autocomplete
- On country select, fetch its numeric ID from /api/v1/locations/countries
  and use it to scope the search results to that country
- Typing ≥2 chars in location field triggers GET /api/v1/locations/search
  with 350ms debounce; results show city (blue) and state (green) badges
- On result selection, stores cityId + regionId and sets the display label
  to "Name, Region" format; IDs are included in the job creation payload
- Spinner shown while searching; dropdown closes on outside click / select
- CEP search button preserved alongside the autocomplete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 12:39:46 -06:00
Tiago Yamamoto
2686b69506 feat(jobs/new): add user account registration and fix companyId in job payload
- Add password + confirm-password fields to billing step (Step 3) so the
  recruiter creates their account credentials during the job posting flow
- Validate password length (≥8) and confirmation match before proceeding
- Extract company `id` from POST /auth/register/company response and send
  it as `companyId` in the job creation payload (was missing — caused 400)
- Pass `contact` (full name) to company registration endpoint
- Remove hardcoded "Temp@123456" password; use the user-provided one
- Remove hardcoded "+55" phone prefix; send raw digits with "+" prefix
- Add translations (pt-BR, en, es) for password fields and error messages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 12:32:55 -06:00
Tiago Yamamoto
d7b03dad19 docs: add AI context rules and missing READMEs 2026-02-21 13:33:36 -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
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
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
a6c5bae22d fix(frontend): ajustar idiomas e layout da página de publicar vaga 2026-02-17 18:48:04 -03:00
Tiago Yamamoto
c121132f1a feat(frontend): turn more jobs section into carousel 2026-02-17 18:37:24 -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
f39dc503d5 fix(frontend): apply jobs query filters and preserve search layout 2026-02-17 18:11:05 -03: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
8fbb54c977 refactor job posting routes and add dashboard job creation page 2026-02-17 09:42:31 -03:00
Tiago Yamamoto
d9cdec5884 fix: corrige erros de tipagem no build do frontend 2026-02-16 16:07:09 -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
Tiago Yamamoto
bf14357285 fix: align Notification interface between api.ts and types.ts
- Add 'read' field to Notification interface in api.ts
- Remove duplicate Notification interface in candidate-dashboard.tsx
- Import Notification type from api.ts to ensure consistency
2026-02-16 09:05:48 -06:00
Tiago Yamamoto
11e0deef2a fix: resolve build errors for Coolify deployment
- Frontend: Remove duplicate useState import in applications page
- Backoffice: Install devDependencies during build for nest CLI
- Seeder: Fix healthcheck port to match app port (8080)
- Add Coolify CI/CD workflow for automatic deployment on push to dev
- Update DEVOPS.md with Coolify environment documentation
2026-02-16 08:42:29 -06:00
Tiago Yamamoto
6ec54460f8 docs: unify documentation structure
- Create docs/AGENTS.md for AI assistants context
- Create docs/WORKFLOWS.md consolidating deployment workflows
- Remove redundant docs/root/ folder
- Remove .agent/ folder (consolidated into docs/)
- Update dates in all documentation files
- Simplify README.md documentation section
2026-02-16 05:57:02 -06:00
Tiago Yamamoto
6fbd1f5ffc feat: implement full auth system with HTTPOnly cookies + JWT, fix migrations to UUID v7, remove mock data from frontend
Backend:
- Fix migrations 037-041 to use UUID v7 (uuid_generate_v7)
- Fix CORS defaults to include localhost:8963
- Fix FRONTEND_URL default to localhost:8963
- Update superadmin password hash with pepper
- Add PASSWORD_PEPPER environment variable

Frontend:
- Replace mockJobs with real API calls in home page
- Replace mockNotifications with notificationsApi in context
- Replace mockApplications with applicationsApi in dashboard
- Fix register/user page to call real registerCandidate API
- Fix hardcoded values in backoffice and messages pages

Auth:
- Support both HTTPOnly cookie and Bearer token authentication
- Login returns token + sets HTTPOnly cookie
- Logout clears HTTPOnly cookie
- Token valid for 24h
2026-02-16 05:20:46 -06:00
GoHorse Deploy
a3c2a18e61 Merge branch 'dev' of github.com:rede5/gohorsejobs into dev 2026-02-15 14:20:28 +00:00
Tiago Yamamoto
bbb7ecb462 Fix homepage card layout at medium-large breakpoints 2026-02-14 21:02:40 -03:00
Tiago Yamamoto
325a6efd71 Restaura fluxo Careerjet em 4 etapas no layout solicitado 2026-02-14 20:56:32 -03:00
Tiago Yamamoto
49d761cad8 feat: unificar campos de register job em publicar vaga 2026-02-14 20:33:54 -03:00
GoHorse Deploy
2a66e2888a Merge branch 'main' of github.com:rede5/gohorsejobs into dev 2026-02-14 21:58:08 +00:00
Tiago Yamamoto
83ed28a1fe feat(post-job): avançar checklist com status pós-pagamento e comprovante 2026-02-14 17:35:18 -03:00
Tiago Yamamoto
66c35ac6c5 feat(post-job): advance billing and payment flow parity 2026-02-14 17:30:37 -03:00
Tiago Yamamoto
01e7a3b920 feat(post-job): add preview and billing step to publish flow 2026-02-14 17:21:52 -03:00
Tiago Yamamoto
68e7db5e40 feat(post-job): add careerjet-style publication fields and validations 2026-02-14 17:14:15 -03:00
GoHorse Deploy
ae475e41a9 feat: implement careerjet gap analysis improvements
- Video Interview system (backend + frontend)
- Date Posted filter (24h, 7d, 30d)
- Company filter in jobs listing
- Recent searches persistence (LocalStorage)
- Job Alerts with email confirmation
- Favorite jobs with API
- Company followers system
- Careerjet URL compatibility (s/l aliases)
2026-02-14 19:37:25 +00:00
Tiago Yamamoto
66eb34a35b chore: update pnpm lockfiles for CI frozen installs 2026-02-14 15:57:54 -03:00
Tiago Yamamoto
5d2712f216 Ajusta colunas da home para evitar cards comprimidos 2026-02-14 15:51:43 -03:00
Tiago Yamamoto
b41bf56585 Refine migrations flow and lint tooling across apps 2026-02-14 15:42:40 -03:00
Tiago Yamamoto
b166ff440a Add Careerjet-compatible job search params and gap analysis 2026-02-14 15:12:04 -03:00
GoHorse Deploy
ed982caccc merge: resolve conflicts by accepting dev changes 2026-02-14 17:38:47 +00:00
Rede5
472ccc95e2 fix: resolve all merge conflicts in backend 2026-02-14 17:12:56 +00:00
Tiago Yamamoto
5884148f9f refactor(frontend): improve home visual hierarchy and responsiveness 2026-02-12 20:24:54 -03:00
Tiago Yamamoto
3ac4bc5fd5 chore: remove docker compose artifacts and references 2026-02-12 20:06:40 -03:00
Gabbriiel
f700dd075c Merge branch 'dev' of https://github.com/rede5/gohorsejobs into dev 2026-02-12 19:10:31 -03:00
Gabbriiel
1d8fe78697 docs: move diagrama de arquitetura para STATUS_REPORT.md 2026-02-12 19:09:41 -03:00
Tiago Yamamoto
e728a91deb docs(frontend): add design system guide for consistent UI changes 2026-02-12 16:34:19 -03:00
GoHorse Deploy
1569deb1ce Update infrastructure and frontend configuration 2026-02-11 13:24:12 +00:00
Tiago Yamamoto
5f984af73b Add architecture and frontend documentation anchors 2026-02-09 22:14:36 -03:00
GoHorse Deploy
5291f3f15d chore: database reset, frontend API configuration 2026-02-09 14:11:05 +00:00