From ad8cae73639cc13ee51ea3496b4013d5a1da966d Mon Sep 17 00:00:00 2001 From: Sean O'Connor Date: Sun, 30 Nov 2025 18:19:04 -0500 Subject: [PATCH] feat: Replace Vercel analytics with Umami and update CV/resume PDFs. --- .env.example | 6 ++++++ bun.lock | 7 +------ package.json | 4 +--- src/app/layout.tsx | 18 ++++++++++++++---- src/env.js | 11 +++++++++++ 5 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..067553a --- /dev/null +++ b/.env.example @@ -0,0 +1,6 @@ +# Database +DATABASE_URL="postgresql://user:password@localhost:5432/db" + +# Umami Analytics +NEXT_PUBLIC_UMAMI_WEBSITE_ID="" +NEXT_PUBLIC_UMAMI_SCRIPT_URL="https://analytics.umami.is/script.js" diff --git a/bun.lock b/bun.lock index c47d6b0..51622ca 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "personal-website", @@ -19,8 +20,6 @@ "@react-pdf/renderer": "^4.3.0", "@t3-oss/env-nextjs": "^0.11.1", "@types/pdfjs-dist": "^2.10.378", - "@vercel/analytics": "^1.5.0", - "@vercel/speed-insights": "^1.2.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cn": "^0.1.1", @@ -439,10 +438,6 @@ "@unrs/rspack-resolver-binding-win32-x64-msvc": ["@unrs/rspack-resolver-binding-win32-x64-msvc@1.3.0", "", { "os": "win32", "cpu": "x64" }, "sha512-IYuXJCuwBOVV0H73l6auaZwtAPHjCPBJkxd4Co0yO6dSjDM5Na5OceaxhUmJLZ3z8kuEGhTYWIHH7PchGztnlg=="], - "@vercel/analytics": ["@vercel/analytics@1.5.0", "", { "peerDependencies": { "@remix-run/react": "^2", "@sveltejs/kit": "^1 || ^2", "next": ">= 13", "react": "^18 || ^19 || ^19.0.0-rc", "svelte": ">= 4", "vue": "^3", "vue-router": "^4" }, "optionalPeers": ["@remix-run/react", "@sveltejs/kit", "next", "react", "svelte", "vue", "vue-router"] }, "sha512-MYsBzfPki4gthY5HnYN7jgInhAZ7Ac1cYDoRWFomwGHWEX7odTEzbtg9kf/QSo7XEsEAqlQugA6gJ2WS2DEa3g=="], - - "@vercel/speed-insights": ["@vercel/speed-insights@1.2.0", "", { "peerDependencies": { "@sveltejs/kit": "^1 || ^2", "next": ">= 13", "react": "^18 || ^19 || ^19.0.0-rc", "svelte": ">= 4", "vue": "^3", "vue-router": "^4" }, "optionalPeers": ["@sveltejs/kit", "next", "react", "svelte", "vue", "vue-router"] }, "sha512-y9GVzrUJ2xmgtQlzFP2KhVRoCglwfRQgjyfY607aU0hh0Un6d0OUyrJkjuAlsV18qR4zfoFPs/BiIj9YDS6Wzw=="], - "abs-svg-path": ["abs-svg-path@0.1.1", "", {}, "sha512-d8XPSGjfyzlXC3Xx891DJRyZfqk5JU0BJrDQcsWomFIV1/BIzPW5HDH5iDdWpqWaav0YVIEzT1RHTwWr0FFshA=="], "acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], diff --git a/package.json b/package.json index 74d75b2..2a60533 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,6 @@ "@react-pdf/renderer": "^4.3.0", "@t3-oss/env-nextjs": "^0.11.1", "@types/pdfjs-dist": "^2.10.378", - "@vercel/analytics": "^1.5.0", - "@vercel/speed-insights": "^1.2.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cn": "^0.1.1", @@ -70,4 +68,4 @@ "initVersion": "7.37.0" }, "packageManager": "bun@1.12.1" -} +} \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e116ff6..3311061 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,6 +1,7 @@ -import { Analytics } from "@vercel/analytics/react"; -import { SpeedInsights } from "@vercel/speed-insights/next"; + +import Script from "next/script"; import type { Metadata } from "next"; +import { env } from "~/env"; import { Footer } from "~/components/Footer"; import { Navigation } from "~/components/Navigation"; import { Sidebar } from "~/components/Sidebar"; @@ -23,8 +24,17 @@ export default function RootLayout({ children }: React.PropsWithChildren) { className="flex min-h-screen flex-col bg-background font-sans text-foreground" suppressHydrationWarning > - - + {env.NEXT_PUBLIC_UMAMI_WEBSITE_ID && ( +