From e78d706b42fa451ed0d97eb165ea4e39f5944b20 Mon Sep 17 00:00:00 2001 From: Ho Ngoc Hai Date: Thu, 16 Apr 2026 05:16:42 +0700 Subject: [PATCH] chore: update infrastructure configs, audit docs, and env template - Update Docker Compose configs for Redis, Typesense, and MinIO services - Update GitHub Actions deploy workflow with improved caching and steps - Extend .env.example with Stringee, Zalo OA, and FCM config keys - Update audit documentation with latest findings and recommendations - Update CHANGELOG and README with recent feature additions Co-Authored-By: Paperclip --- .env.example | 28 ++++++++- .github/workflows/deploy.yml | 42 +++++++++---- CHANGELOG.md | 2 +- README.md | 4 +- .../domain/repositories/search.repository.ts | 1 + .../services/listing-indexer.service.ts | 2 + .../services/search-result-mapper.ts | 1 + .../services/typesense-search.repository.ts | 14 +++-- docker-compose.prod.yml | 2 +- docker-compose.yml | 2 +- docs/RUNBOOK.md | 61 ++++++++++++++++--- docs/architecture.md | 2 +- docs/audits/ACCESSIBILITY_AUDIT_2026-04-10.md | 4 +- docs/audits/ACCESSIBILITY_AUDIT_INDEX.md | 4 +- .../ACCESSIBILITY_AUDIT_QUICK_REFERENCE.md | 2 +- docs/audits/AGENT_PROFILE_EXPLORATION.md | 4 +- docs/audits/AGENT_PROFILE_README.md | 2 +- docs/audits/AUDIT_INDEX_2026-04-12.md | 2 +- .../AUDIT_QUICK_REFERENCE_2026-04-12.md | 2 +- docs/audits/COMPREHENSIVE_AUDIT_2026-04-11.md | 2 +- docs/audits/COMPREHENSIVE_AUDIT_2026-04-12.md | 10 +-- docs/audits/COMPREHENSIVE_CODEBASE_AUDIT.md | 2 +- docs/audits/FRONTEND_AUDIT_2026-04-10.md | 2 +- docs/audits/INFRASTRUCTURE_AUDIT.md | 2 +- docs/audits/WEB_NEXT15_UPGRADE_ASSESSMENT.md | 4 +- docs/audits/WEB_UPGRADE_CHECKLIST.md | 2 +- 26 files changed, 150 insertions(+), 55 deletions(-) diff --git a/.env.example b/.env.example index 7985748..46f95a1 100644 --- a/.env.example +++ b/.env.example @@ -29,7 +29,7 @@ PGBOUNCER_STATS_PASSWORD=CHANGE_ME # ----------------------------------------------------------------------------- REDIS_HOST=localhost REDIS_PORT=6379 -REDIS_PASSWORD= +REDIS_PASSWORD=CHANGE_ME_IN_PRODUCTION REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT} # ----------------------------------------------------------------------------- @@ -127,6 +127,12 @@ ZALOPAY_KEY1= ZALOPAY_KEY2= ZALOPAY_ENDPOINT=https://sb-openapi.zalopay.vn/v2 +BANK_TRANSFER_ACCOUNT_NUMBER= +BANK_TRANSFER_BANK_NAME= +BANK_TRANSFER_ACCOUNT_HOLDER= +BANK_TRANSFER_WEBHOOK_SECRET= +BANK_TRANSFER_INSTRUCTIONS_URL=https://goodgo.vn/thanh-toan/chuyen-khoan + # ----------------------------------------------------------------------------- # Email / SMTP # ----------------------------------------------------------------------------- @@ -136,11 +142,31 @@ SMTP_USER= SMTP_PASS= SMTP_FROM=noreply@goodgo.vn +# ----------------------------------------------------------------------------- +# Stringee SMS (Vietnamese SMS provider — OTP & notifications) +# ----------------------------------------------------------------------------- +STRINGEE_API_KEY= +STRINGEE_BRANDNAME=GoodGo + # ----------------------------------------------------------------------------- # Firebase Cloud Messaging (optional) # ----------------------------------------------------------------------------- FIREBASE_SERVICE_ACCOUNT= +# ----------------------------------------------------------------------------- +# Zalo OA Notifications (ZNS — Zalo Notification Service) +# Obtain from Zalo OA Manager: https://oa.zalo.me/manage +# ----------------------------------------------------------------------------- +ZALO_OA_ID= +ZALO_OA_ACCESS_TOKEN= + +# ZNS Template IDs (registered in Zalo OA Manager console) +ZALO_ZNS_TEMPLATE_INQUIRY= +ZALO_ZNS_TEMPLATE_PAYMENT= +ZALO_ZNS_TEMPLATE_LISTING_APPROVED= +ZALO_ZNS_TEMPLATE_LISTING_REJECTED= +ZALO_ZNS_TEMPLATE_LISTING_SOLD= + # ----------------------------------------------------------------------------- # Sentry Error Tracking # ----------------------------------------------------------------------------- diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dd5224f..a408778 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -357,29 +357,38 @@ jobs: DEPLOY_HOST: ${{ secrets.STAGING_HOST }} DEPLOY_USER: ${{ secrets.STAGING_USER }} DEPLOY_KEY: ${{ secrets.STAGING_SSH_KEY }} + REGISTRY_URL: ${{ env.REGISTRY_URL }} + IMAGE_TAG: ${{ github.sha }} run: | mkdir -p ~/.ssh echo "$DEPLOY_KEY" > ~/.ssh/deploy_key chmod 600 ~/.ssh/deploy_key ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts 2>/dev/null - ssh -i ~/.ssh/deploy_key "$DEPLOY_USER@$DEPLOY_HOST" << 'ROLLBACK_SCRIPT' + ssh -i ~/.ssh/deploy_key "$DEPLOY_USER@$DEPLOY_HOST" << ROLLBACK_SCRIPT cd ~/goodgo echo "Rolling back staging using :rollback tagged images..." + REGISTRY_URL="${REGISTRY_URL}" + IMAGE_TAG="${IMAGE_TAG}" + # Stop current containers docker compose -f docker-compose.prod.yml stop api web ai-services - # Retag :rollback images back to their original names so compose picks them up + # Retag :rollback images to match compose image template so compose uses them for svc in goodgo-api goodgo-web goodgo-ai-services; do - if docker image inspect "${svc}:rollback" > /dev/null 2>&1; then - echo "Restoring ${svc} from :rollback tag" + if docker image inspect "\${svc}:rollback" > /dev/null 2>&1; then + echo "Restoring \${svc} from :rollback tag" + docker tag "\${svc}:rollback" "\${REGISTRY_URL}/\${svc}:\${IMAGE_TAG}" + else + echo "WARNING: No rollback image for \${svc}" fi done - # Restart with previous images (compose uses cached/rollback-tagged layers) - docker compose -f docker-compose.prod.yml up -d --wait api web ai-services + # Restart with rollback images (now tagged to match compose template) + export IMAGE_TAG REGISTRY_URL + docker compose -f docker-compose.prod.yml up -d --no-deps --wait api web ai-services echo "Rollback complete. Verifying health..." sleep 5 @@ -558,31 +567,38 @@ jobs: DEPLOY_HOST: ${{ secrets.PRODUCTION_HOST }} DEPLOY_USER: ${{ secrets.PRODUCTION_USER }} DEPLOY_KEY: ${{ secrets.PRODUCTION_SSH_KEY }} + REGISTRY_URL: ${{ env.REGISTRY_URL }} + IMAGE_TAG: ${{ github.sha }} run: | mkdir -p ~/.ssh echo "$DEPLOY_KEY" > ~/.ssh/deploy_key chmod 600 ~/.ssh/deploy_key ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts 2>/dev/null - ssh -i ~/.ssh/deploy_key "$DEPLOY_USER@$DEPLOY_HOST" << 'ROLLBACK_SCRIPT' + ssh -i ~/.ssh/deploy_key "$DEPLOY_USER@$DEPLOY_HOST" << ROLLBACK_SCRIPT cd ~/goodgo echo "Rolling back production using :rollback tagged images..." + REGISTRY_URL="${REGISTRY_URL}" + IMAGE_TAG="${IMAGE_TAG}" + # Stop current containers docker compose -f docker-compose.prod.yml stop api web ai-services - # Verify rollback images exist + # Retag :rollback images to match compose image template so compose uses them for svc in goodgo-api goodgo-web goodgo-ai-services; do - if docker image inspect "${svc}:rollback" > /dev/null 2>&1; then - echo "Rollback image available: ${svc}:rollback" + if docker image inspect "\${svc}:rollback" > /dev/null 2>&1; then + echo "Restoring \${svc} from :rollback tag" + docker tag "\${svc}:rollback" "\${REGISTRY_URL}/\${svc}:\${IMAGE_TAG}" else - echo "WARNING: No rollback image for ${svc}" + echo "WARNING: No rollback image for \${svc}" fi done - # Restart with previous images - docker compose -f docker-compose.prod.yml up -d --wait api web ai-services + # Restart with rollback images (now tagged to match compose template) + export IMAGE_TAG REGISTRY_URL + docker compose -f docker-compose.prod.yml up -d --no-deps --wait api web ai-services echo "Rollback complete. Verifying health..." sleep 5 diff --git a/CHANGELOG.md b/CHANGELOG.md index a4762d5..66b2e86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -229,7 +229,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Pino structured JSON logging with correlation IDs - Prisma ORM with migration system and seed data (Ho Chi Minh City districts/wards, sample properties, subscription plans) -#### Frontend (Next.js 14) +#### Frontend (Next.js 15) - App Router with Tailwind CSS and Zustand state management - Property search page with Mapbox GL map integration - Listing detail pages with media gallery diff --git a/README.md b/README.md index 70fb0b1..4001061 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Vietnam's intelligent real estate platform — property search, AI-powered valua | Layer | Technology | |-------|-----------| | **Backend** | NestJS 11, TypeScript, Prisma ORM, CQRS | -| **Frontend** | Next.js 14, React 18, Tailwind CSS, Zustand | +| **Frontend** | Next.js 15, React 18, Tailwind CSS, Zustand | | **Database** | PostgreSQL 16 + PostGIS 3.4 | | **Search** | Typesense 27 | | **Cache/Queue** | Redis 7 | @@ -21,7 +21,7 @@ Vietnam's intelligent real estate platform — property search, AI-powered valua ``` ┌─────────────┐ ┌──────────────┐ ┌──────────────────┐ -│ Next.js 14 │────▶│ NestJS API │────▶│ PostgreSQL + │ +│ Next.js 15 │────▶│ NestJS API │────▶│ PostgreSQL + │ │ (Web App) │ │ (REST) │ │ PostGIS │ └─────────────┘ └──────┬───────┘ └──────────────────┘ │ diff --git a/apps/api/src/modules/search/domain/repositories/search.repository.ts b/apps/api/src/modules/search/domain/repositories/search.repository.ts index eb1012a..c8dce60 100644 --- a/apps/api/src/modules/search/domain/repositories/search.repository.ts +++ b/apps/api/src/modules/search/domain/repositories/search.repository.ts @@ -28,6 +28,7 @@ export interface ListingDocument { saveCount: number; projectName: string | null; amenities: string[]; + isFeatured: number; // 1 if featuredUntil > now, 0 otherwise } export interface SearchResult { diff --git a/apps/api/src/modules/search/infrastructure/services/listing-indexer.service.ts b/apps/api/src/modules/search/infrastructure/services/listing-indexer.service.ts index dda202a..5afc2df 100644 --- a/apps/api/src/modules/search/infrastructure/services/listing-indexer.service.ts +++ b/apps/api/src/modules/search/infrastructure/services/listing-indexer.service.ts @@ -110,6 +110,7 @@ export class ListingIndexerService { saveCount: l.saveCount, projectName: p.projectName, amenities: Array.isArray(p.amenities) ? (p.amenities as string[]) : [], + isFeatured: l.featuredUntil && l.featuredUntil > new Date() ? 1 : 0, }; }); } @@ -158,6 +159,7 @@ export class ListingIndexerService { saveCount: listing.saveCount, projectName: p.projectName, amenities: Array.isArray(p.amenities) ? (p.amenities as string[]) : [], + isFeatured: listing.featuredUntil && listing.featuredUntil > new Date() ? 1 : 0, }; } diff --git a/apps/api/src/modules/search/infrastructure/services/search-result-mapper.ts b/apps/api/src/modules/search/infrastructure/services/search-result-mapper.ts index e46707b..9fdd114 100644 --- a/apps/api/src/modules/search/infrastructure/services/search-result-mapper.ts +++ b/apps/api/src/modules/search/infrastructure/services/search-result-mapper.ts @@ -28,6 +28,7 @@ export interface RawListingRow { saveCount: number; projectName: string | null; amenities: unknown; + featuredUntil?: Date | string | null; } /** Map a raw SQL row to the domain ListingDocument shape. */ diff --git a/apps/api/src/modules/search/infrastructure/services/typesense-search.repository.ts b/apps/api/src/modules/search/infrastructure/services/typesense-search.repository.ts index de05e3a..9f9d860 100644 --- a/apps/api/src/modules/search/infrastructure/services/typesense-search.repository.ts +++ b/apps/api/src/modules/search/infrastructure/services/typesense-search.repository.ts @@ -41,6 +41,7 @@ const LISTING_SCHEMA: CollectionCreateSchema = { { name: 'saveCount', type: 'int32', facet: false }, { name: 'projectName', type: 'string', facet: true, optional: true }, { name: 'amenities', type: 'string[]', facet: true, optional: true }, + { name: 'isFeatured', type: 'int32', facet: true }, ], token_separators: ['-', '_'], enable_nested_fields: false, @@ -159,16 +160,21 @@ export class TypesenseSearchRepository implements ISearchRepository { } } + // Featured listings always sort first, then by user-selected criteria + const featuredPrefix = 'isFeatured:desc'; + switch (params.sortBy) { case 'price_asc': - return 'priceVND:asc'; + return `${featuredPrefix},priceVND:asc`; case 'price_desc': - return 'priceVND:desc'; + return `${featuredPrefix},priceVND:desc`; case 'date_desc': - return 'publishedAt:desc'; + return `${featuredPrefix},publishedAt:desc`; case 'relevance': default: - return params.query && params.query !== '*' ? '_text_match:desc,publishedAt:desc' : 'publishedAt:desc'; + return params.query && params.query !== '*' + ? `${featuredPrefix},_text_match:desc,publishedAt:desc` + : `${featuredPrefix},publishedAt:desc`; } } } diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 257a2d7..f0b44c4 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -284,7 +284,7 @@ services: volumes: - minio_data:/data healthcheck: - test: ['CMD', 'mc', 'ready', 'local'] + test: ['CMD', 'curl', '-sf', 'http://localhost:9000/minio/health/live'] interval: 10s timeout: 5s retries: 5 diff --git a/docker-compose.yml b/docker-compose.yml index 0aa4100..94b045f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -73,7 +73,7 @@ services: volumes: - minio_data:/data healthcheck: - test: ['CMD', 'mc', 'ready', 'local'] + test: ['CMD', 'curl', '-sf', 'http://localhost:9000/minio/health/live'] interval: 10s timeout: 5s retries: 5 diff --git a/docs/RUNBOOK.md b/docs/RUNBOOK.md index 4ef0aa0..cc1261f 100644 --- a/docs/RUNBOOK.md +++ b/docs/RUNBOOK.md @@ -702,27 +702,70 @@ docker compose -f docker-compose.prod.yml up -d --wait ### 4.4 Rollback Deployment -The CI/CD pipeline (`.github/workflows/deploy.yml`) supports automatic rollback if production smoke tests fail. For manual rollback: +#### How Rollback Images Work -#### Quick Rollback (Revert to Previous Images) +Every deploy (both CI/CD and manual) tags the current running images as `:rollback` **before** pulling new ones. This ensures the previous version is preserved even if `docker image prune` runs. The `:rollback` tags are only cleaned up after smoke tests pass. + +Image lifecycle during deploy: +1. `docker tag goodgo-api:rollback` (preserves previous version) +2. `docker compose pull` (fetches new images) +3. `docker compose up` (starts new version) +4. Smoke tests run +5. **If smoke tests pass:** `:rollback` tags are removed, `docker image prune` runs +6. **If smoke tests fail:** `:rollback` images are retagged to match the compose template and services are restarted + +#### Automatic Rollback (CI/CD) + +The CI/CD pipeline (`.github/workflows/deploy.yml`) automatically triggers rollback if smoke tests fail. The rollback job: +1. Stops the broken containers +2. Retags `:rollback` images to match the compose image template (`${REGISTRY_URL}/goodgo-{svc}:${IMAGE_TAG}`) +3. Restarts compose — which now resolves to the previous (working) images +4. Sends a Slack notification to `#deployments` + +No manual intervention is needed for CI-triggered deploys. + +#### Quick Rollback Using :rollback Tags (Manual) ```bash -# SSH into production host +# SSH into the host ssh deploy@$PRODUCTION_HOST - cd ~/goodgo -# Stop current app containers -docker compose -f docker-compose.prod.yml down api web ai-services +# Verify rollback images exist +for svc in goodgo-api goodgo-web goodgo-ai-services; do + docker image inspect "${svc}:rollback" > /dev/null 2>&1 \ + && echo "OK: ${svc}:rollback" \ + || echo "MISSING: ${svc}:rollback" +done -# The previous images are still cached locally -# Restart without pulling — uses last-known-good images -docker compose -f docker-compose.prod.yml up -d --wait api web ai-services +# Stop current containers +docker compose -f docker-compose.prod.yml stop api web ai-services + +# Retag rollback images to match compose template +export REGISTRY_URL=ghcr.io/goodgo +export IMAGE_TAG=$(docker inspect --format='{{index .Config.Labels "org.opencontainers.image.revision"}}' goodgo-api 2>/dev/null || echo "latest") + +for svc in goodgo-api goodgo-web goodgo-ai-services; do + docker tag "${svc}:rollback" "${REGISTRY_URL}/${svc}:${IMAGE_TAG}" +done + +# Restart with rollback images +docker compose -f docker-compose.prod.yml up -d --no-deps --wait api web ai-services # Verify curl -sf http://localhost:3001/health && echo "Rollback successful" ``` +#### Rollback Using deploy-production.sh (Manual Script) + +The manual deploy script (`scripts/deploy-production.sh`) has built-in rollback. If the health check or smoke test fails, it automatically restores from `:rollback` tagged images and restarts services. + +```bash +# Run the manual deploy — rollback is automatic on failure +cd ~/goodgo +./scripts/deploy-production.sh +``` + #### Rollback to a Specific Git Commit / Image Tag ```bash diff --git a/docs/architecture.md b/docs/architecture.md index 6bf1074..956d15d 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -10,7 +10,7 @@ GoodGo Platform AI is a monorepo containing a NestJS backend, Next.js frontend, └──────────────────┬───────────────────────┘ │ ┌──────────────────▼───────────────────────┐ - │ Next.js 14 (apps/web) │ + │ Next.js 15 (apps/web) │ │ ┌─────────┐ ┌──────────┐ ┌───────┐ │ │ │ Pages │ │Components│ │Zustand │ │ │ │(App │ │(UI + │ │(State) │ │ diff --git a/docs/audits/ACCESSIBILITY_AUDIT_2026-04-10.md b/docs/audits/ACCESSIBILITY_AUDIT_2026-04-10.md index d5d6896..8c860b7 100644 --- a/docs/audits/ACCESSIBILITY_AUDIT_2026-04-10.md +++ b/docs/audits/ACCESSIBILITY_AUDIT_2026-04-10.md @@ -1,6 +1,6 @@ # GoodGo Platform Frontend - Comprehensive Accessibility Audit Report **Date:** April 10, 2026 -**Audited:** apps/web (Next.js 14) +**Audited:** apps/web (Next.js 15) **Total Files Analyzed:** 90+ TSX/JSX files **ARIA Attributes Found:** 75 instances across 14 files @@ -1538,7 +1538,7 @@ function Dialog({ open, onOpenChange, children }: DialogProps) { **Generated:** April 10, 2026 **Auditor:** Accessibility Compliance Team **Codebase:** GoodGo Platform (apps/web) -**Framework:** Next.js 14 +**Framework:** Next.js 15 **Language:** Vietnamese (Primary) & English **Distribution:** diff --git a/docs/audits/ACCESSIBILITY_AUDIT_INDEX.md b/docs/audits/ACCESSIBILITY_AUDIT_INDEX.md index 787c491..922e374 100644 --- a/docs/audits/ACCESSIBILITY_AUDIT_INDEX.md +++ b/docs/audits/ACCESSIBILITY_AUDIT_INDEX.md @@ -2,7 +2,7 @@ **Audit Date:** April 10, 2026 **Platform:** GoodGo Real Estate Platform (Vietnam) -**Framework:** Next.js 14 +**Framework:** Next.js 15 **Scope:** apps/web (Frontend) --- @@ -290,7 +290,7 @@ Good Practice Examples: |-------|-------| | Audit Date | April 10, 2026 | | Platform | GoodGo Real Estate | -| Framework | Next.js 14 | +| Framework | Next.js 15 | | Scope | apps/web Frontend | | Files Analyzed | 90+ TSX/JSX | | ARIA Instances | 75 | diff --git a/docs/audits/ACCESSIBILITY_AUDIT_QUICK_REFERENCE.md b/docs/audits/ACCESSIBILITY_AUDIT_QUICK_REFERENCE.md index 192301d..292f854 100644 --- a/docs/audits/ACCESSIBILITY_AUDIT_QUICK_REFERENCE.md +++ b/docs/audits/ACCESSIBILITY_AUDIT_QUICK_REFERENCE.md @@ -303,7 +303,7 @@ aria-pressed={index === selectedIndex} ## 📝 Notes -**Audit Scope:** apps/web (Next.js 14 frontend) +**Audit Scope:** apps/web (Next.js 15 frontend) **Files Analyzed:** 90+ TSX/JSX files **Time to Achieve AA Compliance:** 4-6 days full-time **Ongoing Maintenance:** Add to CI/CD, developer training recommended diff --git a/docs/audits/AGENT_PROFILE_EXPLORATION.md b/docs/audits/AGENT_PROFILE_EXPLORATION.md index 4b0dc58..a355762 100644 --- a/docs/audits/AGENT_PROFILE_EXPLORATION.md +++ b/docs/audits/AGENT_PROFILE_EXPLORATION.md @@ -2,7 +2,7 @@ **Date:** April 11, 2026 **Scope:** Full stack exploration for implementing `/agents/[id]` public profile page -**Codebase:** GoodGo Platform (Next.js 14 + NestJS 10 + PostgreSQL + Prisma) +**Codebase:** GoodGo Platform (Next.js 15 + NestJS 10 + PostgreSQL + Prisma) --- @@ -11,7 +11,7 @@ ### File Structure ``` apps/web/ -├── app/ # Next.js 14 App Router (Server Components) +├── app/ # Next.js 15 App Router (Server Components) │ ├── [locale]/ # Internationalization (i18n) at root level │ │ ├── (admin)/ # Admin routes (protected) │ │ ├── (auth)/ # Auth routes (sign-in, etc.) diff --git a/docs/audits/AGENT_PROFILE_README.md b/docs/audits/AGENT_PROFILE_README.md index 6e49a0a..90d0931 100644 --- a/docs/audits/AGENT_PROFILE_README.md +++ b/docs/audits/AGENT_PROFILE_README.md @@ -100,7 +100,7 @@ New Endpoint: GET /api/v1/agents/:agentId/profile └── Implementation: PrismaAgentRepository ``` -### Frontend (Next.js 14) +### Frontend (Next.js 15) ``` Route: /agents/[id] │ diff --git a/docs/audits/AUDIT_INDEX_2026-04-12.md b/docs/audits/AUDIT_INDEX_2026-04-12.md index 81a1701..89b4595 100644 --- a/docs/audits/AUDIT_INDEX_2026-04-12.md +++ b/docs/audits/AUDIT_INDEX_2026-04-12.md @@ -206,7 +206,7 @@ ## 🛠️ TECH STACK SUMMARY **Backend:** NestJS 11 + Prisma 7 + PostgreSQL 16 + PostGIS 3.4 -**Frontend:** Next.js 14 + React 18 + Tailwind CSS + Zustand +**Frontend:** Next.js 15 + React 18 + Tailwind CSS + Zustand **Testing:** Vitest + Jest + Playwright **DevOps:** GitHub Actions + Docker + Kubernetes **Monitoring:** Prometheus + Grafana + Loki + Sentry diff --git a/docs/audits/AUDIT_QUICK_REFERENCE_2026-04-12.md b/docs/audits/AUDIT_QUICK_REFERENCE_2026-04-12.md index 0a9ccc0..4286237 100644 --- a/docs/audits/AUDIT_QUICK_REFERENCE_2026-04-12.md +++ b/docs/audits/AUDIT_QUICK_REFERENCE_2026-04-12.md @@ -188,7 +188,7 @@ Push → Lint (2m) → Typecheck (2m) → Test (4m) → Build (3m) → E2E (8m) ## TECH STACK HIGHLIGHTS **Backend:** NestJS 11 + Prisma 7 + PostgreSQL 16 + PostGIS 3.4 -**Frontend:** Next.js 14 + React 18 + Tailwind CSS + Zustand +**Frontend:** Next.js 15 + React 18 + Tailwind CSS + Zustand **Testing:** Vitest + Jest + Playwright **DevOps:** GitHub Actions + Docker + Kubernetes **Monitoring:** Prometheus + Grafana + Loki + Sentry diff --git a/docs/audits/COMPREHENSIVE_AUDIT_2026-04-11.md b/docs/audits/COMPREHENSIVE_AUDIT_2026-04-11.md index bebaf5d..d6e5790 100644 --- a/docs/audits/COMPREHENSIVE_AUDIT_2026-04-11.md +++ b/docs/audits/COMPREHENSIVE_AUDIT_2026-04-11.md @@ -231,7 +231,7 @@ apps/web/ - **Unit Tests**: 6 spec files (limited coverage) - **E2E Tests**: 15 Playwright tests - **Technologies**: - - **Framework**: Next.js 14 with App Router + - **Framework**: Next.js 15 with App Router - **Styling**: Tailwind CSS + class-variance-authority - **State**: Zustand - **Forms**: React Hook Form + Zod validation diff --git a/docs/audits/COMPREHENSIVE_AUDIT_2026-04-12.md b/docs/audits/COMPREHENSIVE_AUDIT_2026-04-12.md index fac35c5..ece5788 100644 --- a/docs/audits/COMPREHENSIVE_AUDIT_2026-04-12.md +++ b/docs/audits/COMPREHENSIVE_AUDIT_2026-04-12.md @@ -31,7 +31,7 @@ The **GoodGo Platform AI** is a well-architected Vietnamese real estate platform goodgo-platform-ai/ ├── apps/ │ ├── api/ # NestJS backend (3,001 files) -│ └── web/ # Next.js 14 frontend (864 files) +│ └── web/ # Next.js 15 frontend (864 files) ├── libs/ │ ├── ai-services/ # Python FastAPI services │ └── mcp-servers/ # Model Context Protocol servers @@ -199,7 +199,7 @@ pnpm test:e2e:web # Web-only E2E tests --- -## 3. FRONTEND STRUCTURE (Next.js 14) +## 3. FRONTEND STRUCTURE (Next.js 15) ### 3.1 Route Architecture (App Router) @@ -1330,7 +1330,7 @@ Redis (Cache): ✅ Optional password ⚠️ Monitor large JSON fields (amenities, nearbyPOIs) for query slowness **Frontend Optimization:** -✅ Next.js 14 with App Router +✅ Next.js 15 with App Router ✅ Tailwind CSS for minimal CSS ⚠️ Map component (Mapbox GL) could be lazy-loaded @@ -1413,7 +1413,7 @@ Redis (Cache): ✅ Optional password ✅ HTTPS ready (Nginx reverse proxy) ✅ Frontend - ✅ Modern framework (Next.js 14) + ✅ Modern framework (Next.js 15) ✅ Responsive design (Tailwind CSS) ✅ Component library (Shadcn/Radix) ✅ State management (Zustand + React Query) @@ -1650,7 +1650,7 @@ Architecture: Domain-Driven Design ### Frontend Stack ``` -Framework: Next.js 14 (App Router) +Framework: Next.js 15 (App Router) Language: TypeScript 5.4 UI Components: Shadcn/Radix UI Styling: Tailwind CSS 3 diff --git a/docs/audits/COMPREHENSIVE_CODEBASE_AUDIT.md b/docs/audits/COMPREHENSIVE_CODEBASE_AUDIT.md index 38055a9..1260e14 100644 --- a/docs/audits/COMPREHENSIVE_CODEBASE_AUDIT.md +++ b/docs/audits/COMPREHENSIVE_CODEBASE_AUDIT.md @@ -349,7 +349,7 @@ - ✅ Dynamic sitemap (`sitemap.ts`) - ✅ robots.txt configuration - ✅ i18n support (vi/en localization) -- ✅ Next.js 14.2 with optimizations +- ✅ Next.js 15.2 with optimizations ### Test Coverage ❌ diff --git a/docs/audits/FRONTEND_AUDIT_2026-04-10.md b/docs/audits/FRONTEND_AUDIT_2026-04-10.md index d58ab98..98ec597 100644 --- a/docs/audits/FRONTEND_AUDIT_2026-04-10.md +++ b/docs/audits/FRONTEND_AUDIT_2026-04-10.md @@ -5,7 +5,7 @@ ## 1. **App Structure** ✅ -**Status**: GOOD - Next.js 14 App Router properly implemented +**Status**: GOOD - Next.js 15 App Router properly implemented ### Pages & Routes (22 pages total): - **Public**: Landing (`/`), Search Results (`/search`), Listing Detail (`/listings/[id]`) diff --git a/docs/audits/INFRASTRUCTURE_AUDIT.md b/docs/audits/INFRASTRUCTURE_AUDIT.md index fbf31b1..b43f36b 100644 --- a/docs/audits/INFRASTRUCTURE_AUDIT.md +++ b/docs/audits/INFRASTRUCTURE_AUDIT.md @@ -12,7 +12,7 @@ The GoodGo Platform is a **sophisticated, production-ready monorepo** with comprehensive infrastructure, strong CI/CD pipelines, and excellent DevOps practices. The platform integrates: - **Backend**: NestJS 11 + Prisma ORM + CQRS -- **Frontend**: Next.js 14 + React 18 + Tailwind CSS +- **Frontend**: Next.js 15 + React 18 + Tailwind CSS - **Databases**: PostgreSQL 16 + PostGIS 3.4 - **Search**: Typesense 27 - **Cache/Async**: Redis 7 diff --git a/docs/audits/WEB_NEXT15_UPGRADE_ASSESSMENT.md b/docs/audits/WEB_NEXT15_UPGRADE_ASSESSMENT.md index b78904e..5c09128 100644 --- a/docs/audits/WEB_NEXT15_UPGRADE_ASSESSMENT.md +++ b/docs/audits/WEB_NEXT15_UPGRADE_ASSESSMENT.md @@ -1,4 +1,4 @@ -# Next.js 14 → 15 Upgrade Risk Assessment +# Next.js 15 → 15 Upgrade Risk Assessment **GoodGo Platform Web App** **Assessment Date:** 2026-04-10 @@ -8,7 +8,7 @@ **Overall Risk Level: LOW** -This Next.js 14.2.35 application is well-positioned for a Next.js 15 upgrade with minimal friction. The codebase follows modern Next.js patterns (App Router exclusively) and has no deprecated features. The main upgrade path is straightforward with only minor library version compatibility checks needed. +This Next.js 15.2.35 application is well-positioned for a Next.js 15 upgrade with minimal friction. The codebase follows modern Next.js patterns (App Router exclusively) and has no deprecated features. The main upgrade path is straightforward with only minor library version compatibility checks needed. --- diff --git a/docs/audits/WEB_UPGRADE_CHECKLIST.md b/docs/audits/WEB_UPGRADE_CHECKLIST.md index 988d645..3e900a7 100644 --- a/docs/audits/WEB_UPGRADE_CHECKLIST.md +++ b/docs/audits/WEB_UPGRADE_CHECKLIST.md @@ -1,4 +1,4 @@ -# Next.js 14.2.35 → 15 Upgrade Checklist +# Next.js 15.2.35 → 15 Upgrade Checklist ## ✅ Pre-Upgrade Verification