diff --git a/frontend/README.md b/frontend/README.md index ab40a66..db647cd 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -14,7 +14,7 @@ XPack WebUI is the flagship frontend interface for the MCP Store ecosystem, desi ### ✨ Key Features -- **🛍️ Comprehensive Marketplace**: Browse, search, and discover MCP services across multiple categories +- **🛍️ Comprehensive Marketplace**: Browse, search, and discover MCP servers across multiple categories - **👤 Multi-tier Authentication**: Secure user and admin authentication systems - **⚙️ Advanced Admin Console**: Complete service management, user administration, and revenue tracking - **🌐 Full Internationalization**: Native support for English and Chinese with extensible i18n framework @@ -110,7 +110,7 @@ src/ │ ├── console/ # Admin console components │ ├── dashboard/ # User dashboard components │ ├── marketplace/ # Marketplace components -│ ├── mcp-services/ # MCP service management +│ ├── mcp-services/ # MCP server management │ ├── user-management/ # User administration │ ├── revenue-management/# Revenue tracking │ ├── system-setting/ # System configuration @@ -129,7 +129,7 @@ src/ │ └── utils/ # Utility functions ├── services/ # Backend API integration │ ├── marketplaceService.ts # Marketplace API -│ ├── mcpService.ts # MCP service API +│ ├── mcpService.ts # MCP server API │ ├── userService.ts # User management API │ ├── revenueService.ts # Revenue tracking API │ ├── paymentChannelService.ts # Payment API @@ -139,7 +139,7 @@ src/ ├── hooks/ # App-specific hooks │ ├── useAdminLogin.tsx # Admin authentication │ ├── useLogin.tsx # User authentication -│ ├── useMCPServicesList.ts # MCP services data +│ ├── useMCPServicesList.ts # MCP servers data │ ├── useMCPServiceDetail.ts # Service details │ ├── useUserManagement.ts # User management │ ├── useRevenueManagement.ts # Revenue data @@ -150,7 +150,7 @@ src/ ├── types/ # TypeScript type definitions │ ├── admin.ts # Admin types │ ├── dashboard.ts # Dashboard types -│ ├── mcp-service.ts # MCP service types +│ ├── mcp-service.ts # MCP server types │ ├── payment.ts # Payment types │ ├── revenue.ts # Revenue types │ ├── system.ts # System types @@ -166,7 +166,7 @@ src/ ### Marketplace Experience -- **Service Discovery**: Advanced search and filtering capabilities for MCP services +- **Service Discovery**: Advanced search and filtering capabilities for MCP servers - **Service Catalog**: Browse services by categories with detailed information - **Service Details**: Comprehensive service documentation and API specifications - **Installation Guides**: Step-by-step integration instructions for developers @@ -178,7 +178,7 @@ src/ ### Admin Console -- **MCP Services Management**: Complete CRUD operations for MCP services +- **MCP Servers Management**: Complete CRUD operations for MCP servers - Service creation and editing with OpenAPI generator - OpenAPI document parsing from files or URLs - Service status management (enabled/disabled) diff --git a/frontend/docs/api.md b/frontend/docs/api.md index 2c6d5ef..2ca7526 100644 --- a/frontend/docs/api.md +++ b/frontend/docs/api.md @@ -47,7 +47,7 @@ const result = await rpcClient.call("marketplace.getServices", { Located in `src/services/marketplaceService.ts`: ```typescript -// Fetch all MCP services +// Fetch all MCP servers export async function fetchServices(): Promise; // Fetch service by ID @@ -352,7 +352,7 @@ function ServicesPage() { ### Public Endpoints -- `GET /api/web/mcp_services` - List all MCP services +- `GET /api/web/mcp_services` - List all MCP servers - `POST /api/web/mcp_service_info` - Get service details by ID - `GET /api/web/categories` - List service categories - `POST /api/auth/login` - User login diff --git a/frontend/docs/development.md b/frontend/docs/development.md index dafb550..ccacd7f 100644 --- a/frontend/docs/development.md +++ b/frontend/docs/development.md @@ -58,7 +58,7 @@ src/ │ ├── console/ # Console management │ ├── dashboard/ # Dashboard components │ ├── marketplace/ # Marketplace components -│ ├── mcp-services/ # MCP service management +│ ├── mcp-services/ # MCP server management │ ├── revenue-management/# Revenue tracking │ ├── system-setting/ # System configuration │ ├── user-management/ # User administration @@ -77,7 +77,7 @@ src/ │ └── utils/ # Utility functions ├── services/ # Backend API integration │ ├── marketplaceService.ts # Marketplace API -│ ├── mcpService.ts # MCP service API +│ ├── mcpService.ts # MCP server API │ ├── userService.ts # User management API │ ├── revenueService.ts # Revenue tracking API │ ├── paymentChannelService.ts # Payment API @@ -87,7 +87,7 @@ src/ ├── hooks/ # App-specific hooks │ ├── useAdminLogin.tsx # Admin authentication │ ├── useLogin.tsx # User authentication -│ ├── useMCPServicesList.ts # MCP services data +│ ├── useMCPServicesList.ts # MCP servers data │ ├── useMCPServiceDetail.ts # Service details │ ├── useUserManagement.ts # User management │ ├── useRevenueManagement.ts # Revenue data @@ -98,7 +98,7 @@ src/ ├── types/ # TypeScript type definitions │ ├── admin.ts # Admin types │ ├── dashboard.ts # Dashboard types -│ ├── mcp-service.ts # MCP service types +│ ├── mcp-service.ts # MCP server types │ ├── payment.ts # Payment types │ ├── revenue.ts # Revenue types │ ├── system.ts # System types diff --git a/frontend/docs/i18n.md b/frontend/docs/i18n.md index f167452..a72c259 100644 --- a/frontend/docs/i18n.md +++ b/frontend/docs/i18n.md @@ -16,34 +16,34 @@ XPack WebUI supports multiple languages using react-i18next. This guide covers h The i18n system is configured in `src/shared/lib/i18n.ts`: ```typescript -import i18n from 'i18next' -import { initReactI18next } from 'react-i18next' -import Backend from 'i18next-http-backend' -import LanguageDetector from 'i18next-browser-languagedetector' +import i18n from "i18next"; +import { initReactI18next } from "react-i18next"; +import Backend from "i18next-http-backend"; +import LanguageDetector from "i18next-browser-languagedetector"; i18n .use(Backend) .use(LanguageDetector) .use(initReactI18next) .init({ - fallbackLng: 'en', - debug: process.env.NODE_ENV === 'development', - + fallbackLng: "en", + debug: process.env.NODE_ENV === "development", + interpolation: { escapeValue: false, }, - - backend: { - loadPath: '/locales/{{lng}}/{{ns}}.json', - }, - - detection: { - order: ['localStorage', 'navigator', 'htmlTag'], - caches: ['localStorage'], - }, - }) -export default i18n + backend: { + loadPath: "/locales/{{lng}}/{{ns}}.json", + }, + + detection: { + order: ["localStorage", "navigator", "htmlTag"], + caches: ["localStorage"], + }, + }); + +export default i18n; ``` ### Translation Files Structure @@ -73,7 +73,7 @@ import { useTranslation } from '@/shared/lib/useTranslation' function MyComponent() { const { t } = useTranslation() - + return (

{t('Welcome')}

@@ -90,7 +90,7 @@ import { useTranslation } from '@/shared/lib/useTranslation' function MarketplaceComponent() { const { t } = useTranslation('marketplace') - + return (

{t('title')}

@@ -106,7 +106,7 @@ function MarketplaceComponent() { function AdminComponent() { const { t: tCommon } = useTranslation('common') const { t: tAdmin } = useTranslation('admin') - + return (
@@ -139,7 +139,7 @@ function AdminComponent() { ```typescript function Component() { const { t } = useTranslation() - + return (

{t('welcome')}

@@ -172,7 +172,7 @@ function Component() { ```typescript function UserProfile() { const { t } = useTranslation() - + return (

{t('user.profile.title')}

@@ -198,7 +198,7 @@ function UserProfile() { function Component() { const { t } = useTranslation() const user = { name: 'John', lastLogin: new Date() } - + return (

{t('greeting', { name: user.name })}

@@ -227,7 +227,7 @@ function Component() { function Component() { const { t } = useTranslation() const count = 5 - + return (

{t('item', { count })}

@@ -255,7 +255,7 @@ function Component() { function Component() { const { t } = useTranslation() const userGender = 'male' - + return (