Legal & disclaimer hardening — shipped live across both VietConnect and TradeWithViet
Both sites previously over-claimed and collected personal data without notice. We closed the obvious, verifiable gaps now — legal pages, consent, honest claims — to a defensible template standard for a pre-revenue B2B platform serving EU + US buyers, and clearly separated what is fixed from what still needs a lawyer or a government filing.
6-layer thinking chainChuỗi tư duy 6 tầng
"rà soát legality và disclaimer mọi thứ trên cả trang tradewithviet và vietconnect để đảm bảo an toàn" — later: "act as legal advisor, do your best", "EU US", "làm A" (TWV cookie consent).
- No lawyer, no registered office address yet, pre-revenue, 0 paying customers.
- TWV is a LIVE public WordPress site — outward-facing, hard to reverse.
- Elementor footer/form data (_elementor_data) cannot be safely edited via WP-CLI — a round-trip probe proved it mangles the JSON; PHP eval is banned by the project safety rules.
- The app's i18n message pipeline was mid-refactor, so legal pages had to be self-contained.
- Hard rule: never ship FALSE compliance (e.g. a cookie banner that doesn't actually block Google Analytics).
- Audit-only report — cheap, but leaves every gap live. Rejected.
- Full lawyer-grade rewrite — impossible without a licensed VN lawyer and the entity's filings.
- Report + safe template fixes, every legal doc marked "pending legal review", plus a checklist of the real filings only counsel can do. Chosen.
What changed, where
Two properties, two delivery mechanisms. The app (code we own) got real pages + a consent provider change. The live WordPress site (where editing core templates is risky) got new published pages plus two small drop-in mu-plugins that add behaviour without touching the fragile Elementor footer.
| Technical termThuật ngữ kỹ thuật | Plain nameTên dễ hiểu | RoleVai trò |
|---|---|---|
/legal/{terms,privacy,cookies,supplier-agreement} | Four legal pages | Previously the footer linked to these and all four 404'd. Now real, server-rendered pages covering Vietnam + EU + US law. |
cookie-consent-store.ts + provider | Consent gate | PostHog analytics now starts opted-out; it only turns on after the visitor clicks Accept. |
twv-legal-notices.php (mu-plugin) | Footer links + form note | Adds a site-wide Privacy / Terms bar and a privacy note under every form — without editing the fragile Elementor footer. |
twv-cookie-consent.php (mu-plugin) | Analytics consent | Google Consent Mode v2: Google Analytics is denied storage until the visitor accepts, then granted. |
Read it in 30 seconds: anything in code we control (the app) was fixed directly; anything on the live WordPress site was added as new published pages or as small, removable drop-in plugins so we never risked breaking the existing footer or forms.
Layered decision cardsCác quyết định theo tầng
Artifact mapBản đồ tệp tạo ra
| PathĐường dẫn | WhatLà gì | Who reads itAi dùng |
|---|---|---|
src/app/[locale]/legal/{terms,privacy,cookies,supplier-agreement}/page.tsx | Four legal pages (were 404) | Buyers/suppliers; SEO |
src/components/legal/legal-document.tsx | Shared legal-page shell with pending-review banner | All legal pages |
src/lib/consent/cookie-consent-store.ts + components/consent/cookie-consent.tsx | Cookie consent banner + store | EU/US visitors; PostHog gate |
src/components/shared/verification-disclaimer.tsx | Signal-not-a-guarantee note | Supplier profile, directory, homepage |
src/app/[locale]/layout.tsx + messages/{en,vi}.json | 10,000+ to 500+, audit-backed to multi-signal | All visitors; SEO |
TWV WP page 3 (privacy-policy) + page 8197 (terms-disclaimer) | Published real Privacy + Terms/Disclaimer | tradewithviet.com visitors |
wp-content/mu-plugins/twv-legal-notices.php | Site-wide footer legal bar + form privacy note | TWV all pages |
wp-content/mu-plugins/twv-cookie-consent.php | Google Consent Mode v2 + banner (blocks GA pre-consent) | TWV all pages |
docs/legal/compliance-operations.md | ROPA, cross-border transfer register, DPA tracker, filings checklist | Founder + future lawyer |
- LAWYER / FILING (P0): Prepare the PDPD cross-border data-transfer impact dossier (Supabase/Stripe/Vercel are offshore) and a processing-impact assessment; keep available for A05.
- LAWYER / FILING (P0): Designate a person/department for personal-data protection and notify A05 (Ministry of Public Security).
- LAWYER (P0): Determine whether VietConnect must register as an e-commerce platform with MOIT (online.gov.vn) and register if so.
- P1: Appoint a GDPR Article 27 EU representative; sign each processor's DPA (Supabase, Stripe, Resend, PostHog, Vercel).
- Provide the registered office address so it can be added to the legal docs (entity name + business registration number are already in).
- Have a licensed Vietnamese lawyer review all legal copy before it is treated as binding (every page is marked pending review).
- Decide whether to git-commit this batch (app changes are verified but not yet committed).