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 @@
{
"name": "@sport/config",
"version": "0.0.0",
"private": true,
"description": "Build-time configuration shared across the workspace (TypeScript bases, Tailwind theme). Contains NO runtime code.",
"files": [
"typescript",
"tailwind"
],
"exports": {
"./typescript/base.json": "./typescript/base.json",
"./typescript/library.json": "./typescript/library.json",
"./typescript/react-library.json": "./typescript/react-library.json",
"./typescript/nextjs.json": "./typescript/nextjs.json",
"./typescript/nestjs.json": "./typescript/nestjs.json",
"./tailwind/theme.css": "./tailwind/theme.css"
},
"scripts": {
"lint": "echo 'no lint target'",
"typecheck": "echo 'no typecheck target'"
}
}
+96
View File
@@ -0,0 +1,96 @@
/**
* Sport Store — shared design tokens (Tailwind CSS v4, CSS-first configuration).
*
* This file is the SINGLE source of truth for the visual language of both the
* storefront and the admin dashboard. Apps import it after `@import "tailwindcss"`.
*
* Direction: modern, premium, minimal, sport-oriented (Nike / Gymshark spirit).
* High-contrast neutrals, one energetic accent, generous whitespace, tight type.
*/
@theme {
/* ---- Brand ------------------------------------------------------------ */
/* Near-black ink, not pure black: prints and photographs better. */
--color-ink-50: oklch(0.98 0.002 260);
--color-ink-100: oklch(0.95 0.003 260);
--color-ink-200: oklch(0.89 0.004 260);
--color-ink-300: oklch(0.78 0.005 260);
--color-ink-400: oklch(0.63 0.006 260);
--color-ink-500: oklch(0.51 0.007 260);
--color-ink-600: oklch(0.41 0.008 260);
--color-ink-700: oklch(0.32 0.009 260);
--color-ink-800: oklch(0.23 0.01 260);
--color-ink-900: oklch(0.16 0.011 260);
--color-ink-950: oklch(0.11 0.012 260);
/* Energetic accent — "volt". Used sparingly: CTAs, price, sale badges. */
--color-volt-50: oklch(0.97 0.06 125);
--color-volt-100: oklch(0.94 0.11 125);
--color-volt-200: oklch(0.9 0.16 125);
--color-volt-300: oklch(0.86 0.2 125);
--color-volt-400: oklch(0.82 0.23 125);
--color-volt-500: oklch(0.76 0.24 125);
--color-volt-600: oklch(0.66 0.21 125);
--color-volt-700: oklch(0.54 0.17 125);
--color-volt-800: oklch(0.43 0.13 125);
--color-volt-900: oklch(0.35 0.1 125);
/* Semantic */
--color-sale: oklch(0.58 0.21 27);
--color-success: oklch(0.65 0.16 155);
--color-warning: oklch(0.78 0.15 80);
--color-danger: oklch(0.58 0.22 27);
/* ---- Typography ------------------------------------------------------- */
--font-sans: var(--font-inter), ui-sans-serif, system-ui, -apple-system, sans-serif;
--font-display: var(--font-display), var(--font-inter), ui-sans-serif, system-ui, sans-serif;
--font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
--tracking-display: -0.03em;
/* ---- Layout ----------------------------------------------------------- */
--spacing-gutter: 1.25rem;
--container-page: 90rem;
--radius-card: 0.25rem;
--radius-pill: 999px;
/* ---- Motion ----------------------------------------------------------- */
--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
--animate-rise: rise 0.5s var(--ease-out-quint) both;
}
@keyframes rise {
from {
opacity: 0;
transform: translateY(0.75rem);
}
to {
opacity: 1;
transform: none;
}
}
@layer base {
:root {
color-scheme: light;
}
html {
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
/* Sport/streetwear headings: tight, uppercase-capable, no letterspacing drift. */
h1,
h2,
h3 {
letter-spacing: var(--tracking-display);
text-wrap: balance;
}
::selection {
background-color: var(--color-volt-300);
color: var(--color-ink-950);
}
}
+34
View File
@@ -0,0 +1,34 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Sport Store — Base",
"compilerOptions": {
"target": "ES2023",
"lib": ["ES2023"],
"module": "ESNext",
"moduleResolution": "Bundler",
"moduleDetection": "force",
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"allowUnreachableCode": false,
"useUnknownInCatchVariables": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"incremental": true,
"composite": false,
},
"exclude": ["node_modules", "dist", "build", ".next", ".turbo", "coverage"],
}
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Sport Store — Compiled Library (CJS + d.ts)",
"extends": "./base.json",
// NOTE: `outDir` and `rootDir` are deliberately NOT set here. Relative paths
// in an extended config resolve against the file that declares them, so they
// would point inside packages/config. Each package sets its own.
"compilerOptions": {
"module": "CommonJS",
"moduleResolution": "Node",
"verbatimModuleSyntax": false,
},
}
+21
View File
@@ -0,0 +1,21 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Sport Store — NestJS App",
"extends": "./base.json",
"compilerOptions": {
"module": "CommonJS",
"moduleResolution": "Node",
// NestJS DI relies on `emitDecoratorMetadata`, which needs the *value* of a
// constructor parameter's type to survive compilation. `verbatimModuleSyntax`
// erases such imports and silently breaks injection — it must stay off here.
"verbatimModuleSyntax": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"strictPropertyInitialization": false,
// `outDir`/`rootDir` are set by the app — see library.json for why.
"declaration": false,
"declarationMap": false,
},
}
+17
View File
@@ -0,0 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Sport Store — Next.js App",
"extends": "./base.json",
"compilerOptions": {
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"jsx": "preserve",
"module": "ESNext",
"moduleResolution": "Bundler",
"allowJs": true,
"noEmit": true,
"declaration": false,
"declarationMap": false,
"sourceMap": false,
"plugins": [{ "name": "next" }],
},
}
@@ -0,0 +1,13 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Sport Store — React Source Library (consumed via transpilePackages)",
"extends": "./base.json",
"compilerOptions": {
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"jsx": "react-jsx",
"noEmit": true,
"declaration": false,
"declarationMap": false,
"sourceMap": false,
},
}