Commit Graph

6 Commits

Author SHA1 Message Date
Ho Ngoc Hai
bafc3ddc2f fix(ci): fix E2E job env to unblock every PR — GOO-136
Root cause: the ci.yml e2e job had JWT_SECRET (23 chars) and
JWT_REFRESH_SECRET (27 chars), both below the MIN_SECRET_LENGTH=32
enforced by env-validation.ts. The API webServer refused to start with
"Insecure JWT secret configuration", so every E2E test failed with
ERR_CONNECTION_REFUSED before a single assertion ran.

Fixes in this commit:
1. .github/workflows/ci.yml — sync e2e job env with the working
   standalone e2e.yml:
   • JWT secrets lengthened past 32-char minimum
   • Add API_PORT / WEB_PORT / *_BASE_URL for Playwright webServer
   • Add REDIS_HOST/PORT, TYPESENSE_PROTOCOL, JWT_EXPIRES_IN,
     BCRYPT_ROUNDS, GOOGLE_*/ZALO_* OAuth stubs
   • VNPAY_HASH_SECRET lengthened to 32 chars
   • MINIO creds use vars fallback pattern (matches e2e.yml)

2. phone-login-otp-requested.event.ts + .listener.ts — the notifications
   module imported PhoneLoginOtpRequestedListener but neither the event
   class nor the listener file existed, causing module-resolution errors
   in four unrelated test suites that import notifications.module.ts.

3. create-payment.handler.spec.ts — inject mockSbvCompliance so the two
   handler tests that were TypeError-ing on undefined.error() pass.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-23 21:45:44 +07:00
Ho Ngoc Hai
9bb4c42f84 feat(web): listings page — ticker-style DataTable với toggle card view
Tạo mới trang /listings dạng bảng ticker-style theo spec TEC-3034.

- DataTable compact (row 36px, sticky header, alternating rows)
- Cột: #, Mã (GG-xxx), Quận, Loại, Giá, Δ30d, DT m², KL/Views
- Sortable theo Giá, Δ30d, DT m², KL/Views
- Filter inline: Loại giao dịch, Loại BĐS, Quận, Khoảng giá
- Toggle view: Table (default) ↔ Card grid (legacy component cũ)
- Pagination restyle compact, giữ nguyên API params
- Click row → navigate to detail page
- Dùng DataTable + PriceDelta từ @/components/design-system

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-21 01:31:22 +07:00
Ho Ngoc Hai
b84dfd5cad fix: Docker build errors — Prisma generate order, .dockerignore multi-service
Some checks failed
CI / Lint → Typecheck → Test → Build (22) (push) Failing after 11s
CI / E2E Tests (push) Has been skipped
Deploy / Build API Image (push) Failing after 23s
Deploy / Build Web Image (push) Failing after 12s
Deploy / Build AI Services Image (push) Failing after 10s
E2E Tests / Playwright E2E (push) Failing after 12s
Deploy / Deploy to Staging (push) Has been skipped
Deploy / Smoke Test Staging (push) Has been skipped
Deploy / Deploy to Production (push) Has been skipped
Deploy / Smoke Test Production (push) Has been skipped
Deploy / Rollback Staging (push) Has been skipped
Deploy / Rollback Production (push) Has been skipped
- Dockerfile: move prisma generate BEFORE nest build (fixes TS2305 PropertyType)
- .dockerignore: remove apps/web + libs/ai-services exclusions (needed by Kaniko)
- CI: add pnpm db:generate step before lint/typecheck/build

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
2026-04-13 15:31:08 +07:00
Ho Ngoc Hai
017d85247e fix(security): harden security headers across API and Web apps
- API: set X-Frame-Options to DENY via frameguard, add Permissions-Policy header, widen CSP connect-src for Swagger CDN
- Web: add HSTS header (1yr, includeSubDomains, preload), add payment=(self) to Permissions-Policy, make localhost:3001 in CSP connect-src dev-only

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-10 20:10:22 +07:00
Ho Ngoc Hai
2a8799ac5b fix(ci): correct workflow branch targets from main to master
All three GitHub Actions workflows (CI, E2E, Deploy) referenced
branches: [main] but the repository default branch is master.
This meant CI never triggered on pushes or PRs to master.

- ci.yml: push/PR triggers → master
- e2e.yml: push/PR triggers → master
- deploy.yml: push trigger + latest tag condition → master

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-10 19:20:49 +07:00
Ho Ngoc Hai
19dd59e4eb ci: add GitHub Actions CI/CD pipelines
- Add ci.yml with lint, typecheck, test, build steps + PostgreSQL service
- Add deploy.yml scaffold with Docker build placeholders

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-08 02:04:24 +07:00