portal/package.json
Vercel 5de9abc11e Add Vercel Web Analytics to Next.js
## 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>
2026-01-16 08:48:44 +00:00

104 lines
3.2 KiB
JSON

{
"name": "dashboard",
"version": "1.0.0",
"private": true,
"engines": {
"node": ">=18.17 <23"
},
"scripts": {
"dev": "bash scripts/Dev-MCP-Server.sh && next dev --turbo",
"prebuild": "tsx scripts/generate-content.ts && node scripts/build-contentlayer.mjs",
"build": "next build",
"build:static": "npm run prebuild && next build",
"start": "node ./scripts/start.js",
"lint": "next lint",
"typecheck": "tsc --noEmit",
"format": "prettier --write .",
"preview": "next build && next start",
"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": {
"@aws-sdk/client-s3": "^3.956.0",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-toast": "^1.2.15",
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-tooltip": "^1.2.8",
"@tiptap/core": "^2.10.2",
"@tiptap/pm": "^2.10.2",
"@tiptap/react": "^3.13.0",
"@tiptap/starter-kit": "^3.13.0",
"@vercel/analytics": "^1.6.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"contentlayer": "^0.3.4",
"dompurify": "^3.2.6",
"gray-matter": "^4.0.3",
"html2canvas": "^1.4.1",
"js-yaml": "^4.1.0",
"jszip": "^3.10.1",
"katex": "^0.16.27",
"lucide-react": "^0.319.0",
"marked": "^16.1.2",
"mermaid": "^11.12.2",
"next": "^16.0.9",
"next-contentlayer": "^0.3.4",
"next-mdx-remote": "^5.0.0",
"next-themes": "^0.4.6",
"pdfjs-dist": "^4.2.67",
"prismjs": "^1.30.0",
"prop-types": "^15.8.1",
"qr.js": "0.0.0",
"qrcode": "^1.5.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-grid-layout": "^1.4.4",
"react-pdf": "^9.1.0",
"react-resizable": "^3.0.4",
"sanitize-html": "^2.13.0",
"swr": "^2.3.0",
"tailwind-merge": "^3.4.0",
"zustand": "^4.5.4"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
"@tailwindcss/typography": "^0.5.19",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^14.3.1",
"@testing-library/user-event": "^14.6.1",
"@types/js-yaml": "^4.0.9",
"@types/mdx": "^2.0.13",
"@types/node": "24.0.3",
"@types/prismjs": "^1.26.3",
"@types/react": "^18.3.26",
"@types/react-grid-layout": "^1.3.5",
"@types/sanitize-html": "^2.16.0",
"autoprefixer": "^10.4.16",
"baseline-browser-mapping": "^2.8.32",
"eslint": "8.57.0",
"eslint-config-next": "^15.5.3",
"jsdom": "^24.0.0",
"postcss": "^8.4.32",
"prettier": "^3.3.3",
"tailwindcss": "^3.4.3",
"tsconfig-paths-webpack-plugin": "^4.2.0",
"tsx": "^4.7.1",
"typescript": "^5.4.2",
"vitest": "^4.0.7"
},
"resolutions": {
"glob": "10.5.0"
},
"packageManager": "yarn@4.12.0"
}