Commit graph

50 commits

Author SHA1 Message Date
Tiago Yamamoto
2b9b57e059 chore: update seeders with tickets and company profile data 2025-12-26 16:50:30 -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
bf41570cae docs: Update SEEDER-API.md with current scripts and location data 2025-12-26 13:11:53 -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
3d7612901d feat(seeder): add job tags seeder
- Created seeders/tags.js with area, level, and stack categories
- Area: Engineering, Design, Product, Marketing, Sales, etc.
- Level: Intern, Junior, Mid, Senior, Lead, Staff, Manager, etc.
- Stack: JavaScript, Python, Go, React, Node.js, AWS, Docker, etc.
- 79+ tags in total
2025-12-26 01:04:29 -03:00
Tiago Yamamoto
3ab04c5fd7 feat(seeder): interleave users and companies before heavy city seeding 2025-12-24 18:25:50 -03:00
Tiago Yamamoto
4b3eb2feee feat(seeder): add detailed execution timers (stopwatch) for location data 2025-12-24 18:22:40 -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
7b5752f71f chore(docker): setup google mirror for base images 2025-12-24 17:46:57 -03:00
Tiago Yamamoto
d3c06f5564 feat: expand testing, add fast seeder options, hardcode superadmin
- start.sh: Add options 8 (Seed LITE - skip cities) and 9 (Run All Tests)
- seeder: Add seed:lite, seed:fast scripts and --skip-locations flag
- seeder: Remove superadmin creation (now via backend migration)
- backend: Update 010_seed_super_admin.sql with hardcoded hash (Admin@2025! + pepper)
- backend: Expand jwt_service_test.go with 5 new tests (+10% coverage)
- frontend: Fix api.test.ts URL duplication bug, add error handling tests
- seeder: Add SQL data files to .gitignore
2025-12-24 17:07:45 -03:00
Tiago Yamamoto
37c339e34e data(seeder): add location SQL data files
- regions.sql (continents)
- subregions.sql
- countries.sql
- states.sql
- cities.sql.gz (compressed, 150K+ records)
- world.sql.gz (full database backup)
- schema.sql
2025-12-24 16:23:33 -03:00
Tiago Yamamoto
7720f2e35e fix(seeder): fix location data column schema transformations
- Fixed regex patterns that incorrectly matched SET inside quoted values
- Added transformSubregionsInsert() - maps 8 dump cols to schema cols
- Added transformCountriesInsert() - maps 32 dump cols to 25 schema cols
- Added transformStatesInsert() - maps 20 dump cols to 15 schema cols
- Added transformCitiesInsert() - maps 19 dump cols to 15 schema cols
- Added parseValues() helper for parsing SQL VALUES with JSON handling
- Successfully seeds: continents(6), subregions(22), countries(250), states(5296)
2025-12-24 16:12:29 -03:00
Tiago Yamamoto
54552b2dcd fix(seeder): add table name mapping for location data (regions→continents) 2025-12-24 15:07:25 -03:00
Tiago Yamamoto
1018da8036 feat(location): add comprehensive geographic hierarchy (continents, countries, states, cities)
- Add migration 021_location_hierarchy.sql with new table structure
- Add location-loader.js seeder to import SQL dumps
- Update all seeder files to use country_id instead of region_id
- Rename companies.region_id to country_id
2025-12-24 15:04:21 -03:00
Tiago Yamamoto
328496feaa chore: add login verification scripts and update deps 2025-12-24 14:22:56 -03:00
Tiago Yamamoto
f7127235cc fix(seeder): use uppercase ACTIVE status to match backend validation 2025-12-24 14:21:27 -03:00
Tiago Yamamoto
625bfc1e89 feat(seeder): add ACME Corp and Wile E. Coyote user 2025-12-24 13:54:27 -03:00
Tiago Yamamoto
c8a281ef06 fix(auth): correct seeder pepper and add backoffice e2e tests 2025-12-24 13:53:30 -03:00
Tiago Yamamoto
c1078563df refactor(roles): rename companyAdmin->admin and jobSeeker->candidate 2025-12-24 13:30:50 -03:00
Tiago Yamamoto
4b680f2c31 fix: all seeder INSERT column mismatches
- applications.js: remove UUID id, let DB auto-generate SERIAL
- fictional-companies.js: fix Los Pollos and Springfield to use slug instead of UUID
- fictional-companies.js: fix all VALUES 7 to 6 (16 columns)
- epic-companies.js: fix VALUES 7 to 6
2025-12-24 12:04:01 -03:00
Tiago Yamamoto
b454ae05a1 fix: acme.js INSERT column count mismatch (16 cols, 16 vals) 2025-12-24 11:59:18 -03:00
Tiago Yamamoto
e6fb6dd8cd fix: uuid_generate_v7 integer overflow and seeder role constraint
Migration 009:
- Simplified uuid_generate_v7() to avoid integer overflow on bit shifts
- Uses double precision for timestamp then converts to hex

Seeder:
- Changed roles from 'admin','company' to 'companyAdmin'
- Matches users table CHECK constraint: superadmin, companyAdmin, recruiter, jobSeeker
2025-12-24 11:56:31 -03:00
Tiago Yamamoto
7f30a214f7 docs: add API documentation with routes and permissions
- Create docs/API.md with complete API reference
  - 40+ routes documented
  - Permission matrix by role
  - Module breakdown (Auth, Users, Jobs, Applications, etc.)
  - Error response examples
  - ID format documentation

- Fix seeders to use SERIAL (not UUID) for jobs.id
  - jobs.js: let DB auto-generate id
  - acme.js, fictional-companies.js, epic-companies.js: same fix

- Update README.md with API documentation link
2025-12-24 11:25:55 -03:00
Tiago Yamamoto
ae4a3e5e63 feat: migrate from UUID v4 to UUID v7
Migrations:
- Fix 010_seed_super_admin.sql: only use columns from migration 001
- Add 021_create_uuid_v7_function.sql: PostgreSQL uuid_generate_v7() function
- Add 022_migrate_to_uuid_v7.sql: update notifications, tickets, job_payments to use v7

Seeder:
- Create seeder-api/src/utils/uuid.js with uuidv7() function
- Update notifications.js to use uuidv7() instead of randomUUID()

Docs:
- Update DATABASE.md with UUID v7 section and benefits

UUID v7 benefits:
- Time-ordered (sortable by creation time)
- Better index performance than v4
- RFC 9562 compliant
2025-12-24 11:19:26 -03:00
Tiago Yamamoto
7d99e77468 refactor: unify schema - eliminate core_* tables
BREAKING CHANGE: Removed core_companies, core_users, core_user_roles tables

Migrations:
- Create 020_unify_schema.sql: adds tenant_id, email, name to users table
- Create user_roles table (replaces core_user_roles)
- Disable 009_create_core_tables.sql (renamed to .disabled)
- Update 010_seed_super_admin.sql to use unified tables

Backend Repositories:
- company_repository.go: use companies table with INT id
- user_repository.go: use users/user_roles with INT id conversion

Seeders:
- All seeders now use companies/users/user_roles tables
- Removed all core_* table insertions
- Query companies by slug to get SERIAL id

This eliminates the redundancy between core_* and legacy tables.
2025-12-24 11:06:31 -03:00
Tiago Yamamoto
af2719f2e6 fix(seeder): use companies/users tables instead of core_* for jobs
- jobs.company_id is INT referencing companies.id (SERIAL)
- jobs.created_by is INT referencing users.id (SERIAL)
- Was incorrectly querying core_companies/core_users (UUID)
2025-12-24 10:55:05 -03:00
Tiago Yamamoto
2fb81a6d1a fix(migrations): use Node.js runner instead of psql
- Improve migrate.js with error handling for idempotent migrations
- Add 'npm run migrate' script to seeder-api/package.json
- Update start.sh option 4 to use Node.js-based migration runner
- Handles duplicate tables, columns, constraints gracefully
2025-12-24 10:47:25 -03:00
Tiago Yamamoto
bb408b5c87 docs(seeder): complete README with all fictional companies and regions
- Add documentation for 9 epic companies: BNL, Cyberdyne, Wonka, Wayne, Oceanic, InGen, Bubba Gump, Umbrella, Sprawl-Mart
- Add geographic regions section: Brazil (SP, RJ, MG), USA (CA, NY, TX), Japan (Tokyo, Osaka)
- Update totals: 43 companies, 1129+ jobs, 13 fictional companies
- Add complete file structure documentation
2025-12-24 10:39:16 -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
42e9f81f48 feat: enhance job form with currency, salary periods, contract types, and add ER diagram docs 2025-12-23 22:49:33 -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
407979c6dc fix(seeder): fix FK constraints for core_companies and core_users
- jobs.company_id now references core_companies.id (UUID)
- jobs.created_by now references core_users.id (UUID)
- Fixed parameter count in all INSERT statements
- All 13 fictional companies now seed correctly
2025-12-22 23:07:40 -03:00
Tiago Yamamoto
81a6515996 feat(seeder): add 9 epic fictional companies with 54 jobs
🛒 Buy n Large (Wall-E) - 3 jobs
🤖 Cyberdyne Systems (Terminator) - 3 jobs
🍫 Wonka Industries (Chocolate Factory) - 3 jobs
🦇 Wayne Enterprises (Batman) - 3 jobs
✈️ Oceanic Airlines (Lost) - 3 jobs
🦖 InGen Jurassic Park - 3 jobs
🦐 Bubba Gump Shrimp Co. (Forrest Gump) - 3 jobs
☣️ Umbrella Corporation (Resident Evil) - 3 jobs
🏪 Sprawl-Mart (Dystopian Parody) - 30 hilarious jobs

Total: 43 companies, 1129+ jobs
The ultimate job board parody collection!
2025-12-22 22:44:21 -03:00
Tiago Yamamoto
92c61d450f feat(seeder): add Stark Industries, Los Pollos Hermanos & Springfield Nuclear
🦸 Stark Industries (Marvel) - 8 vagas
   - Arquiteto de Cloud para J.A.R.V.I.S.
   - DevOps Engineer do Arc Reactor
   - ML Engineer para Iron Man Suits
   - Security Engineer Anti-Hydra

🐔 Los Pollos Hermanos (Breaking Bad) - 4 vagas
   - Engenheiro de Redes Air-Gapped
   - Dev Fullstack de Logística Fantasma
   - Pentester (Gus Fring approved)

☢️ Springfield Nuclear Power Plant (Simpsons) - 4 vagas
   - Admin COBOL/Mainframe (since 1970)
   - Dev PHP 4/jQuery (budget: $0)
   - Safety Officer: Homer J. Simpson

Total: 34 empresas, 1075+ vagas
2025-12-22 22:37:47 -03:00
Tiago Yamamoto
e6bc791ee8 feat(seeder): add ACME Corporation with 69 hilarious tech jobs
🏭 ACME Corp - Fornecedora Oficial do Coiote desde 1949

- Added acme.js seeder with 69 creative job postings
- Jobs include: Dev de TNT Inteligente, ML Engineer de Detecção de Papa-Léguas, Chief Explosion Officer, etc.
- Added Wile E. Coyote user (wile_e_coyote / MeepMeep@123)
- Updated README with ACME documentation
- Integrated ACME seeder into main flow

'Se não explodir, não é ACME!' ™
2025-12-22 22:32:17 -03:00
Tiago Yamamoto
0117791929 docs: atualização de documentação e verificação de testes 2025-12-22 22:17:18 -03:00
Tiago Yamamoto
e71fc361ac Add dynamic candidate management data 2025-12-22 19:18:15 -03:00
Tiago Yamamoto
640eb10703 feat(frontend): add work mode filter and randomize seeder types 2025-12-15 14:44:14 -03:00
Tiago Yamamoto
78314f2b45 feat(frontend): implement pagination and adjust seeder jobs count 2025-12-15 14:00:42 -03:00
Tiago Yamamoto
93b413d256 docs(seeder): 📊 updated summary because numbers matter 2025-12-15 08:56:25 -03:00
Tiago Yamamoto
b36760daa2 feat(seeder): 💼 990 jobs because unemployment is just a mindset 2025-12-15 08:55:39 -03:00
Tiago Yamamoto
20e03fef81 feat(seeder): 🏢 30 companies because startup dreams are free 2025-12-15 08:54:32 -03:00
Tiago Yamamoto
67c2ccdffe Integrate backend jobs feed into frontend and improve seeder 2025-12-14 20:32:20 -03:00
Tiago Yamamoto
aa31b917bd security: remove accidentally committed .env file 2025-12-14 09:52:34 -03:00
Tiago Yamamoto
ddc4e2c2bf chore: add complete .env.example files for all services
- frontend/.env.example: Add SEEDER_API_URL
- seeder-api/.env.example: Expand with server config and backend URL
- job-scraper-multisite/.env.example: New file with scraping config
- Update gitignore files to allow .env.example tracking
2025-12-14 09:48:56 -03:00
Tiago Yamamoto
9667e94545 chore: add Dockerfiles and gitignore files for all services
Root:
- Add comprehensive .gitignore covering all subprojects

Seeder API (Node.js):
- Add Dockerfile with multi-stage build, non-root user, health check
- Add .dockerignore and .gitignore

Job Scraper (Python):
- Add Dockerfile with Python 3.12, non-root user
- Add .dockerignore and .gitignore

Existing backend/frontend Dockerfiles and .dockerignore already optimized
2025-12-14 09:28:09 -03:00
Tiago Yamamoto
aab2de7534 fix(seeder): add SSL support and fix foreign key violations
- Add SSL configuration to database pool supporting DB_SSLMODE=require
- Fix user seeder FK violations by using RETURNING clause to get actual IDs
- Update all user creation queries (superadmin, company admins, candidates)
- Ensure correct user_id references when ON CONFLICT DO UPDATE occurs

This fixes the seeder hanging issue and foreign key constraint violations
that were preventing successful database population.
2025-12-11 19:36:37 -03:00
Tiago Yamamoto
7934afcf0d docs: complete project documentation overhaul
- Add comprehensive root README with badges, architecture diagram, and setup guide
- Update backend README with security middlewares and endpoint documentation
- Update frontend README with design system and page structure
- Update seeder-api README with generated data and credentials
- Add internal module READMEs (middleware, handlers, components)
- Document Clean Architecture layers and request flow
- Add environment variables reference table
2025-12-09 19:36:36 -03:00
Tiago Yamamoto
1c7ef95c1a first commit 2025-12-09 19:04:48 -03:00