Basic Architecture of Sport Web

This commit is contained in:
Nông Đức Huy
2026-08-11 13:37:25 +07:00
commit 8032fff6ac
262 changed files with 20348 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import { HttpClient, type HttpClientOptions } from './http-client';
import { createHealthResource, type HealthResource } from './resources/health';
/**
* Resource modules are added here as the backend grows — one file per bounded
* context under `src/resources/`, mirroring the NestJS module names exactly.
* Keep them thin: URL + types, no business logic and no caching policy (that is
* the calling app's decision).
*/
export interface ApiClient {
readonly http: HttpClient;
readonly health: HealthResource;
}
export function createApiClient(options: HttpClientOptions): ApiClient {
const http = new HttpClient(options);
return {
http,
health: createHealthResource(http),
};
}