Commit graph

49 commits

Author SHA1 Message Date
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
Yamamoto
672d2364cb docs: update BACKOFFICE.md with detailed API routes and Podman instructions 2026-01-02 19:06:38 -03:00
Tiago Yamamoto
d79fa8e97a feat: increase test coverage backend/frontend and setup e2e 2026-01-01 10:54:58 -03:00
Tiago Yamamoto
1249c9a499 docs: add RSA_PRIVATE_KEY_BASE64 to backoffice .env.example 2025-12-31 16:34:59 -03:00
Tiago Yamamoto
c26ad578b9 feat: migrate credentials management to backoffice nestjs 2025-12-31 16:25:32 -03:00
Tiago Yamamoto
a65259688f fix(docker): Increase NODE_OPTIONS memory for build
The docker build was failing due to a JavaScript heap out of memory error.
This commit increases the --max-old-space-size in NODE_OPTIONS from 384MB to 2048MB
in the builder stage of the Dockerfile to provide more memory for the build process,
resolving the memory allocation failure during
> backoffice@0.0.1 build /home/yamamoto/lab/gohorsejobs/backoffice
> nest build.
2025-12-28 13:48:22 -03:00
Tiago Yamamoto
3d704191e1 perf(docker): optimize backoffice Dockerfile
- Add --prefer-offline for faster installs
- Reduce NODE_OPTIONS to 384MB
- Add pnpm store prune to cleanup unused packages
- Unique cache id (pnpm-backoffice) to avoid conflicts
- Cleanup caches in same layer
2025-12-28 11:21:57 -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
632fc78982 feat(ci): add backoffice to deploy pipeline + optimize Dockerfile
- Add backoffice paths trigger to deploy workflow
- Implement conditional builds (only build changed services)
- Optimize Dockerfile with BuildKit cache mounts
- Update pnpm to latest version
- Remove HEALTHCHECK (not supported by Podman OCI format)
2025-12-28 10:47:28 -03:00
Tiago Yamamoto
c0ed01232c docs(backoffice): add C4 architecture diagram 2025-12-28 02:36:56 -03:00
Tiago Yamamoto
0fd114d097 chore(backoffice): update dependencies and resolve peer dependency warnings 2025-12-27 20:49:08 -03:00
Tiago Yamamoto
24c3eeaf5b fix: Add missing dependencies for backoffice email module
Added:
- @nestjs/typeorm
- typeorm
- handlebars
- nodemailer
- amqplib
- pg
2025-12-26 13:07:37 -03:00
Tiago Yamamoto
b0378985a4 docs: Comprehensive BACKOFFICE.md update with all modules and integrations 2025-12-26 12:40:04 -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
14af54ec39 fix(backoffice): upgrade @fastify/cookie to v11 for Fastify 5 compatibility
- Updated @fastify/cookie from ^9.3.1 to ^11.0.0
- Fixes FST_ERR_PLUGIN_VERSION_MISMATCH error
2025-12-25 22:44:49 -03:00
Tiago Yamamoto
72957b418a chore(backoffice): allow build with outdated lockfile to unblock deploy 2025-12-24 18:33:01 -03:00
Tiago Yamamoto
96571261d9 chore: update pnpm-lock.yaml 2025-12-24 18:28:23 -03:00
Tiago Yamamoto
7b5752f71f chore(docker): setup google mirror for base images 2025-12-24 17:46:57 -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
f7c1833c00 fix(backoffice): add missing dependencies (jsonwebtoken, @fastify/cookie) 2025-12-24 13:33:15 -03:00
Tiago Yamamoto
017a34c965 docs: comprehensive documentation update
- DATABASE.md: Complete schema with ER diagram, all tables, migrations history
- ROADMAP.md: Project status, completed/in-progress/backlog items
- TASKS.md: Detailed task list to avoid rework
- README.md: Added documentation links table
- backoffice/README.md: Added auth section (JWT Bearer + Cookie)

Schema notes:
- Core tables use SERIAL (INT): users, companies, jobs
- Newer tables use UUID v4: notifications, tickets, payments
- Schema is unified (removed core_* redundant tables)
2025-12-24 11:12:52 -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
f94533d432 fix(backoffice): add @fastify/static for Swagger support 2025-12-24 00:33:30 -03:00
Tiago Yamamoto
ce37206286 fix(backoffice): simplify Dockerfile for proper source code copying 2025-12-24 00:28:39 -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
22315e0231 perf: optimize backoffice Dockerfile with multi-stage build, non-root user, and .dockerignore 2025-12-23 23:32:43 -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
0ef2ced860 fix: add explicit types array to fix babel__core type error 2025-12-15 10:08:48 -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
88b1121470 test(backoffice): 🧪 added e2e test setup 2025-12-15 09:44:25 -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
Tiago Yamamoto
44e0a2851d feat(backoffice): 🐳 added Dockerfile for containerization 2025-12-15 09:44:18 -03:00
Tiago Yamamoto
1d4754af4f docs(backoffice): 📖 added README because reading is fundamental 2025-12-15 09:44:17 -03:00
Tiago Yamamoto
83bb6e5602 feat(backoffice): 🏗️ initialized NestJS backoffice API 2025-12-15 09:44:16 -03:00