Commit graph

56 commits

Author SHA1 Message Date
GoHorse Deploy
566ee2dc03 fix: add missing imports in router.go and correct FCM multicast method 2026-03-07 19:11:03 -03:00
GoHorse Deploy
689b794432 feat: implement LavinMQ messaging and background FCM notification worker 2026-03-07 18:49:33 -03:00
Redbull Deployer
2bfe3b7173 feat: add test connection feature for all external services
# Conflicts:
#	frontend/src/lib/api.ts
2026-03-07 12:12:05 -06:00
Tiago Yamamoto
8ee0d59a61 feat: fix seeder password hashing, add custom questions, navbar/footer on register, payment handler
- fix(seeder): add PASSWORD_PEPPER to all bcrypt hashes (admin + candidates/recruiters)
- fix(seeder): add created_by field to jobs INSERT (was causing NOT NULL violation)
- feat(backend): add custom job questions support in applications
- feat(backend): add payment handler and Stripe routes
- feat(frontend): add navbar and footer to /register and /register/user pages
- feat(frontend): add custom question answers to job apply page
- feat(frontend): update home page hero section and navbar buttons
- feat(frontend): update auth/api lib with new endpoints
- chore(db): add migration 045 for application answers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 20:26:49 -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
Tiago Yamamoto
4544a1d5b2 Align backend company registration and notification routes with frontend 2026-02-15 13:16:37 -03:00
Tiago Yamamoto
d7be83f1f0 feat(backend): add missing storage routes and job datePosted support 2026-02-14 21:16:12 -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
Rede5
948858eca0 fix: resolve remaining merge conflicts 2026-02-14 17:21:10 +00:00
NANDO9322
c97aeacf3b Merge branch 'dev' 2026-01-17 18:23:41 -03:00
NANDO9322
8f331c97d3 feat(backoffice): Implementa gestão de credenciais e novas abas administrativas
BACKEND:
- Implementa [CredentialsHandler](cci:2://file:///C:/Projetos/gohorsejobs/backend/internal/api/handlers/credentials_handler.go:9:0-11:1) e rotas /api/v1/system/credentials para gestão segura de chaves.
- Adiciona criptografia RSA no [CredentialsService](cci:2://file:///C:/Projetos/gohorsejobs/backend/internal/services/credentials_service.go:17:0-22:1) para proteger chaves de API (Stripe, Cloudflare, etc).
- Automatiza geração de pares de chaves RSA no .env via script.

FRONTEND:
- Refatora /dashboard/backoffice organizando em Abas: Dashboard, Planos, Stripe e Sistema.
- Implementa CRUD completo para gestão de Planos (criar, editar, remover).
- Adiciona visualização de status do Stripe e botão para limpar cache Cloudflare.
- Ajusta formatação de data nos logs para fuso horário America/Sao_Paulo.
- Atualiza pi.ts para suportar novos endpoints de planos e credenciais.
2026-01-09 17:18:51 -03:00
NANDO9322
c339c3fbaf feat(backoffice): corrige erro 500 e implementa seeder de banco
- Remove marcadores de conflito git em admin_service que causavam erro 500 em ListCompanies.
- Implementa SeederService no backend Go com streaming SSE para logs em tempo real.
- Expõe endpoints: GET /api/v1/seeder/seed/stream e POST /api/v1/seeder/reset.
- Atualiza config do frontend para apontar URL do seeder para a API backend.
- Corrige erros de sintaxe na UI do dashboard Backoffice e implementa busca de estatísticas.
- Garante lógica correta de UPSERT no seeder (RETURNING id) usando colunas 'identifier' e 'full_name' para evitar abortar transações.
- Corrige constraint de role em user_companies no seeder para usar 'admin'.
2026-01-09 12:21:56 -03:00
NANDO9322
a199438e53 ajuste ip 2026-01-08 20:37:07 -03:00
NANDO9322
ddc2f5dd03 feat: atualiza fluxo de cadastro de candidatos com persistência completa de dados e máscara de telefone
Frontend:
- Implementar máscara de entrada de telefone para números BR ((XX) XXXXX-XXXX).
- Atualizar formulário de cadastro para enviar dados completos do perfil do candidato (endereço, formação, habilidades, etc.).
- Corrigir problemas de idioma misto na página de Detalhes da Vaga e adicionar traduções faltantes.

Backend:
- Atualizar modelo de Usuário, Entidade e DTOs para incluir campos de perfil (Data de Nascimento, Endereço, Formação, etc.).
- Atualizar UserRepository para persistir e recuperar os dados estendidos do usuário no PostgreSQL.
- Atualizar RegisterCandidateUseCase para mapear campos de entrada para a entidade Usuário.
2026-01-06 18:19:47 -03:00
Tiago Yamamoto
aeb57f325a Fix profile updates, avatar upload, and settings 2026-01-03 20:21:29 -03:00
Yamamoto
3cd52accfb feat: infrastructure updates, storage verification, and superadmin reset
1. Auth: Implemented forced password reset for SuperAdmin and updated login logic.

2. Infra: Switched backend to internal Postgres and updated .drone.yml.

3. Storage: Added Test Connection endpoint and UI in Backoffice.

4. CI/CD: Updated Forgejo deploy pipeline to include Seeder and use Internal Registry.
2026-01-02 16:36:31 -03:00
Tiago Yamamoto
6cd8c02252 feat: add test coverage and handler improvements
- Add new test files for handlers (storage, payment, settings)
- Add new test files for services (chat, email, storage, settings, admin)
- Add integration tests for services
- Update handler implementations with bug fixes
- Add coverage reports and test documentation
2026-01-02 08:50:29 -03:00
Tiago Yamamoto
c26ad578b9 feat: migrate credentials management to backoffice nestjs 2025-12-31 16:25:32 -03:00
Tiago Yamamoto
e637117f40 feat(security): migrate auth to httpOnly cookies - Frontend: remove localStorage tokens, use sessionStorage for user data, add credentials include - Backend: add logout endpoint to clear cookie 2025-12-31 15:16:45 -03:00
Tiago Yamamoto
9d19751acb Resolve merge conflicts in backend, backoffice, and frontend 2025-12-27 21:45:48 -03:00
Tiago Yamamoto
b23393bf35 feat: implement stripe subscriptions, google analytics, and user crud
- Backend:
  - Add Stripe subscription fields to companies (migration 019)
  - Implement Stripe Checkout and Webhook handlers
  - Add Metrics API (view count, recording)
  - Update Company and Job models
- Frontend:
  - Add Google Analytics component
  - Implement User CRUD in Backoffice (Dashboard)
  - Add 'Featured' badge to JobCard
- Docs: Update Roadmap and artifacts
2025-12-27 12:06:54 -03:00
Tiago Yamamoto
63023b922f feat(notifications): implementar sistema de notificações e FCM
- Migration 017: tabelas notifications e fcm_tokens
- Models: Notification, FCMToken
- NotificationService: CRUD, push notifications helper
- FCMService: Firebase Cloud Messaging integration
- NotificationHandler: endpoints REST
- Rotas autenticadas: /api/v1/notifications/*

Endpoints:
- GET /api/v1/notifications
- GET /api/v1/notifications/unread-count
- PUT /api/v1/notifications/read-all
- PUT /api/v1/notifications/{id}/read
- DELETE /api/v1/notifications/{id}
- POST /api/v1/notifications/fcm-token
- DELETE /api/v1/notifications/fcm-token
2025-12-27 11:24:27 -03:00
Tiago Yamamoto
9ee9f6855c feat: implementar múltiplas features
Backend:
- Password reset flow (forgot/reset endpoints, tokens table)
- Profile management (PUT /users/me, skills, experience, education)
- Tickets system (CRUD, messages, stats)
- Activity logs (list, stats)
- Document validator (CNPJ, CPF, EIN support)
- Input sanitizer (XSS prevention)
- Full-text search em vagas (plainto_tsquery)
- Filtros avançados (location, salary, workMode)
- Ordenação (date, salary, relevance)

Frontend:
- Forgot/Reset password pages
- Candidate profile edit page
- Sanitize utilities (sanitize.ts)

Backoffice:
- TicketsModule proxy
- ActivityLogsModule proxy
- Dockerfile otimizado (multi-stage, non-root, healthcheck)

Migrations:
- 013: Profile fields to users
- 014: Password reset tokens
- 015: Tickets table
- 016: Activity logs table
2025-12-27 11:19:47 -03:00
Tiago Yamamoto
786ef42d8a feat: add complete support ticket CRUD operations
Backend Service:
- UpdateTicket: update status/priority (owner or admin)
- CloseTicket: convenience method to set status=closed
- DeleteTicket: admin only, removes ticket and messages
- ListAllTickets: admin only, with optional status filter

Handlers:
- PATCH /api/v1/support/tickets/{id} - update ticket
- PATCH /api/v1/support/tickets/{id}/close - close ticket
- DELETE /api/v1/support/tickets/{id} - delete ticket (admin)
- GET /api/v1/support/tickets/all - list all tickets (admin)

All endpoints with Swagger annotations
2025-12-26 16:16:05 -03:00
Tiago Yamamoto
fb79e987bb feat: add location selector and contract types
Backend:
- Created LocationHandler, LocationService, LocationRepository
- Added endpoints: GET /api/v1/locations/countries, states, cities, search
- Added migration 029_expand_employment_types.sql with new contract types (permanent, training, temporary, voluntary)
- Fixed .gitignore to allow internal/api folder

Frontend:
- Created LocationPicker component with country dropdown and city/state autocomplete search
- Integrated LocationPicker into PostJobPage
- Updated contract type options in job form (Permanent, Contract, Training, Temporary, Voluntary)
- Added locationsApi with search functionality to api.ts
2025-12-26 15:18:16 -03:00
Tiago Yamamoto
e5d0cd483a feat: Implement Dynamic Credentials Management
Backend:
- Added GET /api/v1/system/credentials to list configured services
- Added DELETE /api/v1/system/credentials/{service}
- Updated CredentialsService to support listing without revealing secrets

Frontend:
- Updated Settings page with Tabs
- Added 'Integrations' tab to manage credentials
- Allows Configuring (Update) and Deleting credentials
- Lists status of Appwrite, Stripe, Firebase, etc.
2025-12-26 14:43:35 -03:00
Tiago Yamamoto
90a5f7b2a6 fix: Add /api/v1/auth/register/company route for public job posting
Added route aliases:
- POST /api/v1/auth/register/candidate
- POST /api/v1/auth/register/company

These maintain consistency with the /post-job frontend page
2025-12-26 12:54:37 -03:00
Tiago Yamamoto
841b1d780c feat: Email System, Avatar Upload, Email Templates UI, and Public Job Posting
- Backend: Email producer (LavinMQ), EmailService interface
- Backend: CRUD API for email_templates and email_settings
- Backend: avatar_url field in users table + UpdateMyProfile support
- Backend: StorageService for pre-signed URLs
- NestJS: Email consumer with Nodemailer and Handlebars
- Frontend: Email Templates admin pages (list/edit)
- Frontend: Updated profileApi.uploadAvatar with pre-signed URL flow
- Frontend: New /post-job public page (company registration + job creation wizard)
- Migrations: 027_create_email_system.sql, 028_add_avatar_url_to_users.sql
2025-12-26 12:21:34 -03:00
Tiago Yamamoto
b1639dbcd8 Implement secure Stripe credential management using RSA encryption 2025-12-26 11:03:52 -03:00
Tiago Yamamoto
722e72cdbd Implement FCM Token Management (DB, Backend, Frontend, Backoffice) 2025-12-26 10:41:50 -03:00
Tiago Yamamoto
ee5a680468 Add missing CRUD routes: Companies GET by ID, Support Tickets 2025-12-26 10:20:38 -03:00
Tiago Yamamoto
e0b16e5b29 Fix profile 404/500 and user deletion 403 2025-12-26 09:55:19 -03:00
Tiago Yamamoto
3fa875ed98 feat: implemented delete application endpoint and dashboard action 2025-12-26 01:29:31 -03:00
Tiago Yamamoto
7b76b62490 feat(backoffice): implemented edit and delete company functionality 2025-12-26 01:23:01 -03:00
Tiago Yamamoto
49fdcd0168 fix(router): allow public access to tags api for recruiters 2025-12-24 19:51:52 -03:00
Tiago Yamamoto
bb970f4a74 fix(backend): resolve 500 errors on jobs, notifications and secure routes
- Fix CreateJob 500 error by extracting user ID correctly
- Secure Create/Update/Delete Job routes with AuthGuard
- Fix Notifications/Tickets/Profile 500 error (UUID vs Int mismatch)
- Add E2E test for CreateJob
2025-12-24 17:48:06 -03:00
Tiago Yamamoto
1d79276e13 fix(backend): consolidated duplicate routes, fixed E2E tests for UUIDs and paths 2025-12-24 13:42:45 -03:00
Tiago Yamamoto
02f35b46b6 feat: implement dynamic dashboard, auth hardening (pepper/httponly) and backend tests 2025-12-24 01:30:33 -03:00
Tiago Yamamoto
0f2aae3073 fix(backoffice): force 0.0.0.0 binding to resolve deployment crash
refactor(backend): consolidate admin routes and implement RBAC

feat(frontend): update api client to use consolidated routes
2025-12-24 00:59:33 -03:00
Tiago Yamamoto
6bb90bdd1c fix: add missing /api/v1/notifications route to router 2025-12-23 23:46:18 -03:00
Tiago Yamamoto
78ce341370 feat: Implement Ticket System, Profile Page integration, and fix migrations 2025-12-23 19:22:55 -03:00
Tiago Yamamoto
ce0531fefc feat: connect registration and jobs to real API
Backend fixes:
- Fix FK violation in candidate registration by creating company first
- Add CompanyRepository to RegisterCandidateUseCase
- Add handler integration tests for validation

Frontend improvements:
- Add registerCompany function in auth.ts
- Connect company registration form to backend API
- Replace mockJobs with API call in job detail page
- Add loading/error states to job detail page
- Add Jest tests for auth module
2025-12-23 08:19:49 -03:00
Tiago Yamamoto
b09bd023ed feat: security refactor, server-side pagination, and docs update
- impl(frontend): server-side pagination for jobs listing
- impl(frontend): standardized api error handling and sonner integration
- test(frontend): added unit tests for JobCard
- impl(backend): added SanitizeMiddleware for XSS protection
- test(backend): added table-driven tests for JobService
- docs: updated READMES, created ROADMAP.md and DATABASE.md
- fix(routing): redirected landing page buttons to /jobs
2025-12-23 00:50:51 -03:00
Tiago Yamamoto
743b2842c0 feat: Enhance platform with funny jobs, FAQ, Skeleton UI, and Tests 2025-12-22 23:48:56 -03:00
Tiago Yamamoto
e71fc361ac Add dynamic candidate management data 2025-12-22 19:18:15 -03:00
Tiago Yamamoto
58cfd76675 Add admin backoffice routes and dashboard 2025-12-22 16:37:05 -03:00
Tiago Yamamoto
720eda91c7 fix(router): add /api/v1 prefix to jobs and applications routes 2025-12-15 13:42:50 -03:00
Tiago Yamamoto
ce31ab8e67 feat(migration): move admin cloudflare routes to backoffice and cleanup backend 2025-12-15 10:52:40 -03:00
Tiago Yamamoto
361d36dc38 feat: customize api root response and update dev ingress host
- Update root handler to return server public IP via ipify
- Update root handler response JSON structure
- Update ingress host to api-dev.gohorsejobs.com
- Add unit tests for router
2025-12-14 15:19:18 -03:00
Tiago Yamamoto
b2284921ea feat: add Cloudflare and cPanel admin routes
Cloudflare Cache Management:
- GET /api/v1/admin/cloudflare/zones
- POST /api/v1/admin/cloudflare/cache/purge-all
- POST /api/v1/admin/cloudflare/cache/purge-urls
- POST /api/v1/admin/cloudflare/cache/purge-tags
- POST /api/v1/admin/cloudflare/cache/purge-hosts

cPanel Email Management:
- GET /api/v1/admin/cpanel/emails
- POST /api/v1/admin/cpanel/emails
- DELETE /api/v1/admin/cpanel/emails/{email}
- PUT /api/v1/admin/cpanel/emails/{email}/password
- PUT /api/v1/admin/cpanel/emails/{email}/quota

All routes protected by JWT auth middleware.
Added CLOUDFLARE_* and CPANEL_* env vars to .env.example
2025-12-14 10:11:36 -03:00