diff --git a/dashboard/app/panel/account/ThemePreferenceCard.tsx b/dashboard/app/panel/account/ThemePreferenceCard.tsx
deleted file mode 100644
index e03e471..0000000
--- a/dashboard/app/panel/account/ThemePreferenceCard.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from '../../../src/extensions/builtin/user-center/account/ThemePreferenceCard'
diff --git a/dashboard/app/panel/components/Card.tsx b/dashboard/app/panel/components/Card.tsx
deleted file mode 100644
index 11dd3ec..0000000
--- a/dashboard/app/panel/components/Card.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from '../../../src/extensions/builtin/user-center/components/Card'
diff --git a/dashboard/cms/templates/default/index.tsx b/dashboard/cms/templates/default/index.tsx
deleted file mode 100644
index 138778d..0000000
--- a/dashboard/cms/templates/default/index.tsx
+++ /dev/null
@@ -1,2 +0,0 @@
-export { default } from '../../../src/templates/default'
-export { defaultHomeLayoutConfig } from './config'
diff --git a/dashboard/next.config.js.bak b/dashboard/next.config.js.bak
index 4813b1a..15fc014 100644
--- a/dashboard/next.config.js.bak
+++ b/dashboard/next.config.js.bak
@@ -85,14 +85,16 @@ const nextConfig = {
config.resolve.alias = {
...(config.resolve.alias ?? {}),
- '@cms': path.join(__dirname, 'cms'),
- '@components': path.join(__dirname, 'components'),
- '@i18n': path.join(__dirname, 'i18n'),
- '@lib': path.join(__dirname, 'lib'),
+ '@cms': path.join(__dirname, 'src', 'lib', 'cms'),
+ '@components': path.join(__dirname, 'src', 'components'),
+ '@i18n': path.join(__dirname, 'src', 'i18n'),
+ '@lib': path.join(__dirname, 'src', 'lib'),
'@types': path.join(__dirname, 'types'),
- '@server': path.join(__dirname, 'server'),
- '@theme': path.join(__dirname, 'src', 'theme'),
- '@templates': path.join(__dirname, 'src', 'templates'),
+ '@server': path.join(__dirname, 'src', 'server'),
+ '@modules': path.join(__dirname, 'src', 'modules'),
+ '@extensions': path.join(__dirname, 'src', 'modules', 'extensions'),
+ '@theme': path.join(__dirname, 'src', 'components', 'theme'),
+ '@templates': path.join(__dirname, 'src', 'modules', 'templates'),
'@src': path.join(__dirname, 'src'),
}
return config
diff --git a/dashboard/next.config.mjs b/dashboard/next.config.mjs
index e0e6971..97e6975 100644
--- a/dashboard/next.config.mjs
+++ b/dashboard/next.config.mjs
@@ -33,14 +33,16 @@ const nextConfig = {
// 显式 alias,保证 Turbopack 也能解析
config.resolve.alias = {
...(config.resolve.alias ?? {}),
- "@cms": path.join(__dirname, "cms"),
- "@components": path.join(__dirname, "components"),
- "@i18n": path.join(__dirname, "i18n"),
- "@lib": path.join(__dirname, "lib"),
+ "@cms": path.join(__dirname, "src", "lib", "cms"),
+ "@components": path.join(__dirname, "src", "components"),
+ "@i18n": path.join(__dirname, "src", "i18n"),
+ "@lib": path.join(__dirname, "src", "lib"),
"@types": path.join(__dirname, "types"),
- "@server": path.join(__dirname, "server"),
- "@theme": path.join(__dirname, "src", "theme"),
- "@templates": path.join(__dirname, "src", "templates"),
+ "@server": path.join(__dirname, "src", "server"),
+ "@modules": path.join(__dirname, "src", "modules"),
+ "@extensions": path.join(__dirname, "src", "modules", "extensions"),
+ "@theme": path.join(__dirname, "src", "components", "theme"),
+ "@templates": path.join(__dirname, "src", "modules", "templates"),
"@src": path.join(__dirname, "src"),
};
diff --git a/dashboard/package.json b/dashboard/package.json
index 9506d2d..b4c6c9f 100644
--- a/dashboard/package.json
+++ b/dashboard/package.json
@@ -15,9 +15,9 @@
"typecheck": "tsc --noEmit",
"format": "prettier --write .",
"preview": "next build && next start",
- "test": "vitest run",
- "test:unit": "vitest run",
- "test:e2e": "playwright test"
+ "test": "vitest run --config tests/unit/vitest.config.ts",
+ "test:unit": "vitest run --config tests/unit/vitest.config.ts",
+ "test:e2e": "playwright test --config tests/e2e/playwright.config.ts"
},
"dependencies": {
"dompurify": "^3.2.6",
diff --git a/dashboard/pages/_app.tsx b/dashboard/pages/_app.tsx
deleted file mode 100644
index 4316313..0000000
--- a/dashboard/pages/_app.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client'
-
-import type { AppProps } from 'next/app'
-
-import '../app/globals.css'
-import { AppProviders } from '../app/AppProviders'
-
-export default function HomepageApp({ Component, pageProps }: AppProps) {
- return (
-
-
-
- )
-}
diff --git a/dashboard/proxy.ts b/dashboard/scripts/dev/proxy.ts
similarity index 100%
rename from dashboard/proxy.ts
rename to dashboard/scripts/dev/proxy.ts
diff --git a/dashboard/scripts/gen-runtime-config.sh b/dashboard/scripts/gen-runtime-config.sh
index 6b9d765..03efefc 100755
--- a/dashboard/scripts/gen-runtime-config.sh
+++ b/dashboard/scripts/gen-runtime-config.sh
@@ -2,7 +2,7 @@
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
-CONFIG_DIR="${ROOT_DIR}/config"
+CONFIG_DIR="${ROOT_DIR}/src/config"
BASE_FILE="${CONFIG_DIR}/runtime-service-config.base.yaml"
SIT_FILE="${CONFIG_DIR}/runtime-service-config.sit.yaml"
PROD_FILE="${CONFIG_DIR}/runtime-service-config.prod.yaml"
@@ -18,7 +18,7 @@ Usage: scripts/gen-runtime-config.sh [--hostname ] [--env ] [--ou
Options:
--hostname Override the hostname used for environment detection.
--env Explicitly set the environment (prod|sit). Overrides hostname detection.
- --output Output path for the merged runtime configuration. Defaults to config/runtime-service-config.yaml.
+ --output Output path for the merged runtime configuration. Defaults to src/config/runtime-service-config.yaml.
-h, --help Show this help message.
USAGE
}
diff --git a/dashboard/setup_20.x b/dashboard/scripts/setup_node.sh
similarity index 100%
rename from dashboard/setup_20.x
rename to dashboard/scripts/setup_node.sh
diff --git a/dashboard/scripts/sync-content.sh b/dashboard/scripts/sync-content.sh
index f8f232b..5a5591d 100755
--- a/dashboard/scripts/sync-content.sh
+++ b/dashboard/scripts/sync-content.sh
@@ -3,7 +3,7 @@ set -euo pipefail
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
REPO_ROOT=$(cd "${SCRIPT_DIR}/.." && pwd)
-CONTENT_DIR="${REPO_ROOT}/content"
+CONTENT_DIR="${REPO_ROOT}/src/content"
REMOTE_REPO="${CONTENT_REMOTE_REPO:-}"
REMOTE_BRANCH="${CONTENT_REMOTE_BRANCH:-main}"
REMOTE_SUBDIR="${CONTENT_REMOTE_SUBDIR:-content}"
diff --git a/dashboard/app/(auth)/email-verification/EmailVerificationContent.tsx b/dashboard/src/app/(auth)/email-verification/EmailVerificationContent.tsx
similarity index 100%
rename from dashboard/app/(auth)/email-verification/EmailVerificationContent.tsx
rename to dashboard/src/app/(auth)/email-verification/EmailVerificationContent.tsx
diff --git a/dashboard/app/(auth)/email-verification/page.tsx b/dashboard/src/app/(auth)/email-verification/page.tsx
similarity index 100%
rename from dashboard/app/(auth)/email-verification/page.tsx
rename to dashboard/src/app/(auth)/email-verification/page.tsx
diff --git a/dashboard/app/(auth)/layout.tsx b/dashboard/src/app/(auth)/layout.tsx
similarity index 100%
rename from dashboard/app/(auth)/layout.tsx
rename to dashboard/src/app/(auth)/layout.tsx
diff --git a/dashboard/app/(auth)/login/LoginContent.tsx b/dashboard/src/app/(auth)/login/LoginContent.tsx
similarity index 100%
rename from dashboard/app/(auth)/login/LoginContent.tsx
rename to dashboard/src/app/(auth)/login/LoginContent.tsx
diff --git a/dashboard/app/(auth)/login/LoginForm.tsx b/dashboard/src/app/(auth)/login/LoginForm.tsx
similarity index 100%
rename from dashboard/app/(auth)/login/LoginForm.tsx
rename to dashboard/src/app/(auth)/login/LoginForm.tsx
diff --git a/dashboard/app/(auth)/login/page.tsx b/dashboard/src/app/(auth)/login/page.tsx
similarity index 100%
rename from dashboard/app/(auth)/login/page.tsx
rename to dashboard/src/app/(auth)/login/page.tsx
diff --git a/dashboard/app/(auth)/register/RegisterContent.tsx b/dashboard/src/app/(auth)/register/RegisterContent.tsx
similarity index 100%
rename from dashboard/app/(auth)/register/RegisterContent.tsx
rename to dashboard/src/app/(auth)/register/RegisterContent.tsx
diff --git a/dashboard/app/(auth)/register/page.tsx b/dashboard/src/app/(auth)/register/page.tsx
similarity index 100%
rename from dashboard/app/(auth)/register/page.tsx
rename to dashboard/src/app/(auth)/register/page.tsx
diff --git a/dashboard/app/(tenant)/[slug]/mail/compose/page.tsx b/dashboard/src/app/(tenant)/[slug]/mail/compose/page.tsx
similarity index 100%
rename from dashboard/app/(tenant)/[slug]/mail/compose/page.tsx
rename to dashboard/src/app/(tenant)/[slug]/mail/compose/page.tsx
diff --git a/dashboard/app/(tenant)/[slug]/mail/message/[id]/page.tsx b/dashboard/src/app/(tenant)/[slug]/mail/message/[id]/page.tsx
similarity index 100%
rename from dashboard/app/(tenant)/[slug]/mail/message/[id]/page.tsx
rename to dashboard/src/app/(tenant)/[slug]/mail/message/[id]/page.tsx
diff --git a/dashboard/app/(tenant)/[slug]/mail/page.tsx b/dashboard/src/app/(tenant)/[slug]/mail/page.tsx
similarity index 100%
rename from dashboard/app/(tenant)/[slug]/mail/page.tsx
rename to dashboard/src/app/(tenant)/[slug]/mail/page.tsx
diff --git a/dashboard/app/(tenant)/[slug]/mail/settings/page.tsx b/dashboard/src/app/(tenant)/[slug]/mail/settings/page.tsx
similarity index 100%
rename from dashboard/app/(tenant)/[slug]/mail/settings/page.tsx
rename to dashboard/src/app/(tenant)/[slug]/mail/settings/page.tsx
diff --git a/dashboard/app/404/page.tsx b/dashboard/src/app/404/page.tsx
similarity index 100%
rename from dashboard/app/404/page.tsx
rename to dashboard/src/app/404/page.tsx
diff --git a/dashboard/pages/500.tsx b/dashboard/src/app/500/page.tsx
similarity index 100%
rename from dashboard/pages/500.tsx
rename to dashboard/src/app/500/page.tsx
diff --git a/dashboard/app/AppProviders.tsx b/dashboard/src/app/AppProviders.tsx
similarity index 92%
rename from dashboard/app/AppProviders.tsx
rename to dashboard/src/app/AppProviders.tsx
index c0417b1..db8bc6c 100644
--- a/dashboard/app/AppProviders.tsx
+++ b/dashboard/src/app/AppProviders.tsx
@@ -5,7 +5,7 @@ import type { ReactNode } from 'react'
import { collectExtensionProviders } from '@cms/client'
import { LanguageProvider } from '@i18n/LanguageProvider'
import { UserProvider } from '@lib/userStore'
-import { ThemeProvider } from '../src/theme'
+import { ThemeProvider } from '@components/theme'
const extensionProviders = collectExtensionProviders()
diff --git a/dashboard/app/[slug]/Client.tsx b/dashboard/src/app/[slug]/Client.tsx
similarity index 100%
rename from dashboard/app/[slug]/Client.tsx
rename to dashboard/src/app/[slug]/Client.tsx
diff --git a/dashboard/app/[slug]/page.tsx b/dashboard/src/app/[slug]/page.tsx
similarity index 100%
rename from dashboard/app/[slug]/page.tsx
rename to dashboard/src/app/[slug]/page.tsx
diff --git a/dashboard/app/api/admin/settings/route.ts b/dashboard/src/app/api/admin/settings/route.ts
similarity index 100%
rename from dashboard/app/api/admin/settings/route.ts
rename to dashboard/src/app/api/admin/settings/route.ts
diff --git a/dashboard/app/api/admin/users/[userId]/role/route.ts b/dashboard/src/app/api/admin/users/[userId]/role/route.ts
similarity index 100%
rename from dashboard/app/api/admin/users/[userId]/role/route.ts
rename to dashboard/src/app/api/admin/users/[userId]/role/route.ts
diff --git a/dashboard/app/api/admin/users/metrics/route.ts b/dashboard/src/app/api/admin/users/metrics/route.ts
similarity index 100%
rename from dashboard/app/api/admin/users/metrics/route.ts
rename to dashboard/src/app/api/admin/users/metrics/route.ts
diff --git a/dashboard/app/api/agent/[...segments]/route.ts b/dashboard/src/app/api/agent/[...segments]/route.ts
similarity index 100%
rename from dashboard/app/api/agent/[...segments]/route.ts
rename to dashboard/src/app/api/agent/[...segments]/route.ts
diff --git a/dashboard/app/api/askai/route.ts b/dashboard/src/app/api/askai/route.ts
similarity index 100%
rename from dashboard/app/api/askai/route.ts
rename to dashboard/src/app/api/askai/route.ts
diff --git a/dashboard/app/api/auth/login/route.ts b/dashboard/src/app/api/auth/login/route.ts
similarity index 100%
rename from dashboard/app/api/auth/login/route.ts
rename to dashboard/src/app/api/auth/login/route.ts
diff --git a/dashboard/app/api/auth/mfa/disable/route.ts b/dashboard/src/app/api/auth/mfa/disable/route.ts
similarity index 100%
rename from dashboard/app/api/auth/mfa/disable/route.ts
rename to dashboard/src/app/api/auth/mfa/disable/route.ts
diff --git a/dashboard/app/api/auth/mfa/setup/route.ts b/dashboard/src/app/api/auth/mfa/setup/route.ts
similarity index 100%
rename from dashboard/app/api/auth/mfa/setup/route.ts
rename to dashboard/src/app/api/auth/mfa/setup/route.ts
diff --git a/dashboard/app/api/auth/mfa/status/route.ts b/dashboard/src/app/api/auth/mfa/status/route.ts
similarity index 100%
rename from dashboard/app/api/auth/mfa/status/route.ts
rename to dashboard/src/app/api/auth/mfa/status/route.ts
diff --git a/dashboard/app/api/auth/mfa/verify/route.ts b/dashboard/src/app/api/auth/mfa/verify/route.ts
similarity index 100%
rename from dashboard/app/api/auth/mfa/verify/route.ts
rename to dashboard/src/app/api/auth/mfa/verify/route.ts
diff --git a/dashboard/app/api/auth/register/route.ts b/dashboard/src/app/api/auth/register/route.ts
similarity index 100%
rename from dashboard/app/api/auth/register/route.ts
rename to dashboard/src/app/api/auth/register/route.ts
diff --git a/dashboard/app/api/auth/register/send/route.ts b/dashboard/src/app/api/auth/register/send/route.ts
similarity index 100%
rename from dashboard/app/api/auth/register/send/route.ts
rename to dashboard/src/app/api/auth/register/send/route.ts
diff --git a/dashboard/app/api/auth/register/verify/route.ts b/dashboard/src/app/api/auth/register/verify/route.ts
similarity index 100%
rename from dashboard/app/api/auth/register/verify/route.ts
rename to dashboard/src/app/api/auth/register/verify/route.ts
diff --git a/dashboard/app/api/auth/session/route.ts b/dashboard/src/app/api/auth/session/route.ts
similarity index 100%
rename from dashboard/app/api/auth/session/route.ts
rename to dashboard/src/app/api/auth/session/route.ts
diff --git a/dashboard/app/api/auth/verify-email/route.ts b/dashboard/src/app/api/auth/verify-email/route.ts
similarity index 100%
rename from dashboard/app/api/auth/verify-email/route.ts
rename to dashboard/src/app/api/auth/verify-email/route.ts
diff --git a/dashboard/app/api/auth/verify-email/send/route.ts b/dashboard/src/app/api/auth/verify-email/send/route.ts
similarity index 100%
rename from dashboard/app/api/auth/verify-email/send/route.ts
rename to dashboard/src/app/api/auth/verify-email/send/route.ts
diff --git a/dashboard/app/api/content-meta/route.ts b/dashboard/src/app/api/content-meta/route.ts
similarity index 89%
rename from dashboard/app/api/content-meta/route.ts
rename to dashboard/src/app/api/content-meta/route.ts
index 6aafdc9..1762de5 100644
--- a/dashboard/app/api/content-meta/route.ts
+++ b/dashboard/src/app/api/content-meta/route.ts
@@ -1,6 +1,6 @@
import { NextRequest, NextResponse } from 'next/server'
-import { ContentNotFoundError, getContentCommitMeta } from '../../../api/content-meta'
+import { ContentNotFoundError, getContentCommitMeta } from '@server/content-meta'
export const runtime = 'nodejs'
diff --git a/dashboard/app/api/mail/ai/classify/route.ts b/dashboard/src/app/api/mail/ai/classify/route.ts
similarity index 100%
rename from dashboard/app/api/mail/ai/classify/route.ts
rename to dashboard/src/app/api/mail/ai/classify/route.ts
diff --git a/dashboard/app/api/mail/ai/reply-suggest/route.ts b/dashboard/src/app/api/mail/ai/reply-suggest/route.ts
similarity index 100%
rename from dashboard/app/api/mail/ai/reply-suggest/route.ts
rename to dashboard/src/app/api/mail/ai/reply-suggest/route.ts
diff --git a/dashboard/app/api/mail/ai/summarize/route.ts b/dashboard/src/app/api/mail/ai/summarize/route.ts
similarity index 100%
rename from dashboard/app/api/mail/ai/summarize/route.ts
rename to dashboard/src/app/api/mail/ai/summarize/route.ts
diff --git a/dashboard/app/api/mail/inbox/route.ts b/dashboard/src/app/api/mail/inbox/route.ts
similarity index 100%
rename from dashboard/app/api/mail/inbox/route.ts
rename to dashboard/src/app/api/mail/inbox/route.ts
diff --git a/dashboard/app/api/mail/message/[id]/route.ts b/dashboard/src/app/api/mail/message/[id]/route.ts
similarity index 100%
rename from dashboard/app/api/mail/message/[id]/route.ts
rename to dashboard/src/app/api/mail/message/[id]/route.ts
diff --git a/dashboard/app/api/mail/mockData.ts b/dashboard/src/app/api/mail/mockData.ts
similarity index 100%
rename from dashboard/app/api/mail/mockData.ts
rename to dashboard/src/app/api/mail/mockData.ts
diff --git a/dashboard/app/api/mail/namespace/route.ts b/dashboard/src/app/api/mail/namespace/route.ts
similarity index 100%
rename from dashboard/app/api/mail/namespace/route.ts
rename to dashboard/src/app/api/mail/namespace/route.ts
diff --git a/dashboard/app/api/mail/send/route.ts b/dashboard/src/app/api/mail/send/route.ts
similarity index 100%
rename from dashboard/app/api/mail/send/route.ts
rename to dashboard/src/app/api/mail/send/route.ts
diff --git a/dashboard/app/api/ping/route.ts b/dashboard/src/app/api/ping/route.ts
similarity index 100%
rename from dashboard/app/api/ping/route.ts
rename to dashboard/src/app/api/ping/route.ts
diff --git a/dashboard/app/api/rag/query/route.ts b/dashboard/src/app/api/rag/query/route.ts
similarity index 100%
rename from dashboard/app/api/rag/query/route.ts
rename to dashboard/src/app/api/rag/query/route.ts
diff --git a/dashboard/app/api/render-markdown/route.ts b/dashboard/src/app/api/render-markdown/route.ts
similarity index 89%
rename from dashboard/app/api/render-markdown/route.ts
rename to dashboard/src/app/api/render-markdown/route.ts
index a3fc8a2..90618b9 100644
--- a/dashboard/app/api/render-markdown/route.ts
+++ b/dashboard/src/app/api/render-markdown/route.ts
@@ -1,6 +1,6 @@
import { NextRequest, NextResponse } from 'next/server'
-import { ContentNotFoundError, renderMarkdownFile } from '../../../api/render-markdown'
+import { ContentNotFoundError, renderMarkdownFile } from '@server/render-markdown'
export const runtime = 'nodejs'
diff --git a/dashboard/app/api/task/[...segments]/route.ts b/dashboard/src/app/api/task/[...segments]/route.ts
similarity index 100%
rename from dashboard/app/api/task/[...segments]/route.ts
rename to dashboard/src/app/api/task/[...segments]/route.ts
diff --git a/dashboard/app/api/users/route.ts b/dashboard/src/app/api/users/route.ts
similarity index 100%
rename from dashboard/app/api/users/route.ts
rename to dashboard/src/app/api/users/route.ts
diff --git a/dashboard/app/cloud_iac/README.md b/dashboard/src/app/cloud_iac/README.md
similarity index 100%
rename from dashboard/app/cloud_iac/README.md
rename to dashboard/src/app/cloud_iac/README.md
diff --git a/dashboard/app/cloud_iac/[provider]/[service]/page.tsx b/dashboard/src/app/cloud_iac/[provider]/[service]/page.tsx
similarity index 100%
rename from dashboard/app/cloud_iac/[provider]/[service]/page.tsx
rename to dashboard/src/app/cloud_iac/[provider]/[service]/page.tsx
diff --git a/dashboard/app/cloud_iac/[provider]/page.tsx b/dashboard/src/app/cloud_iac/[provider]/page.tsx
similarity index 100%
rename from dashboard/app/cloud_iac/[provider]/page.tsx
rename to dashboard/src/app/cloud_iac/[provider]/page.tsx
diff --git a/dashboard/app/cloud_iac/page.tsx b/dashboard/src/app/cloud_iac/page.tsx
similarity index 100%
rename from dashboard/app/cloud_iac/page.tsx
rename to dashboard/src/app/cloud_iac/page.tsx
diff --git a/dashboard/app/components/ClientTime.tsx b/dashboard/src/app/components/ClientTime.tsx
similarity index 100%
rename from dashboard/app/components/ClientTime.tsx
rename to dashboard/src/app/components/ClientTime.tsx
diff --git a/dashboard/app/components/icons/WeChatIcon.tsx b/dashboard/src/app/components/icons/WeChatIcon.tsx
similarity index 100%
rename from dashboard/app/components/icons/WeChatIcon.tsx
rename to dashboard/src/app/components/icons/WeChatIcon.tsx
diff --git a/dashboard/app/components/insight/ai/Assistant.tsx b/dashboard/src/app/components/insight/ai/Assistant.tsx
similarity index 100%
rename from dashboard/app/components/insight/ai/Assistant.tsx
rename to dashboard/src/app/components/insight/ai/Assistant.tsx
diff --git a/dashboard/app/components/insight/explore/ExploreBuilder.tsx b/dashboard/src/app/components/insight/explore/ExploreBuilder.tsx
similarity index 100%
rename from dashboard/app/components/insight/explore/ExploreBuilder.tsx
rename to dashboard/src/app/components/insight/explore/ExploreBuilder.tsx
diff --git a/dashboard/app/components/insight/layout/BreadcrumbBar.tsx b/dashboard/src/app/components/insight/layout/BreadcrumbBar.tsx
similarity index 100%
rename from dashboard/app/components/insight/layout/BreadcrumbBar.tsx
rename to dashboard/src/app/components/insight/layout/BreadcrumbBar.tsx
diff --git a/dashboard/app/components/insight/layout/Sidebar.tsx b/dashboard/src/app/components/insight/layout/Sidebar.tsx
similarity index 100%
rename from dashboard/app/components/insight/layout/Sidebar.tsx
rename to dashboard/src/app/components/insight/layout/Sidebar.tsx
diff --git a/dashboard/app/components/insight/layout/TimeRangePicker.tsx b/dashboard/src/app/components/insight/layout/TimeRangePicker.tsx
similarity index 100%
rename from dashboard/app/components/insight/layout/TimeRangePicker.tsx
rename to dashboard/src/app/components/insight/layout/TimeRangePicker.tsx
diff --git a/dashboard/app/components/insight/layout/WorkspaceGrid.tsx b/dashboard/src/app/components/insight/layout/WorkspaceGrid.tsx
similarity index 100%
rename from dashboard/app/components/insight/layout/WorkspaceGrid.tsx
rename to dashboard/src/app/components/insight/layout/WorkspaceGrid.tsx
diff --git a/dashboard/app/components/insight/layout/WorkspaceHeader.tsx b/dashboard/src/app/components/insight/layout/WorkspaceHeader.tsx
similarity index 100%
rename from dashboard/app/components/insight/layout/WorkspaceHeader.tsx
rename to dashboard/src/app/components/insight/layout/WorkspaceHeader.tsx
diff --git a/dashboard/app/components/insight/services/adapters/logs.ts b/dashboard/src/app/components/insight/services/adapters/logs.ts
similarity index 100%
rename from dashboard/app/components/insight/services/adapters/logs.ts
rename to dashboard/src/app/components/insight/services/adapters/logs.ts
diff --git a/dashboard/app/components/insight/services/adapters/openobserve.ts b/dashboard/src/app/components/insight/services/adapters/openobserve.ts
similarity index 100%
rename from dashboard/app/components/insight/services/adapters/openobserve.ts
rename to dashboard/src/app/components/insight/services/adapters/openobserve.ts
diff --git a/dashboard/app/components/insight/services/adapters/prometheus.ts b/dashboard/src/app/components/insight/services/adapters/prometheus.ts
similarity index 100%
rename from dashboard/app/components/insight/services/adapters/prometheus.ts
rename to dashboard/src/app/components/insight/services/adapters/prometheus.ts
diff --git a/dashboard/app/components/insight/services/adapters/traces.ts b/dashboard/src/app/components/insight/services/adapters/traces.ts
similarity index 100%
rename from dashboard/app/components/insight/services/adapters/traces.ts
rename to dashboard/src/app/components/insight/services/adapters/traces.ts
diff --git a/dashboard/app/components/insight/services/correlator.ts b/dashboard/src/app/components/insight/services/correlator.ts
similarity index 100%
rename from dashboard/app/components/insight/services/correlator.ts
rename to dashboard/src/app/components/insight/services/correlator.ts
diff --git a/dashboard/app/components/insight/services/gitops.ts b/dashboard/src/app/components/insight/services/gitops.ts
similarity index 100%
rename from dashboard/app/components/insight/services/gitops.ts
rename to dashboard/src/app/components/insight/services/gitops.ts
diff --git a/dashboard/app/components/insight/slo/AlertWizard.tsx b/dashboard/src/app/components/insight/slo/AlertWizard.tsx
similarity index 100%
rename from dashboard/app/components/insight/slo/AlertWizard.tsx
rename to dashboard/src/app/components/insight/slo/AlertWizard.tsx
diff --git a/dashboard/app/components/insight/slo/SLOPanel.tsx b/dashboard/src/app/components/insight/slo/SLOPanel.tsx
similarity index 100%
rename from dashboard/app/components/insight/slo/SLOPanel.tsx
rename to dashboard/src/app/components/insight/slo/SLOPanel.tsx
diff --git a/dashboard/app/components/insight/snippets/SnippetLibrary.tsx b/dashboard/src/app/components/insight/snippets/SnippetLibrary.tsx
similarity index 100%
rename from dashboard/app/components/insight/snippets/SnippetLibrary.tsx
rename to dashboard/src/app/components/insight/snippets/SnippetLibrary.tsx
diff --git a/dashboard/app/components/insight/store/urlState.ts b/dashboard/src/app/components/insight/store/urlState.ts
similarity index 100%
rename from dashboard/app/components/insight/store/urlState.ts
rename to dashboard/src/app/components/insight/store/urlState.ts
diff --git a/dashboard/app/components/insight/store/useInsightState.ts b/dashboard/src/app/components/insight/store/useInsightState.ts
similarity index 100%
rename from dashboard/app/components/insight/store/useInsightState.ts
rename to dashboard/src/app/components/insight/store/useInsightState.ts
diff --git a/dashboard/app/components/insight/topology/NetworkTopologyPanel.tsx b/dashboard/src/app/components/insight/topology/NetworkTopologyPanel.tsx
similarity index 100%
rename from dashboard/app/components/insight/topology/NetworkTopologyPanel.tsx
rename to dashboard/src/app/components/insight/topology/NetworkTopologyPanel.tsx
diff --git a/dashboard/app/components/insight/topology/TopologyCanvas.tsx b/dashboard/src/app/components/insight/topology/TopologyCanvas.tsx
similarity index 100%
rename from dashboard/app/components/insight/topology/TopologyCanvas.tsx
rename to dashboard/src/app/components/insight/topology/TopologyCanvas.tsx
diff --git a/dashboard/app/components/insight/topology/types.ts b/dashboard/src/app/components/insight/topology/types.ts
similarity index 100%
rename from dashboard/app/components/insight/topology/types.ts
rename to dashboard/src/app/components/insight/topology/types.ts
diff --git a/dashboard/app/components/insight/viz/LogsTable.tsx b/dashboard/src/app/components/insight/viz/LogsTable.tsx
similarity index 100%
rename from dashboard/app/components/insight/viz/LogsTable.tsx
rename to dashboard/src/app/components/insight/viz/LogsTable.tsx
diff --git a/dashboard/app/components/insight/viz/LogsTopStats.tsx b/dashboard/src/app/components/insight/viz/LogsTopStats.tsx
similarity index 100%
rename from dashboard/app/components/insight/viz/LogsTopStats.tsx
rename to dashboard/src/app/components/insight/viz/LogsTopStats.tsx
diff --git a/dashboard/app/components/insight/viz/LogsViewer.tsx b/dashboard/src/app/components/insight/viz/LogsViewer.tsx
similarity index 100%
rename from dashboard/app/components/insight/viz/LogsViewer.tsx
rename to dashboard/src/app/components/insight/viz/LogsViewer.tsx
diff --git a/dashboard/app/components/insight/viz/MetricsChart.tsx b/dashboard/src/app/components/insight/viz/MetricsChart.tsx
similarity index 100%
rename from dashboard/app/components/insight/viz/MetricsChart.tsx
rename to dashboard/src/app/components/insight/viz/MetricsChart.tsx
diff --git a/dashboard/app/components/insight/viz/MetricsTable.tsx b/dashboard/src/app/components/insight/viz/MetricsTable.tsx
similarity index 100%
rename from dashboard/app/components/insight/viz/MetricsTable.tsx
rename to dashboard/src/app/components/insight/viz/MetricsTable.tsx
diff --git a/dashboard/app/components/insight/viz/MetricsTopStats.tsx b/dashboard/src/app/components/insight/viz/MetricsTopStats.tsx
similarity index 100%
rename from dashboard/app/components/insight/viz/MetricsTopStats.tsx
rename to dashboard/src/app/components/insight/viz/MetricsTopStats.tsx
diff --git a/dashboard/app/components/insight/viz/TracesTable.tsx b/dashboard/src/app/components/insight/viz/TracesTable.tsx
similarity index 100%
rename from dashboard/app/components/insight/viz/TracesTable.tsx
rename to dashboard/src/app/components/insight/viz/TracesTable.tsx
diff --git a/dashboard/app/components/insight/viz/TracesTopStats.tsx b/dashboard/src/app/components/insight/viz/TracesTopStats.tsx
similarity index 100%
rename from dashboard/app/components/insight/viz/TracesTopStats.tsx
rename to dashboard/src/app/components/insight/viz/TracesTopStats.tsx
diff --git a/dashboard/app/components/insight/viz/TracesWaterfall.tsx b/dashboard/src/app/components/insight/viz/TracesWaterfall.tsx
similarity index 100%
rename from dashboard/app/components/insight/viz/TracesWaterfall.tsx
rename to dashboard/src/app/components/insight/viz/TracesWaterfall.tsx
diff --git a/dashboard/app/components/insight/viz/VizArea.tsx b/dashboard/src/app/components/insight/viz/VizArea.tsx
similarity index 100%
rename from dashboard/app/components/insight/viz/VizArea.tsx
rename to dashboard/src/app/components/insight/viz/VizArea.tsx
diff --git a/dashboard/app/components/mail/ComposeForm.tsx b/dashboard/src/app/components/mail/ComposeForm.tsx
similarity index 100%
rename from dashboard/app/components/mail/ComposeForm.tsx
rename to dashboard/src/app/components/mail/ComposeForm.tsx
diff --git a/dashboard/app/components/mail/Inbox.tsx b/dashboard/src/app/components/mail/Inbox.tsx
similarity index 100%
rename from dashboard/app/components/mail/Inbox.tsx
rename to dashboard/src/app/components/mail/Inbox.tsx
diff --git a/dashboard/app/components/mail/MailCenter.tsx b/dashboard/src/app/components/mail/MailCenter.tsx
similarity index 100%
rename from dashboard/app/components/mail/MailCenter.tsx
rename to dashboard/src/app/components/mail/MailCenter.tsx
diff --git a/dashboard/app/components/mail/MailDashboard.tsx b/dashboard/src/app/components/mail/MailDashboard.tsx
similarity index 100%
rename from dashboard/app/components/mail/MailDashboard.tsx
rename to dashboard/src/app/components/mail/MailDashboard.tsx
diff --git a/dashboard/app/components/mail/MailSettings.tsx b/dashboard/src/app/components/mail/MailSettings.tsx
similarity index 100%
rename from dashboard/app/components/mail/MailSettings.tsx
rename to dashboard/src/app/components/mail/MailSettings.tsx
diff --git a/dashboard/app/components/mail/MessageItem.tsx b/dashboard/src/app/components/mail/MessageItem.tsx
similarity index 100%
rename from dashboard/app/components/mail/MessageItem.tsx
rename to dashboard/src/app/components/mail/MessageItem.tsx
diff --git a/dashboard/app/components/mail/MessageView.tsx b/dashboard/src/app/components/mail/MessageView.tsx
similarity index 100%
rename from dashboard/app/components/mail/MessageView.tsx
rename to dashboard/src/app/components/mail/MessageView.tsx
diff --git a/dashboard/app/components/mail/Toolbar.tsx b/dashboard/src/app/components/mail/Toolbar.tsx
similarity index 100%
rename from dashboard/app/components/mail/Toolbar.tsx
rename to dashboard/src/app/components/mail/Toolbar.tsx
diff --git a/dashboard/app/demo/DemoContent.tsx b/dashboard/src/app/demo/DemoContent.tsx
similarity index 100%
rename from dashboard/app/demo/DemoContent.tsx
rename to dashboard/src/app/demo/DemoContent.tsx
diff --git a/dashboard/app/demo/markdown/page.tsx b/dashboard/src/app/demo/markdown/page.tsx
similarity index 67%
rename from dashboard/app/demo/markdown/page.tsx
rename to dashboard/src/app/demo/markdown/page.tsx
index 2ecf54a..aef7f5d 100644
--- a/dashboard/app/demo/markdown/page.tsx
+++ b/dashboard/src/app/demo/markdown/page.tsx
@@ -1,4 +1,4 @@
-import HomepageLanding from '../../../ui/homepage/page'
+import HomepageLanding from '@modules/homepage/page'
export const dynamic = 'force-static'
diff --git a/dashboard/app/demo/page.tsx b/dashboard/src/app/demo/page.tsx
similarity index 100%
rename from dashboard/app/demo/page.tsx
rename to dashboard/src/app/demo/page.tsx
diff --git a/dashboard/app/demo/theme/page.tsx b/dashboard/src/app/demo/theme/page.tsx
similarity index 96%
rename from dashboard/app/demo/theme/page.tsx
rename to dashboard/src/app/demo/theme/page.tsx
index 9c4f6bb..a67dc81 100644
--- a/dashboard/app/demo/theme/page.tsx
+++ b/dashboard/src/app/demo/theme/page.tsx
@@ -2,8 +2,8 @@
import ThemePreferenceCard from '../../panel/account/ThemePreferenceCard'
import Card from '../../panel/components/Card'
-import { useTheme } from '../../../src/theme'
-import type { ThemeTokens } from '../../../src/theme'
+import { useTheme } from '@components/theme'
+import type { ThemeTokens } from '@components/theme'
const COLOR_TOKENS: Array<{ key: keyof ThemeTokens['colors']; label: string }> = [
{ key: 'background', label: '背景 Background' },
diff --git a/dashboard/app/docs/DocCollectionCard.tsx b/dashboard/src/app/docs/DocCollectionCard.tsx
similarity index 100%
rename from dashboard/app/docs/DocCollectionCard.tsx
rename to dashboard/src/app/docs/DocCollectionCard.tsx
diff --git a/dashboard/app/docs/[collection]/[version]/DocCollectionView.tsx b/dashboard/src/app/docs/[collection]/[version]/DocCollectionView.tsx
similarity index 100%
rename from dashboard/app/docs/[collection]/[version]/DocCollectionView.tsx
rename to dashboard/src/app/docs/[collection]/[version]/DocCollectionView.tsx
diff --git a/dashboard/app/docs/[collection]/[version]/DocReader.tsx b/dashboard/src/app/docs/[collection]/[version]/DocReader.tsx
similarity index 100%
rename from dashboard/app/docs/[collection]/[version]/DocReader.tsx
rename to dashboard/src/app/docs/[collection]/[version]/DocReader.tsx
diff --git a/dashboard/app/docs/[collection]/[version]/DocViewSection.tsx b/dashboard/src/app/docs/[collection]/[version]/DocViewSection.tsx
similarity index 100%
rename from dashboard/app/docs/[collection]/[version]/DocViewSection.tsx
rename to dashboard/src/app/docs/[collection]/[version]/DocViewSection.tsx
diff --git a/dashboard/app/docs/[collection]/[version]/page.tsx b/dashboard/src/app/docs/[collection]/[version]/page.tsx
similarity index 100%
rename from dashboard/app/docs/[collection]/[version]/page.tsx
rename to dashboard/src/app/docs/[collection]/[version]/page.tsx
diff --git a/dashboard/app/docs/[collection]/page.tsx b/dashboard/src/app/docs/[collection]/page.tsx
similarity index 100%
rename from dashboard/app/docs/[collection]/page.tsx
rename to dashboard/src/app/docs/[collection]/page.tsx
diff --git a/dashboard/app/docs/page.tsx b/dashboard/src/app/docs/page.tsx
similarity index 100%
rename from dashboard/app/docs/page.tsx
rename to dashboard/src/app/docs/page.tsx
diff --git a/dashboard/app/docs/resources.server.ts b/dashboard/src/app/docs/resources.server.ts
similarity index 100%
rename from dashboard/app/docs/resources.server.ts
rename to dashboard/src/app/docs/resources.server.ts
diff --git a/dashboard/app/docs/types.ts b/dashboard/src/app/docs/types.ts
similarity index 100%
rename from dashboard/app/docs/types.ts
rename to dashboard/src/app/docs/types.ts
diff --git a/dashboard/app/docs/utils.ts b/dashboard/src/app/docs/utils.ts
similarity index 100%
rename from dashboard/app/docs/utils.ts
rename to dashboard/src/app/docs/utils.ts
diff --git a/dashboard/app/download/[...segments]/page.tsx b/dashboard/src/app/download/[...segments]/page.tsx
similarity index 100%
rename from dashboard/app/download/[...segments]/page.tsx
rename to dashboard/src/app/download/[...segments]/page.tsx
diff --git a/dashboard/app/download/page.tsx b/dashboard/src/app/download/page.tsx
similarity index 100%
rename from dashboard/app/download/page.tsx
rename to dashboard/src/app/download/page.tsx
diff --git a/dashboard/app/globals.css b/dashboard/src/app/globals.css
similarity index 100%
rename from dashboard/app/globals.css
rename to dashboard/src/app/globals.css
diff --git a/dashboard/app/insight/InsightWorkbench.tsx b/dashboard/src/app/insight/InsightWorkbench.tsx
similarity index 100%
rename from dashboard/app/insight/InsightWorkbench.tsx
rename to dashboard/src/app/insight/InsightWorkbench.tsx
diff --git a/dashboard/app/insight/page.tsx b/dashboard/src/app/insight/page.tsx
similarity index 100%
rename from dashboard/app/insight/page.tsx
rename to dashboard/src/app/insight/page.tsx
diff --git a/dashboard/app/layout.tsx b/dashboard/src/app/layout.tsx
similarity index 100%
rename from dashboard/app/layout.tsx
rename to dashboard/src/app/layout.tsx
diff --git a/dashboard/app/logout/LogoutClient.tsx b/dashboard/src/app/logout/LogoutClient.tsx
similarity index 100%
rename from dashboard/app/logout/LogoutClient.tsx
rename to dashboard/src/app/logout/LogoutClient.tsx
diff --git a/dashboard/app/logout/page.tsx b/dashboard/src/app/logout/page.tsx
similarity index 100%
rename from dashboard/app/logout/page.tsx
rename to dashboard/src/app/logout/page.tsx
diff --git a/dashboard/app/page.tsx b/dashboard/src/app/page.tsx
similarity index 84%
rename from dashboard/app/page.tsx
rename to dashboard/src/app/page.tsx
index 7d8db33..4d23412 100644
--- a/dashboard/app/page.tsx
+++ b/dashboard/src/app/page.tsx
@@ -3,10 +3,10 @@ export const dynamic = 'error'
import ArticleFeed from '@components/home/ArticleFeed'
import ProductMatrix from '@components/home/ProductMatrix'
import Sidebar from '@components/home/Sidebar'
-import HomepageLanding from '../ui/homepage/page'
+import HomepageLanding from '@modules/homepage/page'
import { isFeatureEnabled } from '@lib/featureToggles'
-import { getActiveTemplate } from '../src/templateRegistry'
+import { getActiveTemplate } from '@modules/templateRegistry'
export default function HomePage() {
if (!isFeatureEnabled('cmsExperience', '/homepage/dynamic')) {
diff --git a/dashboard/src/app/panel/account/ThemePreferenceCard.tsx b/dashboard/src/app/panel/account/ThemePreferenceCard.tsx
new file mode 100644
index 0000000..4428a3b
--- /dev/null
+++ b/dashboard/src/app/panel/account/ThemePreferenceCard.tsx
@@ -0,0 +1 @@
+export { default } from '@extensions/builtin/user-center/account/ThemePreferenceCard'
diff --git a/dashboard/app/panel/account/page.tsx b/dashboard/src/app/panel/account/page.tsx
similarity index 100%
rename from dashboard/app/panel/account/page.tsx
rename to dashboard/src/app/panel/account/page.tsx
diff --git a/dashboard/app/panel/agent/page.tsx b/dashboard/src/app/panel/agent/page.tsx
similarity index 100%
rename from dashboard/app/panel/agent/page.tsx
rename to dashboard/src/app/panel/agent/page.tsx
diff --git a/dashboard/app/panel/api/page.tsx b/dashboard/src/app/panel/api/page.tsx
similarity index 100%
rename from dashboard/app/panel/api/page.tsx
rename to dashboard/src/app/panel/api/page.tsx
diff --git a/dashboard/app/panel/appearance/page.tsx b/dashboard/src/app/panel/appearance/page.tsx
similarity index 100%
rename from dashboard/app/panel/appearance/page.tsx
rename to dashboard/src/app/panel/appearance/page.tsx
diff --git a/dashboard/src/app/panel/components/Card.tsx b/dashboard/src/app/panel/components/Card.tsx
new file mode 100644
index 0000000..5c35e11
--- /dev/null
+++ b/dashboard/src/app/panel/components/Card.tsx
@@ -0,0 +1 @@
+export { default } from '@extensions/builtin/user-center/components/Card'
diff --git a/dashboard/app/panel/components/Header.tsx b/dashboard/src/app/panel/components/Header.tsx
similarity index 100%
rename from dashboard/app/panel/components/Header.tsx
rename to dashboard/src/app/panel/components/Header.tsx
diff --git a/dashboard/app/panel/components/Sidebar.tsx b/dashboard/src/app/panel/components/Sidebar.tsx
similarity index 100%
rename from dashboard/app/panel/components/Sidebar.tsx
rename to dashboard/src/app/panel/components/Sidebar.tsx
diff --git a/dashboard/app/panel/layout.tsx b/dashboard/src/app/panel/layout.tsx
similarity index 100%
rename from dashboard/app/panel/layout.tsx
rename to dashboard/src/app/panel/layout.tsx
diff --git a/dashboard/app/panel/ldp/page.tsx b/dashboard/src/app/panel/ldp/page.tsx
similarity index 100%
rename from dashboard/app/panel/ldp/page.tsx
rename to dashboard/src/app/panel/ldp/page.tsx
diff --git a/dashboard/app/panel/loading.tsx b/dashboard/src/app/panel/loading.tsx
similarity index 100%
rename from dashboard/app/panel/loading.tsx
rename to dashboard/src/app/panel/loading.tsx
diff --git a/dashboard/app/panel/mail/page.tsx b/dashboard/src/app/panel/mail/page.tsx
similarity index 100%
rename from dashboard/app/panel/mail/page.tsx
rename to dashboard/src/app/panel/mail/page.tsx
diff --git a/dashboard/app/panel/management/page.tsx b/dashboard/src/app/panel/management/page.tsx
similarity index 100%
rename from dashboard/app/panel/management/page.tsx
rename to dashboard/src/app/panel/management/page.tsx
diff --git a/dashboard/app/panel/page.tsx b/dashboard/src/app/panel/page.tsx
similarity index 100%
rename from dashboard/app/panel/page.tsx
rename to dashboard/src/app/panel/page.tsx
diff --git a/dashboard/app/panel/subscription/page.tsx b/dashboard/src/app/panel/subscription/page.tsx
similarity index 100%
rename from dashboard/app/panel/subscription/page.tsx
rename to dashboard/src/app/panel/subscription/page.tsx
diff --git a/dashboard/app/store/mail.store.ts b/dashboard/src/app/store/mail.store.ts
similarity index 100%
rename from dashboard/app/store/mail.store.ts
rename to dashboard/src/app/store/mail.store.ts
diff --git a/dashboard/components/AskAIButton.tsx b/dashboard/src/components/AskAIButton.tsx
similarity index 100%
rename from dashboard/components/AskAIButton.tsx
rename to dashboard/src/components/AskAIButton.tsx
diff --git a/dashboard/components/AskAIDialog.tsx b/dashboard/src/components/AskAIDialog.tsx
similarity index 100%
rename from dashboard/components/AskAIDialog.tsx
rename to dashboard/src/components/AskAIDialog.tsx
diff --git a/dashboard/components/ChatBubble.tsx b/dashboard/src/components/ChatBubble.tsx
similarity index 100%
rename from dashboard/components/ChatBubble.tsx
rename to dashboard/src/components/ChatBubble.tsx
diff --git a/dashboard/components/Contact.tsx b/dashboard/src/components/Contact.tsx
similarity index 100%
rename from dashboard/components/Contact.tsx
rename to dashboard/src/components/Contact.tsx
diff --git a/dashboard/components/DownloadSection.tsx b/dashboard/src/components/DownloadSection.tsx
similarity index 100%
rename from dashboard/components/DownloadSection.tsx
rename to dashboard/src/components/DownloadSection.tsx
diff --git a/dashboard/components/Features.tsx b/dashboard/src/components/Features.tsx
similarity index 100%
rename from dashboard/components/Features.tsx
rename to dashboard/src/components/Features.tsx
diff --git a/dashboard/components/Footer.tsx b/dashboard/src/components/Footer.tsx
similarity index 100%
rename from dashboard/components/Footer.tsx
rename to dashboard/src/components/Footer.tsx
diff --git a/dashboard/components/Hero.tsx b/dashboard/src/components/Hero.tsx
similarity index 100%
rename from dashboard/components/Hero.tsx
rename to dashboard/src/components/Hero.tsx
diff --git a/dashboard/components/LanguageToggle.tsx b/dashboard/src/components/LanguageToggle.tsx
similarity index 100%
rename from dashboard/components/LanguageToggle.tsx
rename to dashboard/src/components/LanguageToggle.tsx
diff --git a/dashboard/ui/components/MarkdownSection.tsx b/dashboard/src/components/MarkdownSection.tsx
similarity index 98%
rename from dashboard/ui/components/MarkdownSection.tsx
rename to dashboard/src/components/MarkdownSection.tsx
index 9c18c9d..7f8e043 100644
--- a/dashboard/ui/components/MarkdownSection.tsx
+++ b/dashboard/src/components/MarkdownSection.tsx
@@ -4,7 +4,7 @@ import { useEffect, useMemo, useState, type ReactNode } from 'react'
import type { JSX } from 'react'
import clsx from 'clsx'
-import type { MarkdownRenderResult } from '../../api/render-markdown'
+import type { MarkdownRenderResult } from '@server/render-markdown'
type MarkdownSectionProps = {
src: string
diff --git a/dashboard/components/Navbar.tsx b/dashboard/src/components/Navbar.tsx
similarity index 100%
rename from dashboard/components/Navbar.tsx
rename to dashboard/src/components/Navbar.tsx
diff --git a/dashboard/components/OpenSource.tsx b/dashboard/src/components/OpenSource.tsx
similarity index 100%
rename from dashboard/components/OpenSource.tsx
rename to dashboard/src/components/OpenSource.tsx
diff --git a/dashboard/components/ReleaseChannelSelector.tsx b/dashboard/src/components/ReleaseChannelSelector.tsx
similarity index 100%
rename from dashboard/components/ReleaseChannelSelector.tsx
rename to dashboard/src/components/ReleaseChannelSelector.tsx
diff --git a/dashboard/components/SourceHint.tsx b/dashboard/src/components/SourceHint.tsx
similarity index 100%
rename from dashboard/components/SourceHint.tsx
rename to dashboard/src/components/SourceHint.tsx
diff --git a/dashboard/components/Terms.tsx b/dashboard/src/components/Terms.tsx
similarity index 100%
rename from dashboard/components/Terms.tsx
rename to dashboard/src/components/Terms.tsx
diff --git a/dashboard/components/auth/AuthLayout.tsx b/dashboard/src/components/auth/AuthLayout.tsx
similarity index 100%
rename from dashboard/components/auth/AuthLayout.tsx
rename to dashboard/src/components/auth/AuthLayout.tsx
diff --git a/dashboard/components/common/QueryChips.tsx b/dashboard/src/components/common/QueryChips.tsx
similarity index 100%
rename from dashboard/components/common/QueryChips.tsx
rename to dashboard/src/components/common/QueryChips.tsx
diff --git a/dashboard/components/common/QueryHistoryPanel.tsx b/dashboard/src/components/common/QueryHistoryPanel.tsx
similarity index 100%
rename from dashboard/components/common/QueryHistoryPanel.tsx
rename to dashboard/src/components/common/QueryHistoryPanel.tsx
diff --git a/dashboard/components/download/Breadcrumbs.tsx b/dashboard/src/components/download/Breadcrumbs.tsx
similarity index 100%
rename from dashboard/components/download/Breadcrumbs.tsx
rename to dashboard/src/components/download/Breadcrumbs.tsx
diff --git a/dashboard/components/download/CardGrid.tsx b/dashboard/src/components/download/CardGrid.tsx
similarity index 100%
rename from dashboard/components/download/CardGrid.tsx
rename to dashboard/src/components/download/CardGrid.tsx
diff --git a/dashboard/components/download/CopyButton.tsx b/dashboard/src/components/download/CopyButton.tsx
similarity index 100%
rename from dashboard/components/download/CopyButton.tsx
rename to dashboard/src/components/download/CopyButton.tsx
diff --git a/dashboard/components/download/DownloadBrowser.tsx b/dashboard/src/components/download/DownloadBrowser.tsx
similarity index 100%
rename from dashboard/components/download/DownloadBrowser.tsx
rename to dashboard/src/components/download/DownloadBrowser.tsx
diff --git a/dashboard/components/download/DownloadListingContent.tsx b/dashboard/src/components/download/DownloadListingContent.tsx
similarity index 100%
rename from dashboard/components/download/DownloadListingContent.tsx
rename to dashboard/src/components/download/DownloadListingContent.tsx
diff --git a/dashboard/components/download/DownloadNotFound.tsx b/dashboard/src/components/download/DownloadNotFound.tsx
similarity index 100%
rename from dashboard/components/download/DownloadNotFound.tsx
rename to dashboard/src/components/download/DownloadNotFound.tsx
diff --git a/dashboard/components/download/DownloadSummary.tsx b/dashboard/src/components/download/DownloadSummary.tsx
similarity index 100%
rename from dashboard/components/download/DownloadSummary.tsx
rename to dashboard/src/components/download/DownloadSummary.tsx
diff --git a/dashboard/components/download/FileTable.tsx b/dashboard/src/components/download/FileTable.tsx
similarity index 100%
rename from dashboard/components/download/FileTable.tsx
rename to dashboard/src/components/download/FileTable.tsx
diff --git a/dashboard/components/download/MarkdownPanel.tsx b/dashboard/src/components/download/MarkdownPanel.tsx
similarity index 100%
rename from dashboard/components/download/MarkdownPanel.tsx
rename to dashboard/src/components/download/MarkdownPanel.tsx
diff --git a/dashboard/components/home/ArticleFeed.tsx b/dashboard/src/components/home/ArticleFeed.tsx
similarity index 100%
rename from dashboard/components/home/ArticleFeed.tsx
rename to dashboard/src/components/home/ArticleFeed.tsx
diff --git a/dashboard/components/home/ArticleFeedClient.tsx b/dashboard/src/components/home/ArticleFeedClient.tsx
similarity index 100%
rename from dashboard/components/home/ArticleFeedClient.tsx
rename to dashboard/src/components/home/ArticleFeedClient.tsx
diff --git a/dashboard/components/home/CommunityFeed.tsx b/dashboard/src/components/home/CommunityFeed.tsx
similarity index 100%
rename from dashboard/components/home/CommunityFeed.tsx
rename to dashboard/src/components/home/CommunityFeed.tsx
diff --git a/dashboard/components/home/ContactPanel.tsx b/dashboard/src/components/home/ContactPanel.tsx
similarity index 100%
rename from dashboard/components/home/ContactPanel.tsx
rename to dashboard/src/components/home/ContactPanel.tsx
diff --git a/dashboard/components/home/ContactPanelClient.tsx b/dashboard/src/components/home/ContactPanelClient.tsx
similarity index 100%
rename from dashboard/components/home/ContactPanelClient.tsx
rename to dashboard/src/components/home/ContactPanelClient.tsx
diff --git a/dashboard/components/home/HeroBanner.tsx b/dashboard/src/components/home/HeroBanner.tsx
similarity index 100%
rename from dashboard/components/home/HeroBanner.tsx
rename to dashboard/src/components/home/HeroBanner.tsx
diff --git a/dashboard/components/home/HeroBannerClient.tsx b/dashboard/src/components/home/HeroBannerClient.tsx
similarity index 100%
rename from dashboard/components/home/HeroBannerClient.tsx
rename to dashboard/src/components/home/HeroBannerClient.tsx
diff --git a/dashboard/components/home/HeroProductTabs.tsx b/dashboard/src/components/home/HeroProductTabs.tsx
similarity index 100%
rename from dashboard/components/home/HeroProductTabs.tsx
rename to dashboard/src/components/home/HeroProductTabs.tsx
diff --git a/dashboard/components/home/ProductMatrix.tsx b/dashboard/src/components/home/ProductMatrix.tsx
similarity index 100%
rename from dashboard/components/home/ProductMatrix.tsx
rename to dashboard/src/components/home/ProductMatrix.tsx
diff --git a/dashboard/components/home/ProductMatrixClient.tsx b/dashboard/src/components/home/ProductMatrixClient.tsx
similarity index 100%
rename from dashboard/components/home/ProductMatrixClient.tsx
rename to dashboard/src/components/home/ProductMatrixClient.tsx
diff --git a/dashboard/components/home/Sidebar.tsx b/dashboard/src/components/home/Sidebar.tsx
similarity index 100%
rename from dashboard/components/home/Sidebar.tsx
rename to dashboard/src/components/home/Sidebar.tsx
diff --git a/dashboard/components/home/SidebarCard.tsx b/dashboard/src/components/home/SidebarCard.tsx
similarity index 100%
rename from dashboard/components/home/SidebarCard.tsx
rename to dashboard/src/components/home/SidebarCard.tsx
diff --git a/dashboard/components/iac/CloudIacCatalog.tsx b/dashboard/src/components/iac/CloudIacCatalog.tsx
similarity index 100%
rename from dashboard/components/iac/CloudIacCatalog.tsx
rename to dashboard/src/components/iac/CloudIacCatalog.tsx
diff --git a/dashboard/components/iac/RunModal.tsx b/dashboard/src/components/iac/RunModal.tsx
similarity index 100%
rename from dashboard/components/iac/RunModal.tsx
rename to dashboard/src/components/iac/RunModal.tsx
diff --git a/dashboard/components/iac/ServiceDetailView.tsx b/dashboard/src/components/iac/ServiceDetailView.tsx
similarity index 100%
rename from dashboard/components/iac/ServiceDetailView.tsx
rename to dashboard/src/components/iac/ServiceDetailView.tsx
diff --git a/dashboard/components/marketing/ProductCommunity.tsx b/dashboard/src/components/marketing/ProductCommunity.tsx
similarity index 100%
rename from dashboard/components/marketing/ProductCommunity.tsx
rename to dashboard/src/components/marketing/ProductCommunity.tsx
diff --git a/dashboard/components/marketing/ProductDocs.tsx b/dashboard/src/components/marketing/ProductDocs.tsx
similarity index 100%
rename from dashboard/components/marketing/ProductDocs.tsx
rename to dashboard/src/components/marketing/ProductDocs.tsx
diff --git a/dashboard/components/marketing/ProductDownload.tsx b/dashboard/src/components/marketing/ProductDownload.tsx
similarity index 100%
rename from dashboard/components/marketing/ProductDownload.tsx
rename to dashboard/src/components/marketing/ProductDownload.tsx
diff --git a/dashboard/components/marketing/ProductEditions.tsx b/dashboard/src/components/marketing/ProductEditions.tsx
similarity index 100%
rename from dashboard/components/marketing/ProductEditions.tsx
rename to dashboard/src/components/marketing/ProductEditions.tsx
diff --git a/dashboard/components/marketing/ProductFaq.tsx b/dashboard/src/components/marketing/ProductFaq.tsx
similarity index 100%
rename from dashboard/components/marketing/ProductFaq.tsx
rename to dashboard/src/components/marketing/ProductFaq.tsx
diff --git a/dashboard/components/marketing/ProductFeatures.tsx b/dashboard/src/components/marketing/ProductFeatures.tsx
similarity index 100%
rename from dashboard/components/marketing/ProductFeatures.tsx
rename to dashboard/src/components/marketing/ProductFeatures.tsx
diff --git a/dashboard/components/marketing/ProductHero.tsx b/dashboard/src/components/marketing/ProductHero.tsx
similarity index 100%
rename from dashboard/components/marketing/ProductHero.tsx
rename to dashboard/src/components/marketing/ProductHero.tsx
diff --git a/dashboard/components/marketing/ProductScenarios.tsx b/dashboard/src/components/marketing/ProductScenarios.tsx
similarity index 100%
rename from dashboard/components/marketing/ProductScenarios.tsx
rename to dashboard/src/components/marketing/ProductScenarios.tsx
diff --git a/dashboard/src/theme/ThemeProvider.tsx b/dashboard/src/components/theme/ThemeProvider.tsx
similarity index 100%
rename from dashboard/src/theme/ThemeProvider.tsx
rename to dashboard/src/components/theme/ThemeProvider.tsx
diff --git a/dashboard/src/theme/dark.ts b/dashboard/src/components/theme/dark.ts
similarity index 100%
rename from dashboard/src/theme/dark.ts
rename to dashboard/src/components/theme/dark.ts
diff --git a/dashboard/src/theme/designTokens.ts b/dashboard/src/components/theme/designTokens.ts
similarity index 100%
rename from dashboard/src/theme/designTokens.ts
rename to dashboard/src/components/theme/designTokens.ts
diff --git a/dashboard/src/theme/index.ts b/dashboard/src/components/theme/index.ts
similarity index 100%
rename from dashboard/src/theme/index.ts
rename to dashboard/src/components/theme/index.ts
diff --git a/dashboard/src/theme/light.ts b/dashboard/src/components/theme/light.ts
similarity index 100%
rename from dashboard/src/theme/light.ts
rename to dashboard/src/components/theme/light.ts
diff --git a/dashboard/src/theme/types.ts b/dashboard/src/components/theme/types.ts
similarity index 100%
rename from dashboard/src/theme/types.ts
rename to dashboard/src/components/theme/types.ts
diff --git a/dashboard/src/theme/useTheme.ts b/dashboard/src/components/theme/useTheme.ts
similarity index 100%
rename from dashboard/src/theme/useTheme.ts
rename to dashboard/src/components/theme/useTheme.ts
diff --git a/dashboard/config/feature-toggles.json b/dashboard/src/config/feature-toggles.json
similarity index 100%
rename from dashboard/config/feature-toggles.json
rename to dashboard/src/config/feature-toggles.json
diff --git a/dashboard/config/index.ts b/dashboard/src/config/index.ts
similarity index 100%
rename from dashboard/config/index.ts
rename to dashboard/src/config/index.ts
diff --git a/dashboard/config/runtime-client.ts b/dashboard/src/config/runtime-client.ts
similarity index 100%
rename from dashboard/config/runtime-client.ts
rename to dashboard/src/config/runtime-client.ts
diff --git a/dashboard/config/runtime-loader.ts b/dashboard/src/config/runtime-loader.ts
similarity index 100%
rename from dashboard/config/runtime-loader.ts
rename to dashboard/src/config/runtime-loader.ts
diff --git a/dashboard/config/runtime-service-config.base.yaml b/dashboard/src/config/runtime-service-config.base.yaml
similarity index 100%
rename from dashboard/config/runtime-service-config.base.yaml
rename to dashboard/src/config/runtime-service-config.base.yaml
diff --git a/dashboard/config/runtime-service-config.prod.yaml b/dashboard/src/config/runtime-service-config.prod.yaml
similarity index 100%
rename from dashboard/config/runtime-service-config.prod.yaml
rename to dashboard/src/config/runtime-service-config.prod.yaml
diff --git a/dashboard/config/runtime-service-config.sit.yaml b/dashboard/src/config/runtime-service-config.sit.yaml
similarity index 100%
rename from dashboard/config/runtime-service-config.sit.yaml
rename to dashboard/src/config/runtime-service-config.sit.yaml
diff --git a/dashboard/content/about/team.md b/dashboard/src/content/about/team.md
similarity index 100%
rename from dashboard/content/about/team.md
rename to dashboard/src/content/about/team.md
diff --git a/dashboard/content/homepage/en/community.md b/dashboard/src/content/homepage/en/community.md
similarity index 100%
rename from dashboard/content/homepage/en/community.md
rename to dashboard/src/content/homepage/en/community.md
diff --git a/dashboard/content/homepage/en/news.md b/dashboard/src/content/homepage/en/news.md
similarity index 100%
rename from dashboard/content/homepage/en/news.md
rename to dashboard/src/content/homepage/en/news.md
diff --git a/dashboard/content/homepage/en/operations.md b/dashboard/src/content/homepage/en/operations.md
similarity index 100%
rename from dashboard/content/homepage/en/operations.md
rename to dashboard/src/content/homepage/en/operations.md
diff --git a/dashboard/content/homepage/en/products.md b/dashboard/src/content/homepage/en/products.md
similarity index 100%
rename from dashboard/content/homepage/en/products.md
rename to dashboard/src/content/homepage/en/products.md
diff --git a/dashboard/content/homepage/en/resources.md b/dashboard/src/content/homepage/en/resources.md
similarity index 100%
rename from dashboard/content/homepage/en/resources.md
rename to dashboard/src/content/homepage/en/resources.md
diff --git a/dashboard/content/homepage/en/support.md b/dashboard/src/content/homepage/en/support.md
similarity index 100%
rename from dashboard/content/homepage/en/support.md
rename to dashboard/src/content/homepage/en/support.md
diff --git a/dashboard/content/homepage/zh/community.md b/dashboard/src/content/homepage/zh/community.md
similarity index 100%
rename from dashboard/content/homepage/zh/community.md
rename to dashboard/src/content/homepage/zh/community.md
diff --git a/dashboard/content/homepage/zh/news.md b/dashboard/src/content/homepage/zh/news.md
similarity index 100%
rename from dashboard/content/homepage/zh/news.md
rename to dashboard/src/content/homepage/zh/news.md
diff --git a/dashboard/content/homepage/zh/operations.md b/dashboard/src/content/homepage/zh/operations.md
similarity index 100%
rename from dashboard/content/homepage/zh/operations.md
rename to dashboard/src/content/homepage/zh/operations.md
diff --git a/dashboard/content/homepage/zh/products.md b/dashboard/src/content/homepage/zh/products.md
similarity index 100%
rename from dashboard/content/homepage/zh/products.md
rename to dashboard/src/content/homepage/zh/products.md
diff --git a/dashboard/content/homepage/zh/resources.md b/dashboard/src/content/homepage/zh/resources.md
similarity index 100%
rename from dashboard/content/homepage/zh/resources.md
rename to dashboard/src/content/homepage/zh/resources.md
diff --git a/dashboard/content/homepage/zh/support.md b/dashboard/src/content/homepage/zh/support.md
similarity index 100%
rename from dashboard/content/homepage/zh/support.md
rename to dashboard/src/content/homepage/zh/support.md
diff --git a/dashboard/i18n/LanguageProvider.tsx b/dashboard/src/i18n/LanguageProvider.tsx
similarity index 100%
rename from dashboard/i18n/LanguageProvider.tsx
rename to dashboard/src/i18n/LanguageProvider.tsx
diff --git a/dashboard/i18n/translations.ts b/dashboard/src/i18n/translations.ts
similarity index 100%
rename from dashboard/i18n/translations.ts
rename to dashboard/src/i18n/translations.ts
diff --git a/dashboard/lib/accessControl.ts b/dashboard/src/lib/accessControl.ts
similarity index 100%
rename from dashboard/lib/accessControl.ts
rename to dashboard/src/lib/accessControl.ts
diff --git a/dashboard/lib/apiProxy.ts b/dashboard/src/lib/apiProxy.ts
similarity index 100%
rename from dashboard/lib/apiProxy.ts
rename to dashboard/src/lib/apiProxy.ts
diff --git a/dashboard/lib/appShellBypass.tsx b/dashboard/src/lib/appShellBypass.tsx
similarity index 100%
rename from dashboard/lib/appShellBypass.tsx
rename to dashboard/src/lib/appShellBypass.tsx
diff --git a/dashboard/lib/authGateway.ts b/dashboard/src/lib/authGateway.ts
similarity index 100%
rename from dashboard/lib/authGateway.ts
rename to dashboard/src/lib/authGateway.ts
diff --git a/dashboard/cms/client.ts b/dashboard/src/lib/cms/client.ts
similarity index 100%
rename from dashboard/cms/client.ts
rename to dashboard/src/lib/cms/client.ts
diff --git a/dashboard/cms/config.ts b/dashboard/src/lib/cms/config.ts
similarity index 100%
rename from dashboard/cms/config.ts
rename to dashboard/src/lib/cms/config.ts
diff --git a/dashboard/cms/content/ContentContext.tsx b/dashboard/src/lib/cms/content/ContentContext.tsx
similarity index 100%
rename from dashboard/cms/content/ContentContext.tsx
rename to dashboard/src/lib/cms/content/ContentContext.tsx
diff --git a/dashboard/cms/content/getting-started.md b/dashboard/src/lib/cms/content/getting-started.md
similarity index 100%
rename from dashboard/cms/content/getting-started.md
rename to dashboard/src/lib/cms/content/getting-started.md
diff --git a/dashboard/cms/content/homepage.ts b/dashboard/src/lib/cms/content/homepage.ts
similarity index 100%
rename from dashboard/cms/content/homepage.ts
rename to dashboard/src/lib/cms/content/homepage.ts
diff --git a/dashboard/cms/content/homepage/contact/items/github-star.md b/dashboard/src/lib/cms/content/homepage/contact/items/github-star.md
similarity index 100%
rename from dashboard/cms/content/homepage/contact/items/github-star.md
rename to dashboard/src/lib/cms/content/homepage/contact/items/github-star.md
diff --git a/dashboard/cms/content/homepage/contact/items/support.md b/dashboard/src/lib/cms/content/homepage/contact/items/support.md
similarity index 100%
rename from dashboard/cms/content/homepage/contact/items/support.md
rename to dashboard/src/lib/cms/content/homepage/contact/items/support.md
diff --git a/dashboard/cms/content/homepage/contact/items/wechat-group.md b/dashboard/src/lib/cms/content/homepage/contact/items/wechat-group.md
similarity index 100%
rename from dashboard/cms/content/homepage/contact/items/wechat-group.md
rename to dashboard/src/lib/cms/content/homepage/contact/items/wechat-group.md
diff --git a/dashboard/cms/content/homepage/contact/items/wechat-official.md b/dashboard/src/lib/cms/content/homepage/contact/items/wechat-official.md
similarity index 100%
rename from dashboard/cms/content/homepage/contact/items/wechat-official.md
rename to dashboard/src/lib/cms/content/homepage/contact/items/wechat-official.md
diff --git a/dashboard/cms/content/homepage/contact/panel.md b/dashboard/src/lib/cms/content/homepage/contact/panel.md
similarity index 100%
rename from dashboard/cms/content/homepage/contact/panel.md
rename to dashboard/src/lib/cms/content/homepage/contact/panel.md
diff --git a/dashboard/cms/content/homepage/hero.md b/dashboard/src/lib/cms/content/homepage/hero.md
similarity index 100%
rename from dashboard/cms/content/homepage/hero.md
rename to dashboard/src/lib/cms/content/homepage/hero.md
diff --git a/dashboard/cms/content/homepage/posts/2024-07-12-community-events.md b/dashboard/src/lib/cms/content/homepage/posts/2024-07-12-community-events.md
similarity index 100%
rename from dashboard/cms/content/homepage/posts/2024-07-12-community-events.md
rename to dashboard/src/lib/cms/content/homepage/posts/2024-07-12-community-events.md
diff --git a/dashboard/cms/content/homepage/posts/2024-07-30-observability-insight.md b/dashboard/src/lib/cms/content/homepage/posts/2024-07-30-observability-insight.md
similarity index 100%
rename from dashboard/cms/content/homepage/posts/2024-07-30-observability-insight.md
rename to dashboard/src/lib/cms/content/homepage/posts/2024-07-30-observability-insight.md
diff --git a/dashboard/cms/content/homepage/posts/2024-08-15-release-notes.md b/dashboard/src/lib/cms/content/homepage/posts/2024-08-15-release-notes.md
similarity index 100%
rename from dashboard/cms/content/homepage/posts/2024-08-15-release-notes.md
rename to dashboard/src/lib/cms/content/homepage/posts/2024-08-15-release-notes.md
diff --git a/dashboard/cms/content/homepage/sidebar/community.md b/dashboard/src/lib/cms/content/homepage/sidebar/community.md
similarity index 100%
rename from dashboard/cms/content/homepage/sidebar/community.md
rename to dashboard/src/lib/cms/content/homepage/sidebar/community.md
diff --git a/dashboard/cms/content/homepage/sidebar/resources.md b/dashboard/src/lib/cms/content/homepage/sidebar/resources.md
similarity index 100%
rename from dashboard/cms/content/homepage/sidebar/resources.md
rename to dashboard/src/lib/cms/content/homepage/sidebar/resources.md
diff --git a/dashboard/cms/content/homepage/sidebar/tags.md b/dashboard/src/lib/cms/content/homepage/sidebar/tags.md
similarity index 100%
rename from dashboard/cms/content/homepage/sidebar/tags.md
rename to dashboard/src/lib/cms/content/homepage/sidebar/tags.md
diff --git a/dashboard/cms/content/homepage/solutions/xcloudflow.md b/dashboard/src/lib/cms/content/homepage/solutions/xcloudflow.md
similarity index 100%
rename from dashboard/cms/content/homepage/solutions/xcloudflow.md
rename to dashboard/src/lib/cms/content/homepage/solutions/xcloudflow.md
diff --git a/dashboard/cms/content/homepage/solutions/xcontrol.md b/dashboard/src/lib/cms/content/homepage/solutions/xcontrol.md
similarity index 100%
rename from dashboard/cms/content/homepage/solutions/xcontrol.md
rename to dashboard/src/lib/cms/content/homepage/solutions/xcontrol.md
diff --git a/dashboard/cms/content/homepage/solutions/xscopehub.md b/dashboard/src/lib/cms/content/homepage/solutions/xscopehub.md
similarity index 100%
rename from dashboard/cms/content/homepage/solutions/xscopehub.md
rename to dashboard/src/lib/cms/content/homepage/solutions/xscopehub.md
diff --git a/dashboard/cms/content/homepage/solutions/xstream.md b/dashboard/src/lib/cms/content/homepage/solutions/xstream.md
similarity index 100%
rename from dashboard/cms/content/homepage/solutions/xstream.md
rename to dashboard/src/lib/cms/content/homepage/solutions/xstream.md
diff --git a/dashboard/cms/content/index.ts b/dashboard/src/lib/cms/content/index.ts
similarity index 100%
rename from dashboard/cms/content/index.ts
rename to dashboard/src/lib/cms/content/index.ts
diff --git a/dashboard/cms/content/source.ts b/dashboard/src/lib/cms/content/source.ts
similarity index 86%
rename from dashboard/cms/content/source.ts
rename to dashboard/src/lib/cms/content/source.ts
index 77bb967..5831cbb 100644
--- a/dashboard/cms/content/source.ts
+++ b/dashboard/src/lib/cms/content/source.ts
@@ -18,7 +18,14 @@ export function resolveContentSource(namespace?: string): ResolvedContentSource
const targetNamespace = namespace ?? cmsConfig.content.defaultNamespace
const source = cmsConfig.content.sources[targetNamespace]
if (!source) {
- const fallbackRoot = path.join(process.cwd(), 'cms', 'content', targetNamespace)
+ const fallbackRoot = path.join(
+ process.cwd(),
+ 'src',
+ 'lib',
+ 'cms',
+ 'content',
+ targetNamespace
+ )
return {
namespace: targetNamespace,
absolutePath: fallbackRoot,
diff --git a/dashboard/cms/contentSources.ts b/dashboard/src/lib/cms/contentSources.ts
similarity index 100%
rename from dashboard/cms/contentSources.ts
rename to dashboard/src/lib/cms/contentSources.ts
diff --git a/dashboard/cms/extensionRuntime.ts b/dashboard/src/lib/cms/extensionRuntime.ts
similarity index 100%
rename from dashboard/cms/extensionRuntime.ts
rename to dashboard/src/lib/cms/extensionRuntime.ts
diff --git a/dashboard/cms/extensions/appShell.tsx b/dashboard/src/lib/cms/extensions/appShell.tsx
similarity index 100%
rename from dashboard/cms/extensions/appShell.tsx
rename to dashboard/src/lib/cms/extensions/appShell.tsx
diff --git a/dashboard/cms/extensions/markdownSync.tsx b/dashboard/src/lib/cms/extensions/markdownSync.tsx
similarity index 100%
rename from dashboard/cms/extensions/markdownSync.tsx
rename to dashboard/src/lib/cms/extensions/markdownSync.tsx
diff --git a/dashboard/cms/index.ts b/dashboard/src/lib/cms/index.ts
similarity index 89%
rename from dashboard/cms/index.ts
rename to dashboard/src/lib/cms/index.ts
index f69e69a..f306acf 100644
--- a/dashboard/cms/index.ts
+++ b/dashboard/src/lib/cms/index.ts
@@ -10,5 +10,5 @@ export {
listRegisteredTemplateNames,
registerTemplate,
registerTemplateLoader,
-} from '../src/templateRegistry'
+} from '@modules/templateRegistry'
export { listContentSourcesMetadata } from './contentSources'
diff --git a/dashboard/cms/package.json b/dashboard/src/lib/cms/package.json
similarity index 100%
rename from dashboard/cms/package.json
rename to dashboard/src/lib/cms/package.json
diff --git a/dashboard/cms/templates/default/config.ts b/dashboard/src/lib/cms/templates/default/config.ts
similarity index 100%
rename from dashboard/cms/templates/default/config.ts
rename to dashboard/src/lib/cms/templates/default/config.ts
diff --git a/dashboard/src/lib/cms/templates/default/index.tsx b/dashboard/src/lib/cms/templates/default/index.tsx
new file mode 100644
index 0000000..7f0e43e
--- /dev/null
+++ b/dashboard/src/lib/cms/templates/default/index.tsx
@@ -0,0 +1,2 @@
+export { default } from '@modules/templates/default'
+export { defaultHomeLayoutConfig } from './config'
diff --git a/dashboard/cms/themes/default/index.tsx b/dashboard/src/lib/cms/themes/default/index.tsx
similarity index 100%
rename from dashboard/cms/themes/default/index.tsx
rename to dashboard/src/lib/cms/themes/default/index.tsx
diff --git a/dashboard/cms/types.ts b/dashboard/src/lib/cms/types.ts
similarity index 95%
rename from dashboard/cms/types.ts
rename to dashboard/src/lib/cms/types.ts
index 4df7362..73e3c48 100644
--- a/dashboard/cms/types.ts
+++ b/dashboard/src/lib/cms/types.ts
@@ -1,6 +1,6 @@
import type { ComponentType, ReactNode } from 'react'
-import type { HomePageTemplateSlots, TemplateRenderProps } from '../src/templates/types'
+import type { HomePageTemplateSlots, TemplateRenderProps } from '@modules/templates/types'
export interface CmsTemplate {
name: string
diff --git a/dashboard/lib/download-data.ts b/dashboard/src/lib/download-data.ts
similarity index 100%
rename from dashboard/lib/download-data.ts
rename to dashboard/src/lib/download-data.ts
diff --git a/dashboard/lib/download-manifest.ts b/dashboard/src/lib/download-manifest.ts
similarity index 100%
rename from dashboard/lib/download-manifest.ts
rename to dashboard/src/lib/download-manifest.ts
diff --git a/dashboard/lib/featureFlags.ts b/dashboard/src/lib/featureFlags.ts
similarity index 100%
rename from dashboard/lib/featureFlags.ts
rename to dashboard/src/lib/featureFlags.ts
diff --git a/dashboard/lib/featureToggles.ts b/dashboard/src/lib/featureToggles.ts
similarity index 100%
rename from dashboard/lib/featureToggles.ts
rename to dashboard/src/lib/featureToggles.ts
diff --git a/dashboard/lib/format.ts b/dashboard/src/lib/format.ts
similarity index 100%
rename from dashboard/lib/format.ts
rename to dashboard/src/lib/format.ts
diff --git a/dashboard/lib/iac/actions.ts b/dashboard/src/lib/iac/actions.ts
similarity index 100%
rename from dashboard/lib/iac/actions.ts
rename to dashboard/src/lib/iac/actions.ts
diff --git a/dashboard/lib/iac/catalog.ts b/dashboard/src/lib/iac/catalog.ts
similarity index 100%
rename from dashboard/lib/iac/catalog.ts
rename to dashboard/src/lib/iac/catalog.ts
diff --git a/dashboard/lib/iac/detail-presets.ts b/dashboard/src/lib/iac/detail-presets.ts
similarity index 100%
rename from dashboard/lib/iac/detail-presets.ts
rename to dashboard/src/lib/iac/detail-presets.ts
diff --git a/dashboard/lib/iac/types.ts b/dashboard/src/lib/iac/types.ts
similarity index 100%
rename from dashboard/lib/iac/types.ts
rename to dashboard/src/lib/iac/types.ts
diff --git a/dashboard/lib/knowledgeBase.ts b/dashboard/src/lib/knowledgeBase.ts
similarity index 100%
rename from dashboard/lib/knowledgeBase.ts
rename to dashboard/src/lib/knowledgeBase.ts
diff --git a/dashboard/lib/mail/apiClient.ts b/dashboard/src/lib/mail/apiClient.ts
similarity index 100%
rename from dashboard/lib/mail/apiClient.ts
rename to dashboard/src/lib/mail/apiClient.ts
diff --git a/dashboard/lib/mail/auth.ts b/dashboard/src/lib/mail/auth.ts
similarity index 100%
rename from dashboard/lib/mail/auth.ts
rename to dashboard/src/lib/mail/auth.ts
diff --git a/dashboard/lib/mail/types.ts b/dashboard/src/lib/mail/types.ts
similarity index 100%
rename from dashboard/lib/mail/types.ts
rename to dashboard/src/lib/mail/types.ts
diff --git a/dashboard/lib/markdown.ts b/dashboard/src/lib/markdown.ts
similarity index 97%
rename from dashboard/lib/markdown.ts
rename to dashboard/src/lib/markdown.ts
index 3b0e5f2..271d5c2 100644
--- a/dashboard/lib/markdown.ts
+++ b/dashboard/src/lib/markdown.ts
@@ -11,7 +11,7 @@ export interface MarkdownFile {
slug: string
}
-const CONTENT_ROOT = path.join(process.cwd(), 'content')
+const CONTENT_ROOT = path.join(process.cwd(), 'src', 'content')
function normalizeQuotes(value: string): string {
const trimmed = value.trim()
diff --git a/dashboard/lib/rbac.ts b/dashboard/src/lib/rbac.ts
similarity index 100%
rename from dashboard/lib/rbac.ts
rename to dashboard/src/lib/rbac.ts
diff --git a/dashboard/ui/lib/markdown.ts b/dashboard/src/lib/ui/markdown.ts
similarity index 50%
rename from dashboard/ui/lib/markdown.ts
rename to dashboard/src/lib/ui/markdown.ts
index d0a5b5d..ee3ba0f 100644
--- a/dashboard/ui/lib/markdown.ts
+++ b/dashboard/src/lib/ui/markdown.ts
@@ -1,9 +1,9 @@
import 'server-only'
-import type { ContentCommitMeta } from '../../api/content-meta'
-import { getContentCommitMeta } from '../../api/content-meta'
-import type { MarkdownRenderResult } from '../../api/render-markdown'
-import { renderMarkdownFile } from '../../api/render-markdown'
+import type { ContentCommitMeta } from '@server/content-meta'
+import { getContentCommitMeta } from '@server/content-meta'
+import type { MarkdownRenderResult } from '@server/render-markdown'
+import { renderMarkdownFile } from '@server/render-markdown'
export async function loadMarkdownSection(path: string): Promise {
return renderMarkdownFile(path)
diff --git a/dashboard/lib/userStore.tsx b/dashboard/src/lib/userStore.tsx
similarity index 100%
rename from dashboard/lib/userStore.tsx
rename to dashboard/src/lib/userStore.tsx
diff --git a/dashboard/src/extensions/__tests__/loader.test.ts b/dashboard/src/modules/extensions/__tests__/loader.test.ts
similarity index 100%
rename from dashboard/src/extensions/__tests__/loader.test.ts
rename to dashboard/src/modules/extensions/__tests__/loader.test.ts
diff --git a/dashboard/src/extensions/builtin/index.ts b/dashboard/src/modules/extensions/builtin/index.ts
similarity index 100%
rename from dashboard/src/extensions/builtin/index.ts
rename to dashboard/src/modules/extensions/builtin/index.ts
diff --git a/dashboard/src/extensions/builtin/user-center/account/MfaSetupPanel.tsx b/dashboard/src/modules/extensions/builtin/user-center/account/MfaSetupPanel.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/account/MfaSetupPanel.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/account/MfaSetupPanel.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/account/ThemePreferenceCard.tsx b/dashboard/src/modules/extensions/builtin/user-center/account/ThemePreferenceCard.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/account/ThemePreferenceCard.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/account/ThemePreferenceCard.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/components/Card.tsx b/dashboard/src/modules/extensions/builtin/user-center/components/Card.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/components/Card.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/components/Card.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/components/UserOverview.tsx b/dashboard/src/modules/extensions/builtin/user-center/components/UserOverview.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/components/UserOverview.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/components/UserOverview.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/components/VlessQrCard.tsx b/dashboard/src/modules/extensions/builtin/user-center/components/VlessQrCard.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/components/VlessQrCard.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/components/VlessQrCard.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/index.ts b/dashboard/src/modules/extensions/builtin/user-center/index.ts
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/index.ts
rename to dashboard/src/modules/extensions/builtin/user-center/index.ts
diff --git a/dashboard/src/extensions/builtin/user-center/lib/api.ts b/dashboard/src/modules/extensions/builtin/user-center/lib/api.ts
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/lib/api.ts
rename to dashboard/src/modules/extensions/builtin/user-center/lib/api.ts
diff --git a/dashboard/src/extensions/builtin/user-center/lib/vless.ts b/dashboard/src/modules/extensions/builtin/user-center/lib/vless.ts
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/lib/vless.ts
rename to dashboard/src/modules/extensions/builtin/user-center/lib/vless.ts
diff --git a/dashboard/src/extensions/builtin/user-center/management/__tests__/ManagementComponents.test.tsx b/dashboard/src/modules/extensions/builtin/user-center/management/__tests__/ManagementComponents.test.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/management/__tests__/ManagementComponents.test.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/management/__tests__/ManagementComponents.test.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/management/components/OverviewCards.tsx b/dashboard/src/modules/extensions/builtin/user-center/management/components/OverviewCards.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/management/components/OverviewCards.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/management/components/OverviewCards.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/management/components/PermissionMatrixEditor.tsx b/dashboard/src/modules/extensions/builtin/user-center/management/components/PermissionMatrixEditor.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/management/components/PermissionMatrixEditor.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/management/components/PermissionMatrixEditor.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/management/components/TrendChart.tsx b/dashboard/src/modules/extensions/builtin/user-center/management/components/TrendChart.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/management/components/TrendChart.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/management/components/TrendChart.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/management/components/UserGroupManagement.tsx b/dashboard/src/modules/extensions/builtin/user-center/management/components/UserGroupManagement.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/management/components/UserGroupManagement.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/management/components/UserGroupManagement.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/routes/account.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/account.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/routes/account.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/routes/account.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/routes/agent.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/agent.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/routes/agent.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/routes/agent.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/routes/api.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/api.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/routes/api.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/routes/api.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/routes/home.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/home.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/routes/home.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/routes/home.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/routes/ldp.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/ldp.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/routes/ldp.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/routes/ldp.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/routes/mail.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/mail.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/routes/mail.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/routes/mail.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/routes/management.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/management.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/routes/management.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/routes/management.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/routes/subscription.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/subscription.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/routes/subscription.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/routes/subscription.tsx
diff --git a/dashboard/src/extensions/builtin/user-center/routes/theme.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/theme.tsx
similarity index 100%
rename from dashboard/src/extensions/builtin/user-center/routes/theme.tsx
rename to dashboard/src/modules/extensions/builtin/user-center/routes/theme.tsx
diff --git a/dashboard/src/extensions/loader.ts b/dashboard/src/modules/extensions/loader.ts
similarity index 100%
rename from dashboard/src/extensions/loader.ts
rename to dashboard/src/modules/extensions/loader.ts
diff --git a/dashboard/src/extensions/types.ts b/dashboard/src/modules/extensions/types.ts
similarity index 100%
rename from dashboard/src/extensions/types.ts
rename to dashboard/src/modules/extensions/types.ts
diff --git a/dashboard/ui/homepage/page.tsx b/dashboard/src/modules/homepage/page.tsx
similarity index 100%
rename from dashboard/ui/homepage/page.tsx
rename to dashboard/src/modules/homepage/page.tsx
diff --git a/dashboard/src/products/registry.test.ts b/dashboard/src/modules/products/registry.test.ts
similarity index 100%
rename from dashboard/src/products/registry.test.ts
rename to dashboard/src/modules/products/registry.test.ts
diff --git a/dashboard/src/products/registry.ts b/dashboard/src/modules/products/registry.ts
similarity index 100%
rename from dashboard/src/products/registry.ts
rename to dashboard/src/modules/products/registry.ts
diff --git a/dashboard/src/products/xcloudflow.ts b/dashboard/src/modules/products/xcloudflow.ts
similarity index 100%
rename from dashboard/src/products/xcloudflow.ts
rename to dashboard/src/modules/products/xcloudflow.ts
diff --git a/dashboard/src/products/xscopehub.ts b/dashboard/src/modules/products/xscopehub.ts
similarity index 100%
rename from dashboard/src/products/xscopehub.ts
rename to dashboard/src/modules/products/xscopehub.ts
diff --git a/dashboard/src/products/xstream.ts b/dashboard/src/modules/products/xstream.ts
similarity index 100%
rename from dashboard/src/products/xstream.ts
rename to dashboard/src/modules/products/xstream.ts
diff --git a/dashboard/src/templateRegistry.ts b/dashboard/src/modules/templateRegistry.ts
similarity index 98%
rename from dashboard/src/templateRegistry.ts
rename to dashboard/src/modules/templateRegistry.ts
index 7a0f228..ff0c60c 100644
--- a/dashboard/src/templateRegistry.ts
+++ b/dashboard/src/modules/templateRegistry.ts
@@ -99,7 +99,7 @@ function filesystemTemplateLoader(name: string): TemplateDefinition | null {
}
if (!name.startsWith(FILE_PREFIX)) {
- const basePath = path.join(process.cwd(), 'src', 'templates', name)
+ const basePath = path.join(process.cwd(), 'src', 'modules', 'templates', name)
const candidates = ['index.js', 'index.cjs']
for (const candidate of candidates) {
const candidatePath = path.join(basePath, candidate)
diff --git a/dashboard/src/templates/default/index.tsx b/dashboard/src/modules/templates/default/index.tsx
similarity index 100%
rename from dashboard/src/templates/default/index.tsx
rename to dashboard/src/modules/templates/default/index.tsx
diff --git a/dashboard/src/templates/layouts/commonHome.tsx b/dashboard/src/modules/templates/layouts/commonHome.tsx
similarity index 100%
rename from dashboard/src/templates/layouts/commonHome.tsx
rename to dashboard/src/modules/templates/layouts/commonHome.tsx
diff --git a/dashboard/src/templates/types.ts b/dashboard/src/modules/templates/types.ts
similarity index 100%
rename from dashboard/src/templates/types.ts
rename to dashboard/src/modules/templates/types.ts
diff --git a/dashboard/server/account/session.ts b/dashboard/src/server/account/session.ts
similarity index 100%
rename from dashboard/server/account/session.ts
rename to dashboard/src/server/account/session.ts
diff --git a/dashboard/api/content-meta.ts b/dashboard/src/server/content-meta.ts
similarity index 100%
rename from dashboard/api/content-meta.ts
rename to dashboard/src/server/content-meta.ts
diff --git a/dashboard/api/content-utils.ts b/dashboard/src/server/content-utils.ts
similarity index 95%
rename from dashboard/api/content-utils.ts
rename to dashboard/src/server/content-utils.ts
index 6c8b53c..987c151 100644
--- a/dashboard/api/content-utils.ts
+++ b/dashboard/src/server/content-utils.ts
@@ -8,7 +8,7 @@ export class ContentNotFoundError extends Error {
}
}
-const CONTENT_ROOT = path.join(process.cwd(), 'content')
+const CONTENT_ROOT = path.join(process.cwd(), 'src', 'content')
export function getContentRoot(): string {
return CONTENT_ROOT
diff --git a/dashboard/api/render-markdown.ts b/dashboard/src/server/render-markdown.ts
similarity index 100%
rename from dashboard/api/render-markdown.ts
rename to dashboard/src/server/render-markdown.ts
diff --git a/dashboard/server/runtime-loader.ts b/dashboard/src/server/runtime-loader.ts
similarity index 98%
rename from dashboard/server/runtime-loader.ts
rename to dashboard/src/server/runtime-loader.ts
index 2c93464..d3b1be3 100644
--- a/dashboard/server/runtime-loader.ts
+++ b/dashboard/src/server/runtime-loader.ts
@@ -6,7 +6,7 @@ import path from 'path'
import yaml from 'js-yaml'
// 使用 process.cwd() 获取项目根目录,避免 __dirname 在生产环境的问题
-const configDir = path.join(process.cwd(), 'config')
+const configDir = path.join(process.cwd(), 'src', 'config')
function loadYamlSource(sourceKey: RuntimeSourceKey): string | undefined {
try {
@@ -289,7 +289,7 @@ export function readRuntimeEnvSettings(): RuntimeEnvSettings {
})
candidates.push({
- path: path.resolve(process.cwd(), 'config', RUNTIME_ENV_CONFIG_BASENAME),
+ path: path.resolve(process.cwd(), 'src', 'config', RUNTIME_ENV_CONFIG_BASENAME),
detectedBy: `file:config/${RUNTIME_ENV_CONFIG_BASENAME}`,
})
diff --git a/dashboard/server/serviceConfig.ts b/dashboard/src/server/serviceConfig.ts
similarity index 100%
rename from dashboard/server/serviceConfig.ts
rename to dashboard/src/server/serviceConfig.ts
diff --git a/dashboard/playwright.config.ts b/dashboard/tests/e2e/playwright.config.ts
similarity index 96%
rename from dashboard/playwright.config.ts
rename to dashboard/tests/e2e/playwright.config.ts
index 60f4874..d4eb717 100644
--- a/dashboard/playwright.config.ts
+++ b/dashboard/tests/e2e/playwright.config.ts
@@ -3,7 +3,7 @@ import { defineConfig, devices } from '@playwright/test'
const PORT = Number(process.env.PORT ?? 3000)
export default defineConfig({
- testDir: './ui/tests/e2e',
+ testDir: './ui',
timeout: 60_000,
expect: {
timeout: 10_000,
diff --git a/dashboard/ui/tests/e2e/auth-pages.spec.ts b/dashboard/tests/e2e/ui/auth-pages.spec.ts
similarity index 100%
rename from dashboard/ui/tests/e2e/auth-pages.spec.ts
rename to dashboard/tests/e2e/ui/auth-pages.spec.ts
diff --git a/dashboard/ui/tests/e2e/homepage.spec.ts b/dashboard/tests/e2e/ui/homepage.spec.ts
similarity index 100%
rename from dashboard/ui/tests/e2e/homepage.spec.ts
rename to dashboard/tests/e2e/ui/homepage.spec.ts
diff --git a/dashboard/ui/components/__tests__/MarkdownSection.test.tsx b/dashboard/tests/unit/components/MarkdownSection.test.tsx
similarity index 96%
rename from dashboard/ui/components/__tests__/MarkdownSection.test.tsx
rename to dashboard/tests/unit/components/MarkdownSection.test.tsx
index c474261..a5e4928 100644
--- a/dashboard/ui/components/__tests__/MarkdownSection.test.tsx
+++ b/dashboard/tests/unit/components/MarkdownSection.test.tsx
@@ -1,7 +1,7 @@
import { render, screen, waitFor } from '@testing-library/react'
import { afterEach, describe, expect, it, vi } from 'vitest'
-import MarkdownSection, { type MarkdownRenderResult } from '../MarkdownSection'
+import MarkdownSection, { type MarkdownRenderResult } from '@components/MarkdownSection'
describe('MarkdownSection', () => {
afterEach(() => {
diff --git a/dashboard/src/__tests__/templateRegistry.test.ts b/dashboard/tests/unit/templateRegistry.test.ts
similarity index 92%
rename from dashboard/src/__tests__/templateRegistry.test.ts
rename to dashboard/tests/unit/templateRegistry.test.ts
index c283cae..22b1338 100644
--- a/dashboard/src/__tests__/templateRegistry.test.ts
+++ b/dashboard/tests/unit/templateRegistry.test.ts
@@ -7,7 +7,7 @@ import { cmsConfig } from '@cms/config'
vi.mock('@cms/content/source', () => ({
resolveContentSource: () => ({
- absolutePath: 'cms/content',
+ absolutePath: 'src/lib/cms/content',
}),
}))
@@ -19,10 +19,10 @@ import {
registerTemplateLoader,
resolveTemplateName,
type TemplateDefinition,
-} from '../templateRegistry'
+} from '@modules/templateRegistry'
const originalTemplateName = cmsConfig.template
-const templateFixturesPath = path.join(process.cwd(), 'src', 'templates', 'fs-template')
+const templateFixturesPath = path.join(process.cwd(), 'src', 'modules', 'templates', 'fs-template')
const runtimeTemplate: TemplateDefinition = {
name: 'runtime',
@@ -99,7 +99,9 @@ describe('templateRegistry', () => {
delete require.cache[templateModulePath]
expect(fs.existsSync(templateModulePath)).toBe(true)
- expect(path.join(process.cwd(), 'src', 'templates', 'fs-template', 'index.js')).toBe(templateModulePath)
+ expect(
+ path.join(process.cwd(), 'src', 'modules', 'templates', 'fs-template', 'index.js')
+ ).toBe(templateModulePath)
cmsConfig.template = 'fs-template'
const template = getActiveTemplate()
diff --git a/dashboard/tests/unit/vitest.config.ts b/dashboard/tests/unit/vitest.config.ts
new file mode 100644
index 0000000..5a7eb9c
--- /dev/null
+++ b/dashboard/tests/unit/vitest.config.ts
@@ -0,0 +1,40 @@
+import path from 'node:path'
+import { defineConfig } from 'vitest/config'
+
+export default defineConfig({
+ test: {
+ environment: 'jsdom',
+ globals: true,
+ setupFiles: ['./vitest.setup.ts'],
+ include: [
+ '../../src/**/*.test.{ts,tsx}',
+ '../../src/**/__tests__/**/*.{ts,tsx}',
+ './**/*.test.{ts,tsx}',
+ './**/__tests__/**/*.{ts,tsx}',
+ ],
+ environmentOptions: {
+ jsdom: {
+ url: 'http://localhost',
+ },
+ },
+ },
+ resolve: {
+ alias: {
+ '@components': path.resolve(__dirname, '..', '..', 'src', 'components'),
+ '@cms': path.resolve(__dirname, '..', '..', 'src', 'lib', 'cms'),
+ '@i18n': path.resolve(__dirname, '..', '..', 'src', 'i18n'),
+ '@lib': path.resolve(__dirname, '..', '..', 'src', 'lib'),
+ '@types': path.resolve(__dirname, '..', '..', 'types'),
+ '@server': path.resolve(__dirname, '..', '..', 'src', 'server'),
+ '@modules': path.resolve(__dirname, '..', '..', 'src', 'modules'),
+ '@extensions': path.resolve(__dirname, '..', '..', 'src', 'modules', 'extensions'),
+ '@templates': path.resolve(__dirname, '..', '..', 'src', 'modules', 'templates'),
+ '@theme': path.resolve(__dirname, '..', '..', 'src', 'components', 'theme'),
+ '@src': path.resolve(__dirname, '..', '..', 'src'),
+ },
+ },
+ esbuild: {
+ loader: 'tsx',
+ jsx: 'automatic',
+ },
+})
diff --git a/dashboard/vitest.setup.ts b/dashboard/tests/unit/vitest.setup.ts
similarity index 100%
rename from dashboard/vitest.setup.ts
rename to dashboard/tests/unit/vitest.setup.ts
diff --git a/dashboard/theme b/dashboard/theme
deleted file mode 120000
index 899bf7d..0000000
--- a/dashboard/theme
+++ /dev/null
@@ -1 +0,0 @@
-src/theme
\ No newline at end of file
diff --git a/dashboard/tsconfig.json b/dashboard/tsconfig.json
index 0991da9..35f6602 100644
--- a/dashboard/tsconfig.json
+++ b/dashboard/tsconfig.json
@@ -17,34 +17,31 @@
"jsx": "react-jsx",
"baseUrl": ".", // 👈 根路径基准
"paths": {
- "@cms": ["cms/index.ts"], // 👈 增加这行以兼容 import "@cms"
- "@cms/*": ["cms/*"],
+ "@cms": ["src/lib/cms/index.ts"], // 👈 增加这行以兼容 import "@cms"
+ "@cms/*": ["src/lib/cms/*"],
- "@components/*": ["components/*"],
- "@i18n/*": ["i18n/*"],
- "@lib/*": ["lib/*"],
+ "@components/*": ["src/components/*"],
+ "@i18n/*": ["src/i18n/*"],
+ "@lib/*": ["src/lib/*"],
"@types/*": ["types/*"],
- "@server/*": ["server/*"],
- "@extensions/*": ["src/extensions/*"],
- "@theme/*": ["src/theme/*"],
- "@templates/*": ["src/templates/*"],
+ "@server/*": ["src/server/*"],
+ "@modules/*": ["src/modules/*"],
+ "@extensions/*": ["src/modules/extensions/*"],
+ "@theme/*": ["src/components/theme/*"],
+ "@templates/*": ["src/modules/templates/*"],
"@src/*": ["src/*"]
},
"types": ["node", "vitest/globals", "@testing-library/jest-dom"],
"plugins": [{ "name": "next" }]
},
"include": [
- "app",
- "cms",
- "components",
- "i18n",
- "lib",
- "ui",
+ "next-env.d.ts",
"src",
- "server",
+ "tests",
+ "scripts",
"types",
".next/types/**/*.ts",
".next/dev/types/**/*.ts"
],
- "exclude": ["node_modules", "config"]
+ "exclude": ["node_modules"]
}
diff --git a/dashboard/vitest.config.ts b/dashboard/vitest.config.ts
deleted file mode 100644
index 1b22505..0000000
--- a/dashboard/vitest.config.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import path from 'node:path'
-import { defineConfig } from 'vitest/config'
-
-export default defineConfig({
- test: {
- environment: 'jsdom',
- globals: true,
- setupFiles: ['./vitest.setup.ts'],
- include: [
- 'app/**/*.test.{ts,tsx}',
- 'app/**/*.__tests__/*.{ts,tsx}',
- 'app/**/__tests__/**/*.{ts,tsx}',
- 'src/**/*.test.{ts,tsx}',
- 'src/**/__tests__/**/*.{ts,tsx}',
- 'ui/**/*.test.{ts,tsx}',
- 'ui/**/__tests__/**/*.{ts,tsx}',
- ],
- environmentOptions: {
- jsdom: {
- url: 'http://localhost',
- },
- },
- },
- resolve: {
- alias: {
- '@components': path.resolve(__dirname, 'components'),
- '@cms': path.resolve(__dirname, 'cms'),
- '@i18n': path.resolve(__dirname, 'i18n'),
- '@lib': path.resolve(__dirname, 'lib'),
- '@types': path.resolve(__dirname, 'types'),
- '@extensions': path.resolve(__dirname, 'src/extensions'),
- '@templates': path.resolve(__dirname, 'src/templates'),
- '@src': path.resolve(__dirname, 'src'),
- },
- },
- esbuild: {
- loader: 'tsx',
- jsx: 'automatic',
- },
-})