Commit graph

83 commits

Author SHA1 Message Date
Tiago Yamamoto
9ccb15882e feat: optimize jobs database querying and immutable indexes 2026-02-25 07:23:45 -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
59cd1fa01a feat: add pagination to candidates list endpoint
- Add PaginationInfo struct to candidates DTO
- Update ListCandidates service to support page/perPage params
- Update handler to parse pagination query params
- Update frontend candidates page with pagination controls
2026-02-23 18:02:41 -06:00
Tiago Yamamoto
fa1d397c01 fix: sync credentials services between backend and frontend
- Update ListConfiguredServices to use correct service names
- Add fcm_service_account, appwrite, smtp to BootstrapCredentials
- Remove unused payment_gateway from frontend schema
- Rename firebase to fcm_service_account in frontend
2026-02-23 16:20:25 -06:00
Tiago Yamamoto
74afffa4a9 feat: add category field to tickets system 2026-02-23 15:43:35 -06:00
Tiago Yamamoto
0876584499 feat(seeder): add realistic job templates with all new fields
Replace placeholder job data with 10 varied templates covering:
- employment_type (full-time, part-time, contract, dispatch)
- work_mode (remote, hybrid, onsite)
- salary_min/max, salary_type, currency (BRL/USD/EUR/GBP/JPY)
- salary_negotiable, language_level, visa_support
- date_posted, realistic descriptions and locations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 13:06:32 -06:00
Tiago Yamamoto
45659f4a76 fix(search): add companies JOIN to countQuery so keyword search works
The countQuery was missing LEFT JOIN companies c, causing a PostgreSQL
error when the search filter referenced c.name ILIKE. This made every
keyword search return a 500 error instead of results.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 13:02:29 -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
fb5aba4ed7 backend: suportar workMode em vagas e reforçar schema 2026-02-15 13:36:32 -03:00
GoHorse Deploy
694f6c3313 chore: commit pending changes 2026-02-15 16:03:40 +00: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
GoHorse Deploy
eb1276eac4 fix: restore frontend dependencies and update environment 2026-02-14 17:19:53 +00:00
Tiago Yamamoto
2fe7280600
Merge pull request #44 from rede5/claude/claude-md-mljq7u1y78t7vtbx-Oz1po
Add candidate profile management, password reset, and support features
2026-02-12 14:34:16 -03:00
GoHorse Deploy
1c29e469a7 fix: make migration 032 idempotent and fix UUID type in credentials bootstrap
- Migration 032: add NOT EXISTS check to avoid duplicate key violation
- CredentialsBootstrap: use NULLIF for updated_by UUID column, pass empty string instead of system_bootstrap
2026-02-07 17:22:15 +00:00
GoHorse Deploy
51f01dae6a fix(backend): use default RSA key if env var missing 2026-02-07 15:51:22 +00:00
NANDO9322
c97aeacf3b Merge branch 'dev' 2026-01-17 18:23:41 -03:00
NANDO9322
9a1fca0c36 feat: (TASK: Mudança na forma de operar os usuarios)
refatoração fluxo de vagas e correção login automático
- Frontend:
  - Implementa componente JobFormBuilder para perguntas dinâmicas
  - Atualiza página /post-job com fluxo de 3 etapas e integração do builder
  - Corrige payload de registro (auth.ts) enviando campo password corretamente
  - Implementa auto-login após cadastro da empresa (redirecionamento e token)
  - Remove páginas obsoletas de registro de candidato
- Backend:
  - Atualiza CreateCompanyUseCase para retornar token JWT
  - Ajusta JobService para persistência correta de campos JSON (Questions, Benefits)
  - Atualiza DTOs de Job e Company para refletir novas estruturas
  - Adiciona migração (033) para novas colunas de refatoração
  - Ajustes nos repositórios para suporte aos novos modelos
Ref: #refactor-jobs #fix-auth
2026-01-17 17:07:35 -03:00
NANDO9322
90967dd351 feat: add register no swaggger 2026-01-13 19:57:53 -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
6c178946cc resolve bug cloudflare 2026-01-08 18:22:25 -03:00
NANDO9322
b17523eb0c Merge branch 'task5' into dev: resolved conflicts 2026-01-08 18:01:08 -03:00
NANDO9322
4ba3957b50 Merge branch 'dev' into task5: resolved conflicts 2026-01-08 17:57:06 -03:00
NANDO9322
ad558bc656 feat: melhorias na gestão de empresas e correções de persistência
- Backend: Correção na persistência do email da empresa (CreateCompanyUseCase) e suporte a exclusão em cascata (Cascade Delete) para evitar erro 500.
- Backend: Adicionado suporte completo para Phone, Website, Address, Description e Slug na criação.
- Backend: Correção crítica no JobService para ocultar nome de candidatos na listagem de vagas.
- Frontend: Adição da coluna 'Email' na listagem de empresas e padronização dos ícones de ação.
- Frontend: Inclusão de novas chaves de tradução (i18n) e melhorias no modal de criação.
2026-01-08 17:14:41 -03:00
NANDO9322
aff4dcc41f fix: ajuste cadastro de candidato 2026-01-08 11:12:17 -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
Yamamoto
70aa9c8389 fix: resolve redeclared variable in ticket_service.go 2026-01-04 12:44:27 -03:00
Tiago Yamamoto
b1107864b5 Add payment gateway configs and lock credentials 2026-01-03 20:28:21 -03:00
Tiago Yamamoto
aeb57f325a Fix profile updates, avatar upload, and settings 2026-01-03 20:21:29 -03:00
Tiago Yamamoto
1ad571e1c1 Allow admins to access ticket details 2026-01-03 19:41:44 -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
2e7da0b28e feat: add backoffice credentials page and backend support 2025-12-31 16:13:27 -03:00
Tiago Yamamoto
a5323a4eaf fix(backend): fix AdminService tests and expand CoreHandlers coverage 2025-12-28 02:32:57 -03:00
Tiago Yamamoto
6c87078200 test: increase backend test coverage - sanitizer, middleware, handlers, services
- Add tests for SanitizeEmail, SanitizeDescription, DefaultSanitizer
- Add AuthMiddleware and RequireRole tests
- Add admin_handlers_test.go and location_handlers_test.go
- Expand application_service_test.go with more methods
2025-12-28 01:48:12 -03:00
Tiago Yamamoto
1e30f57705 test: add new NotificationService instantiation test 2025-12-28 01:34:07 -03:00
Tiago Yamamoto
a5bb7b2a31 feat: add backend tests to CI pipeline, improve responsive design, add unit tests
- Add test-backend job to .forgejo/workflows/deploy.yaml
- Fix JobService and TicketService tests
- Create ticket_service_test.go
- Create frontend unit tests (forgot-password, jobs/[id], dashboard/users)
- Improve responsiveness for users page, forgot-password, and apply page
2025-12-28 01:27:48 -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
cca951ca23 feat: add currency, salary period, and rich text description
Frontend:
- Added currency selector (BRL, USD, EUR, JPY, GBP, CNY, AED, CAD, AUD, CHF)
- Added salary period dropdown (hourly, daily, weekly, monthly, yearly)
- Created RichTextEditor component for job descriptions (Bold, Lists, Alignment)
- Updated confirmation step to display currency symbol and period label

Backend:
- JobService now persists currency in job creation
- Extended currency validation in DTOs

Seeder:
- Already includes currency in job insertion
2025-12-26 15:37:54 -03:00
Tiago Yamamoto
91e4417c95 feat: add working hours and salary negotiable logic
Backend:
- Updated DTOs to include SalaryNegotiable and WorkingHours
- Updated JobService to map and persist these fields (CREATE, GET, UPDATE)
- Ensure DB queries include new columns

Frontend:
- Added 'Working Hours' (Jornada de Trabalho) dropdown to PostJobPage
- Updated state and submit logic
- Improved salary display in confirmation step

Seeder:
- Updated jobs seeder to include salary_negotiable and valid working_hours
2025-12-26 15:29:51 -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
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