- Replaced MDXRemote with marked to avoid React version conflicts
- /docs page now successfully renders index.md content
- Verified working in production build
- Created scripts/prebuild.sh to consolidate all prebuild steps
- Updated scripts/sync-doc-content.sh to aggregate docs from all services:
- console.svc.plus → src/content/doc/01-console
- accounts.svc.plus → src/content/doc/02-accounts
- rag-server.svc.plus → src/content/doc/03-rag-server
- postgresql.svc.plus → src/content/doc/04-postgresql
- Auto-generates src/content/doc/index.md with service overview
- Simplified package.json prebuild to single script call
- Preserves TypeScript/Node.js scripts (generate-content.ts, build-contentlayer.mjs)
This ensures documentation is always fresh from source repos during build.
- Replaced docs landing page with a direct redirect to content
- Implemented 3-column layout: Sticky Sidebar, Main Content, Right Metadata
- added DocsSidebar with collapsible categories
- Added Feedback component for user sentiment
- Updated sync script to pull from knowledge/docs
- Refactored doc version page styles
- Changed from horizontal single-row to vertical two-row layout
- First row: tagline text (云原生 · 去平台绑定 · 可自由迁移)
- Second row: tech stack pills (Next.js, Go, Vercel, Cloud Run, PostgreSQL)
- Both rows are left-aligned for better visual hierarchy
- Added flex-wrap to tech stack for responsive behavior
- Changed application count from ~150k to 0+ (ready for API integration)
- Changed daily users from ~330k to 0+ (ready for API integration)
- Kept examples & guides count at 7 (actual value)
- Maintains all three stat labels for future data population
- Remove internalApiBaseUrl configuration from all runtime configs
- Simplify serviceConfig.ts to use apiBaseUrl for both internal and external API calls
- Remove localhost:8090 fallback, all API requests now route to Cloud Run RAG server
- This enables a fully distributed microservices architecture without local dependencies
Changes:
- src/config/runtime-service-config.base.yaml: removed internalApiBaseUrl
- src/config/runtime-service-config.prod.yaml: removed internalApiBaseUrl from cn and global regions
- src/server/serviceConfig.ts: simplified getInternalServerServiceBaseUrl() to use getServerServiceBaseUrl()
Tested: Local dev server successfully connects to RAG server at https://rag-server-svc-plus-266500572462.asia-northeast1.run.app
- Implemented a new Material 3-inspired layout for the services page, following the user's design reference.
- Added a theme switcher to toggle between the original ("classic") and the new ("material") layouts.
- The theme preference is persisted in `localStorage` using a Zustand store.
- Ensured proper server-side rendering and client-side hydration by creating a custom `useViewStore` hook that prevents hydration mismatches.
- Created new components for the Material 3 layout: `Sidebar`, `Header`, and `Material3Layout`.
- Refactored the main services page (`src/app/services/page.tsx`) to conditionally render either the classic or material layout based on the selected theme.
- Moved the theme switcher to the `Footer` component to make it accessible in both views.
- Added a Playwright test to verify the functionality of the theme switcher.
## Vercel Web Analytics Integration Report
### Summary
Successfully installed and configured Vercel Web Analytics for the Next.js App Router project.
### Changes Made
#### 1. Installation
- Installed `@vercel/analytics@^1.6.1` package using npm with `--legacy-peer-deps` flag to handle existing peer dependency conflicts in the project
- Updated `package.json` to include the new dependency
- Updated `yarn.lock` to reflect the new package dependency
#### 2. Code Changes
- **Modified:** `src/app/layout.tsx` (Root Layout File)
- Added import: `import { Analytics } from '@vercel/analytics/next'`
- Added `<Analytics />` component inside the `<body>` tag, positioned after `<AppProviders>{children}</AppProviders>`
- This placement ensures Analytics tracking initializes after the app providers are set up
#### 3. Files Modified
- `src/app/layout.tsx` - Added Analytics import and component
- `package.json` - Added @vercel/analytics dependency
- `yarn.lock` - Updated with new dependency information
- `next-env.d.ts` - Auto-generated Next.js types (no manual changes)
#### 4. Implementation Details
- **Router Type:** App Router (uses `src/app` directory structure)
- **Import Location:** `@vercel/analytics/next` - the Next.js-specific export
- **Component Placement:** Inside the `<body>` tag after AppProviders as recommended
- **Existing Configuration:** Preserved all existing code including Google Analytics and other metadata
### Build Verification
✅ Build completed successfully
✅ All 63 static pages generated without errors
✅ No TypeScript compilation errors introduced by changes
### Notes
- The project uses yarn as its package manager, but npm was used for installation due to corepack permission limitations in the environment. The package.json and yarn.lock have been properly updated.
- Vercel Web Analytics will now automatically track web vitals and user analytics without requiring any additional configuration.
- The Analytics component is non-intrusive and won't affect the existing Google Analytics tracking already in place.
- The build completed successfully, indicating the Analytics component integrates properly with the Next.js app.
### Compatibility
- Next.js version: ^16.0.9
- React version: ^18.2.0
- Vercel Analytics: ^1.6.1
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>