Commit graph

34 commits

Author SHA1 Message Date
Tiago Yamamoto
58cfd76675 Add admin backoffice routes and dashboard 2025-12-22 16:37:05 -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
d369835999 fix(docs): update swagger annotations with /api/v1 prefix 2025-12-15 13:46:51 -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
1002a2ec83 fix(config): auto-detect http/https scheme for swagger 2025-12-15 13:24:37 -03:00
Tiago Yamamoto
52f31710cf fix(config): remove duplicate API_HOST and strip protocol prefix in main.go 2025-12-15 11:08:18 -03:00
Tiago Yamamoto
0a69406b31 feat(config): enable dynamic API host configuration via env var 2025-12-15 10:55:16 -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
1caeb72d7c chore: update env example and fix swagger host port 2025-12-15 10:44:28 -03:00
Tiago Yamamoto
c9747d3596 fix(integration): correct frontend fallback port to 8521 and handle NULL fields in company entity 2025-12-15 10:19:31 -03:00
Tiago Yamamoto
28733fff95 feat(tests): �� added unit tests and E2E tests for handlers 2025-12-15 09:08:32 -03:00
Tiago Yamamoto
430e0f534d feat(db): 🏠 added work_mode because office is overrated anyway 2025-12-15 08:53:41 -03:00
Tiago Yamamoto
67c2ccdffe Integrate backend jobs feed into frontend and improve seeder 2025-12-14 20:32:20 -03:00
Tiago Yamamoto
47b9e4feaf Add example for hiring application status update 2025-12-14 17:26:39 -03:00
Tiago Yamamoto
7d5c6cc1d4 Remove unused models import 2025-12-14 17:16:29 -03:00
Tiago Yamamoto
bff8012291 Add swagger docs for applications and storage 2025-12-14 17:10:42 -03:00
Tiago Yamamoto
65eca07c8f Expose job endpoints in Swagger docs 2025-12-14 16:40:29 -03:00
Tiago Yamamoto
9b4601f1d8 feat: implement dynamic featured jobs
- Add is_featured column to jobs table (migration)
- Update Job model and Service to support featured jobs
- Update JobHandler to expose featured jobs API
- Support filtering by featured status in GET /jobs
- Frontend: Fetch and display featured jobs from API
- Frontend: Update Job type definition
2025-12-14 15:43:43 -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
Tiago Yamamoto
dc1a63a3fc fix: correct swagger.json host port to 8521 2025-12-14 09:42:31 -03:00
Tiago Yamamoto
703e651daa docs: update swagger.json with Jobs endpoints and fix README
- Add Jobs endpoints to swagger.json manually (/jobs GET, POST, /jobs/{id} GET, PUT, DELETE)
- Update README.md Swagger URL from /swagger/ to /docs/
- Add production URL: https://api-dev.gohorsejobs.com/docs/index.html
- Expand endpoints table with all available routes
- Fix port from 8080 to 8521
2025-12-14 09:31:28 -03:00
Tiago Yamamoto
a4abcf8e05 feat: SEO optimization and dynamic jobs API integration
Backend:
- Add Swagger annotations to all job handlers (GET, POST, PUT, DELETE)
- Clean up job handler code

Frontend:
- Expand api.ts with ApiJob types, pagination, and transform function
- Update footer with 'Vagas por Tecnologia' SEO links
- Add robots.txt with crawler directives
- Add sitemap.xml with main pages and job URLs
- Change branding to GoHorse Jobs
2025-12-14 09:16:44 -03:00
Tiago Yamamoto
15fe5db50e fix(backend): relax CSP for Swagger UI docs
- Allow 'unsafe-inline' and 'unsafe-eval' scripts on /docs routes
- Swagger UI requires inline scripts to function properly
- Keep strict CSP for all other API routes
2025-12-14 09:04:19 -03:00
Tiago Yamamoto
dc2142499b fix(backend): improve migration logs with friendly messages
- Show ⏭️ 'skipped (already applied)' for migrations that already exist
- Add emojis for better log readability ( success,  error, 📦 running)
- Avoid confusing 'Error' messages when migrations are simply re-applied
2025-12-14 09:00:38 -03:00
Tiago Yamamoto
60eafdc6e2 feat(backend): add root route with IP info and move swagger to /docs
- Add root route (/) returning JSON with client IP, API info and links
- Move Swagger docs from /swagger/ to /docs/
- Include X-Forwarded-For and X-Real-IP header support for proxy environments
2025-12-14 08:56:25 -03:00
Tiago Yamamoto
be35be0c10 fix(docker): align Dockerfile port with .env configuration (8521)
- Updated EXPOSE from 8080 to 8521
- Updated HEALTHCHECK to check port 8521
- Updated default ENV PORT from 8080 to 8521

This fixes the deployment health check issue where the container
was expecting port 8080 but the app was configured to run on 8521.
2025-12-13 18:23:48 -03:00
Tiago Yamamoto
18ac6d74f0 chore: update port configuration to avoid conflicts
Port Configuration:
- Backend: 8521 (was 8080/8158)
- Frontend: 8963 (was 3000)

Files updated:
- backend/.env.example: updated PORT and CORS_ORIGINS
- frontend/src/lib/auth.ts: API_URL default to 8521
- frontend/src/lib/api.ts: API_URL default to 8521
- frontend/src/lib/storage.ts: API_URL default to 8521
- run_dev.sh: added port flags and service info display

Usage:
  ./run_dev.sh
  # Backend:  http://localhost:8521
  # Frontend: http://localhost:8963
2025-12-11 17:06:37 -03:00
Tiago Yamamoto
fdd67b8cd6 Merge branch 'hml' into dev 2025-12-11 14:59:40 -03:00
Tiago Yamamoto
ce6e35aefd feat(backend): implement S3 object storage with pre-signed URLs
- Add s3_storage.go service using AWS SDK v2
- Support custom S3-compatible endpoints (Civo)
- Implement pre-signed URL generation for uploads/downloads
- Add storage_handler.go with REST endpoints
- Register protected storage routes in router
- Graceful degradation when S3 not configured
2025-12-11 14:41:25 -03:00
Tiago Yamamoto
c6e0a70d50 feat(backend): add PostgreSQL SSL support and DB_SSLMODE env var
- Update database.go to use DB_SSLMODE environment variable
- Default to sslmode=require for production security
- Update .env.example with SSL and S3 configuration examples
2025-12-11 14:41:11 -03:00
Tiago Yamamoto
a505726786 fix: refactor dashboard urls, fix layout duplication and resolve backend api errors 2025-12-09 20:29:49 -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