From 9d53d1a31c872c60aff36939b129fd6d2e300b3b Mon Sep 17 00:00:00 2001 From: Vercel Date: Mon, 25 May 2026 14:16:32 +0000 Subject: [PATCH] Install Vercel Speed Insights MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implemented Vercel Speed Insights for the Vultkey project ## Overview Successfully installed and configured Vercel Speed Insights following the latest official documentation from https://vercel.com/docs/speed-insights/quickstart. ## Changes Made ### 1. Package Installation - Installed `@vercel/speed-insights` version 2.0.0 - Used pnpm as the package manager (as specified in package.json's packageManager field) - Updated dependencies in package.json - Updated pnpm-lock.yaml to reflect the new dependency ### 2. Integration with Next.js App Router - Modified `src/app/layout.tsx` to integrate Speed Insights - Added import: `import { SpeedInsights } from "@vercel/speed-insights/next";` - Added the `` component at the end of the `` tag - Placement follows the official Next.js App Router documentation pattern ### 3. Verification - ✅ Build completed successfully with no errors - ✅ Linter passed with no issues - ✅ TypeScript compilation successful - ✅ All existing functionality preserved ## Files Modified - `package.json` - Added @vercel/speed-insights dependency - `pnpm-lock.yaml` - Updated lock file with new package and dependencies - `src/app/layout.tsx` - Added SpeedInsights component to root layout ## Implementation Details The SpeedInsights component was added to the root layout file (`src/app/layout.tsx`) which is the entry point for all pages in this Next.js App Router application. The component is placed just before the closing `` tag, following Vercel's recommended pattern for Next.js applications. This ensures that Speed Insights will track performance metrics across all pages of the application once deployed to Vercel and Speed Insights is enabled in the Vercel dashboard. ## Next Steps To complete the setup on Vercel: 1. Deploy this update to Vercel 2. Navigate to the Vercel dashboard 3. Select the project 4. Go to Speed Insights in the sidebar 5. Click "Enable" to activate Speed Insights Once enabled, the application will start collecting performance metrics that can be viewed in the Vercel dashboard. Co-authored-by: Vercel --- package.json | 1 + pnpm-lock.yaml | 34 ++++++++++++++++++++++++++++++++++ src/app/layout.tsx | 2 ++ 3 files changed, 37 insertions(+) diff --git a/package.json b/package.json index 5438d86..f044c8f 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "@tanstack/react-table": "8.21.3", "@upstash/ratelimit": "2.0.8", "@upstash/redis": "1.38.0", + "@vercel/speed-insights": "^2.0.0", "class-variance-authority": "0.7.1", "clsx": "2.1.1", "framer-motion": "12.40.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 845cf39..ab63b88 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,6 +44,9 @@ importers: '@upstash/redis': specifier: 1.38.0 version: 1.38.0 + '@vercel/speed-insights': + specifier: ^2.0.0 + version: 2.0.0(next@16.2.6(@babel/core@7.29.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(react@19.2.6) class-variance-authority: specifier: 0.7.1 version: 0.7.1 @@ -1154,6 +1157,32 @@ packages: '@upstash/redis@1.38.0': resolution: {integrity: sha512-wu+dZBptlLy0+MCUEoHmzrY/TnmgDey3+c7EbIGwrLqAvkP8yi5MWZHYGIFtAygmL4Bkz2TdFu+eU0vFPncIcg==} + '@vercel/speed-insights@2.0.0': + resolution: {integrity: sha512-jwkNcrTeafWxjmWq4AHBaptSqZiJkYU5adLC9QBSqeim0GcqDMgN5Ievh8OG1rJ6W3A4l1oiP7qr9CWxGuzu3w==} + peerDependencies: + '@sveltejs/kit': ^1 || ^2 + next: '>= 13' + nuxt: '>= 3' + react: ^18 || ^19 || ^19.0.0-rc + svelte: '>= 4' + vue: ^3 + vue-router: ^4 + peerDependenciesMeta: + '@sveltejs/kit': + optional: true + next: + optional: true + nuxt: + optional: true + react: + optional: true + svelte: + optional: true + vue: + optional: true + vue-router: + optional: true + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -3563,6 +3592,11 @@ snapshots: dependencies: uncrypto: 0.1.3 + '@vercel/speed-insights@2.0.0(next@16.2.6(@babel/core@7.29.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(react@19.2.6)': + optionalDependencies: + next: 16.2.6(@babel/core@7.29.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + react: 19.2.6 + acorn-jsx@5.3.2(acorn@8.16.0): dependencies: acorn: 8.16.0 diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 18160b0..7a2c75b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata } from "next"; import { Barlow } from "next/font/google"; import { cookies } from "next/headers"; import type { ReactNode } from "react"; +import { SpeedInsights } from "@vercel/speed-insights/next"; import { Providers } from "@/components/providers"; import { themeCookieName } from "@/lib/theme-script"; import "./globals.css"; @@ -35,6 +36,7 @@ export default async function RootLayout({ children }: { children: ReactNode }) {children} + );