docs: add comprehensive K6 load testing guide with API structure

- Document all API endpoints (auth, listings, payments, search)
- Include DTOs and request/response body shapes
- Document authentication methods and rate limits
- Provide database and environment configuration
- Include existing test setup (Playwright, Vitest)
- Detail CI/CD pipeline structure
- Recommend K6 endpoints and test patterns
- Provide file location references for quick lookup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ho Ngoc Hai
2026-04-09 01:34:15 +07:00
parent 45ebc6cf1d
commit 4d91c04b88
9 changed files with 758 additions and 0 deletions

3
apps/web/i18n/config.ts Normal file
View File

@@ -0,0 +1,3 @@
export const locales = ['vi', 'en'] as const;
export type Locale = (typeof locales)[number];
export const defaultLocale: Locale = 'vi';

View File

@@ -0,0 +1,4 @@
import { createNavigation } from 'next-intl/navigation';
import { routing } from './routing';
export const { Link, redirect, usePathname, useRouter } = createNavigation(routing);

16
apps/web/i18n/request.ts Normal file
View File

@@ -0,0 +1,16 @@
import { getRequestConfig } from 'next-intl/server';
import { routing } from './routing';
export default getRequestConfig(async ({ requestLocale }) => {
let locale = await requestLocale;
// Ensure a valid locale is used
if (!locale || !routing.locales.includes(locale as (typeof routing.locales)[number])) {
locale = routing.defaultLocale;
}
return {
locale,
messages: (await import(`../messages/${locale}.json`)).default,
};
});

8
apps/web/i18n/routing.ts Normal file
View File

@@ -0,0 +1,8 @@
import { defineRouting } from 'next-intl/routing';
import { locales, defaultLocale } from './config';
export const routing = defineRouting({
locales,
defaultLocale,
localePrefix: 'as-needed',
});

110
apps/web/messages/en.json Normal file
View File

@@ -0,0 +1,110 @@
{
"metadata": {
"title": "GoodGo — Vietnam Real Estate Platform",
"description": "GoodGo — smart real estate platform in Vietnam. Buy, sell, and rent properties easily with over 10,000+ listings nationwide.",
"ogTitle": "GoodGo — Vietnam Real Estate Platform",
"ogDescription": "Buy, sell, and rent properties easily with GoodGo — Vietnam's leading smart real estate platform."
},
"common": {
"goodgo": "GoodGo",
"loading": "Loading...",
"retry": "Retry",
"retrying": "Retrying...",
"goHome": "Go to homepage",
"search": "Search",
"login": "Login",
"register": "Register",
"logout": "Logout",
"admin": "Admin",
"dashboard": "Dashboard",
"errorCode": "Error code: {code}",
"retriedCount": "Retried {count} times",
"allRightsReserved": "© 2026 GoodGo. All rights reserved.",
"skipToContent": "Skip to main content"
},
"nav": {
"home": "Home",
"search": "Search",
"mainNav": "Main navigation",
"dashboardNav": "Dashboard",
"adminNav": "Administration"
},
"dashboard": {
"title": "Dashboard",
"listings": "Listings",
"createListing": "Create listing",
"analytics": "Analytics",
"aiValuation": "AI Valuation",
"profile": "Profile",
"subscription": "Subscription",
"payments": "Payments",
"darkMode": "Switch to dark mode",
"lightMode": "Switch to light mode"
},
"adminNav": {
"dashboard": "Dashboard",
"users": "User management",
"moderation": "Content moderation",
"kyc": "KYC verification",
"closeMenu": "Close menu",
"openMenu": "Open menu"
},
"landing": {
"heroTitle": "Find your perfect",
"heroTitleHighlight": "property",
"heroSubtitle": "Smart real estate platform in Vietnam — buy, sell, and rent properties with ease",
"searchPlaceholder": "Enter area, project, or keyword...",
"transactionTypeLabel": "Type",
"featuredTitle": "Featured listings",
"featuredSubtitle": "Explore the most popular properties",
"viewAll": "View all",
"loadError": "Unable to load listings. Please try again.",
"noFeatured": "No featured listings yet",
"districtsTitle": "Popular areas",
"districtsSubtitle": "Search by popular districts",
"statsTitle": "GoodGo in numbers",
"statsSubtitle": "Vietnam's trusted real estate platform",
"ctaTitle": "Have a property to list?",
"ctaSubtitle": "List for free today and reach thousands of potential buyers",
"registerFree": "Register for free",
"searchNow": "Search now"
},
"stats": {
"listings": "Listings",
"users": "Users",
"transactions": "Successful transactions",
"provinces": "Provinces"
},
"footer": {
"description": "Smart real estate platform in Vietnam",
"propertyTypes": "Property types",
"areas": "Areas",
"support": "Support"
},
"propertyTypes": {
"APARTMENT": "Apartment",
"HOUSE": "House",
"VILLA": "Villa",
"LAND": "Land",
"OFFICE": "Office",
"SHOPHOUSE": "Shophouse"
},
"transactionTypes": {
"SALE": "Sale",
"RENT": "Rent"
},
"notFound": {
"title": "Page not found",
"description": "The page you are looking for does not exist or has been moved."
},
"error": {
"title": "An error occurred",
"description": "Sorry, something went wrong. Please try again.",
"autoRetrying": "Automatically retrying..."
},
"language": {
"label": "Language",
"vi": "Tiếng Việt",
"en": "English"
}
}

110
apps/web/messages/vi.json Normal file
View File

@@ -0,0 +1,110 @@
{
"metadata": {
"title": "GoodGo — Nền tảng Bất động sản Việt Nam",
"description": "GoodGo — nền tảng bất động sản thông minh tại Việt Nam. Mua bán, cho thuê nhà đất dễ dàng với hơn 10,000+ tin đăng trên toàn quốc.",
"ogTitle": "GoodGo — Nền tảng Bất động sản Việt Nam",
"ogDescription": "Mua bán, cho thuê bất động sản dễ dàng với GoodGo — nền tảng thông minh, uy tín hàng đầu Việt Nam."
},
"common": {
"goodgo": "GoodGo",
"loading": "Đang tải...",
"retry": "Thử lại",
"retrying": "Đang thử lại...",
"goHome": "Về trang chủ",
"search": "Tìm kiếm",
"login": "Đăng nhập",
"register": "Đăng ký",
"logout": "Đăng xuất",
"admin": "Admin",
"dashboard": "Bảng điều khiển",
"errorCode": "Mã lỗi: {code}",
"retriedCount": "Đã thử lại {count} lần",
"allRightsReserved": "© 2026 GoodGo. Tất cả quyền được bảo lưu.",
"skipToContent": "Chuyển đến nội dung chính"
},
"nav": {
"home": "Trang chủ",
"search": "Tìm kiếm",
"mainNav": "Điều hướng chính",
"dashboardNav": "Bảng điều khiển",
"adminNav": "Quản trị"
},
"dashboard": {
"title": "Bảng điều khiển",
"listings": "Tin đăng",
"createListing": "Đăng tin",
"analytics": "Phân tích",
"aiValuation": "Định giá AI",
"profile": "Hồ sơ",
"subscription": "Gói dịch vụ",
"payments": "Thanh toán",
"darkMode": "Chuyển sang chế độ tối",
"lightMode": "Chuyển sang chế độ sáng"
},
"adminNav": {
"dashboard": "Dashboard",
"users": "Quản lý người dùng",
"moderation": "Kiểm duyệt tin",
"kyc": "Duyệt KYC",
"closeMenu": "Đóng menu",
"openMenu": "Mở menu"
},
"landing": {
"heroTitle": "Tìm kiếm bất động sản",
"heroTitleHighlight": "hoàn hảo",
"heroSubtitle": "Nền tảng bất động sản thông minh tại Việt Nam — mua bán, cho thuê nhà đất dễ dàng",
"searchPlaceholder": "Nhập khu vực, dự án, hoặc từ khóa...",
"transactionTypeLabel": "Loại GD",
"featuredTitle": "Tin đăng nổi bật",
"featuredSubtitle": "Khám phá các bất động sản được quan tâm nhất",
"viewAll": "Xem tất cả",
"loadError": "Không thể tải tin đăng. Vui lòng thử lại.",
"noFeatured": "Chưa có tin đăng nổi bật",
"districtsTitle": "Khu vực nổi bật",
"districtsSubtitle": "Tìm kiếm theo quận huyện phổ biến",
"statsTitle": "GoodGo trong số liệu",
"statsSubtitle": "Nền tảng bất động sản đáng tin cậy tại Việt Nam",
"ctaTitle": "Bạn có bất động sản muốn đăng?",
"ctaSubtitle": "Đăng tin miễn phí ngay hôm nay, tiếp cận hàng ngàn người mua tiềm năng",
"registerFree": "Đăng ký miễn phí",
"searchNow": "Tìm kiếm ngay"
},
"stats": {
"listings": "Tin đăng",
"users": "Người dùng",
"transactions": "Giao dịch thành công",
"provinces": "Tỉnh thành"
},
"footer": {
"description": "Nền tảng bất động sản thông minh tại Việt Nam",
"propertyTypes": "Loại BĐS",
"areas": "Khu vực",
"support": "Hỗ trợ"
},
"propertyTypes": {
"APARTMENT": "Căn hộ",
"HOUSE": "Nhà riêng",
"VILLA": "Biệt thự",
"LAND": "Đất nền",
"OFFICE": "Văn phòng",
"SHOPHOUSE": "Shophouse"
},
"transactionTypes": {
"SALE": "Bán",
"RENT": "Cho thuê"
},
"notFound": {
"title": "Không tìm thấy trang",
"description": "Trang bạn đang tìm không tồn tại hoặc đã được di chuyển."
},
"error": {
"title": "Đã xảy ra lỗi",
"description": "Rất tiếc, đã có lỗi xảy ra. Vui lòng thử lại.",
"autoRetrying": "Đang tự động thử lại..."
},
"language": {
"label": "Ngôn ngữ",
"vi": "Tiếng Việt",
"en": "English"
}
}