Commit graph

28 commits

Author SHA1 Message Date
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
3011a725e1 ajuste ip 2026-01-08 20:50:38 -03:00
Tiago Yamamoto
b1107864b5 Add payment gateway configs and lock credentials 2026-01-03 20:28:21 -03:00
Yamamoto
fee83f52f6 feat(backoffice): standardize root response root json format 2026-01-02 19:50:47 -03:00
Tiago Yamamoto
d79fa8e97a feat: increase test coverage backend/frontend and setup e2e 2026-01-01 10:54:58 -03:00
Tiago Yamamoto
c26ad578b9 feat: migrate credentials management to backoffice nestjs 2025-12-31 16:25:32 -03:00
Tiago Yamamoto
93367d7cd6 test(backoffice): add unit tests for StripeService
- Add 8 test cases covering all StripeService methods
- Mock Stripe SDK for isolated testing
- Test createCustomer, createSubscription, cancelSubscription
- Test listSubscriptions, createCheckoutSession, createBillingPortalSession
- Test constructWebhookEvent and onModuleInit
2025-12-28 11:03:58 -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
03827302e5 Add Stripe controller routes and full Plans CRUD in backoffice 2025-12-26 10:30:10 -03:00
Tiago Yamamoto
340911b4d1 feat(auth): add cookie parsing and JWT auth guard to backoffice
- Add JWT auth guard with Bearer token and cookie support
- Update .env.example files with PASSWORD_PEPPER documentation
- Update seeder to use PASSWORD_PEPPER for password hashing
- Update seeder README with hash verification examples
- Fix frontend auth and page components
- Update backend JWT service and seed migration
2025-12-24 10:27:04 -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
6a1bdefc4b feat(backoffice): add status endpoint at root and move swagger to /docs 2025-12-24 00:11:18 -03:00
Tiago Yamamoto
ae7003d3fa feat(backoffice): add CORS_ORIGINS env var support 2025-12-24 00:03:52 -03:00
Tiago Yamamoto
60a32120e2 refactor(backoffice): rename PORT to BACKOFFICE_PORT and HOST to BACKOFFICE_HOST 2025-12-23 23:59:52 -03:00
Tiago Yamamoto
c6f7f41452 feat(backoffice): migrate to Fastify adapter with pnpm, Pino logging, and ultra-optimized Dockerfile 2025-12-23 23:44:02 -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
3be9807d88 chore: formatting updates and lockfile changes 2025-12-15 10:40:55 -03:00
Tiago Yamamoto
5c45557537 fix(backoffice): resolve eslint errors (async/await usage and floating promises) 2025-12-15 10:35:15 -03:00
Tiago Yamamoto
ee8ed3f1f3 fix(security): 🔒 fixed Next.js vulnerability and Stripe API version 2025-12-15 09:52:43 -03:00
Tiago Yamamoto
072b78c7f5 chore(backoffice): 🎉 backoffice ready for action 2025-12-15 09:44:26 -03:00
Tiago Yamamoto
a0e6f0e58b feat(swagger): 📚 added Swagger docs at /api/docs 2025-12-15 09:44:24 -03:00
Tiago Yamamoto
9b8d1e0458 feat(core): 🔗 wired all modules together 2025-12-15 09:44:22 -03:00
Tiago Yamamoto
73e6b2b310 feat(admin): 👑 added admin dashboard with stats 2025-12-15 09:44:21 -03:00
Tiago Yamamoto
38acc0e670 feat(plans): 📋 added subscription plans (Starter/Pro/Enterprise) 2025-12-15 09:44:20 -03:00
Tiago Yamamoto
7132b0cb67 feat(stripe): 💳 added Stripe integration for payments 2025-12-15 09:44:19 -03:00