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
b79566aad7
docs: update backend api docs and swagger
2025-12-28 00:29:34 -03:00
Tiago Yamamoto
2217755478
docs: fix mermaid diagram syntax in backend readme
2025-12-27 23:42:42 -03:00
Tiago Yamamoto
e6131dfe33
docs: adjust deploy runner info to 'docker' in backend readme
2025-12-27 23:19:55 -03:00
Tiago Yamamoto
7783c9a0dc
docs: add troubleshooting section and update workflow runner label
2025-12-27 23:11:08 -03:00
Tiago Yamamoto
c651cbda1d
docs/ci: move workflow to .forgejo and add architecture diagram
2025-12-27 23:02:54 -03:00
Tiago Yamamoto
0bc1c27ef6
docs: update backend documentation with deployment and new services
2025-12-27 22:58:23 -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
4712193ade
docs: add Swagger annotations for Company UPDATE and DELETE endpoints
...
- PATCH /api/v1/companies/{id} - Update Company
- DELETE /api/v1/companies/{id} - Delete Company
- Both endpoints require admin authentication
2025-12-26 16:08:26 -03:00
Tiago Yamamoto
249081554d
feat: add company profile fields
...
Backend:
- Created migration 031 for employee_count and founded_year
- Updated Company model with EmployeeCount and FoundedYear
- Updated core DTO with website, employeeCount, foundedYear, description
Frontend:
- Added website input field to company form
- Added employee count dropdown (1-10, 11-50, etc.)
- Added founded year input
- Added 'About Company' rich text editor
- Updated API payload to send new fields
2025-12-26 15:48:13 -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
d6bb579260
feat: add salary options with toggle and candidate proposal
...
Backend:
- Added migration 030_add_salary_negotiable.sql
- Added SalaryNegotiable field to Job model
Frontend:
- Updated PostJobPage with salary mode toggle (fixed/range)
- Added 'Candidato envia proposta' checkbox to hide salary
- Updated job submission logic and confirmation display
2025-12-26 15:23:22 -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
6c5b7586c9
docs: Comprehensive BACKEND.md update with all services, endpoints, and integrations
2025-12-26 12:35:13 -03:00
Tiago Yamamoto
06924383bb
chore: Remove compiled binary from repo and add to .gitignore
2025-12-26 12:24:44 -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
7a1d0417bc
Fix ListUsers 500 query error (use tenant_id instead of company_id)
2025-12-26 10:48:11 -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
d61b4db69a
Regenerate Swagger docs with DeleteApplication route
2025-12-26 10:15:31 -03:00
Tiago Yamamoto
fb98016afc
Refactor RBAC: Admin sees only their company data, Superadmin sees all
2025-12-26 10:05:57 -03:00
Tiago Yamamoto
f9c9293a19
Fix undefined middleware.GetRequestID in backend
2025-12-26 09:58:33 -03:00
Tiago Yamamoto
e0b16e5b29
Fix profile 404/500 and user deletion 403
2025-12-26 09:55:19 -03:00
Tiago Yamamoto
f51a8dd99c
fix: resolved user profile 500 error, fixed frontend build types, enhanced logging, increases test coverage
2025-12-26 01:35:34 -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
43c0719664
feat(users): add company selection and status to create user modal
2025-12-26 01:18:14 -03:00
Tiago Yamamoto
6ab7e357fb
fix(users): resolve 403 on update and enable role/status editing
2025-12-26 01:14:18 -03:00
Tiago Yamamoto
eae3df7f38
fix(cors): add PATCH to allowed methods
...
Without PATCH in CORS headers, user update was failing with:
'Method PATCH is not allowed by Access-Control-Allow-Methods'
2025-12-26 00:59:04 -03:00
Tiago Yamamoto
73967ca52b
fix(users): allow superadmin to list all users without tenant restriction
...
- Modified ListUsers handler to check for admin/superadmin role
- Superadmins can now list all users across tenants
- Added ListUsers method to AdminService
- Added Status field to dto.User
Fixes 403 error when superadmin tries to access /api/v1/users
2025-12-26 00:51:54 -03:00
Tiago Yamamoto
f396acfb72
debug: add RBAC logging to RequireRoles middleware
2025-12-26 00:42:55 -03:00
Tiago Yamamoto
01aca8971b
fix(auth): include legacy role column in getRoles query
...
The superadmin role was stored in users.role column but getRoles()
only checked user_roles table. Updated to use UNION query that
combines both sources for backward compatibility.
Fixes 403 Forbidden on /api/v1/users for admin users.
2025-12-25 23:20:22 -03:00
Tiago Yamamoto
930c57a9c7
debug(backend): add console logging to job creation endpoint
...
- Added debug logging to job_handler.go CreateJob
- Added debug logging to job_service.go CreateJob
- Tracks request data, userID extraction, SQL execution, and errors
2025-12-25 22:34:24 -03:00
Tiago Yamamoto
151d1f4347
test(backend): add UpdateCompanyStatus tests for admin service
...
- Added 3 test cases: updates active status, updates verified status, and error when company not found
- All tests passing
2025-12-25 22:08:02 -03:00
Tiago Yamamoto
59df524ed5
test: add admin, notification, audit service tests (+30% coverage increase)
2025-12-24 20:01:54 -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
4eae018a25
fix(backoffice): use string IDs for companies/jobs/users, fix audit log, ensure real tags support
2025-12-24 19:43:49 -03:00
Tiago Yamamoto
9784e959e4
feat: add profile page, dynamic dashboard, and backend integration tests
2025-12-24 19:38:11 -03:00
Tiago Yamamoto
cc5ac7c73c
feat: add profile page, dynamic dashboard, and fix candidate 500 error
2025-12-24 19:22:14 -03:00
Tiago Yamamoto
858df02a1d
feat(seeder): optimize city loading with bulk inserts and fix migration order
2025-12-24 18:19:03 -03:00
Tiago Yamamoto
617bb5ab39
fix(rbac): add migration to fix seeded users roles and patch notifications store
2025-12-24 18:14:35 -03:00
Tiago Yamamoto
9b389e1c9f
fix(services): initialize all list slices to empty array to prevent null json response
2025-12-24 18:11:17 -03:00
Tiago Yamamoto
861128571a
fix(migrations): add migration to fix superadmin role and users e2e test
2025-12-24 18:06:49 -03:00