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:
3
apps/web/i18n/config.ts
Normal file
3
apps/web/i18n/config.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export const locales = ['vi', 'en'] as const;
|
||||
export type Locale = (typeof locales)[number];
|
||||
export const defaultLocale: Locale = 'vi';
|
||||
4
apps/web/i18n/navigation.ts
Normal file
4
apps/web/i18n/navigation.ts
Normal 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
16
apps/web/i18n/request.ts
Normal 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
8
apps/web/i18n/routing.ts
Normal 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',
|
||||
});
|
||||
Reference in New Issue
Block a user