From ad4f54b8027495da912a19977934134ceb70ae41 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sun, 30 Nov 2025 08:30:27 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 13 +++++++++++ README.md | 3 +++ commands/vercel.md | 34 ++++++++++++++++++++++++++++ plugin.lock.json | 45 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 commands/vercel.md create mode 100644 plugin.lock.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..1038a0e --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,13 @@ +{ + "name": "analytics", + "description": "Web analytics and tracking toolkit - Vercel Analytics, Google Analytics, and more", + "version": "1.0.0", + "author": { + "name": "Kanaeru Labs", + "email": "support@kanaeru.ai", + "url": "https://www.kanaeru.ai" + }, + "commands": [ + "./commands/vercel.md" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..177e1f0 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# analytics + +Web analytics and tracking toolkit - Vercel Analytics, Google Analytics, and more diff --git a/commands/vercel.md b/commands/vercel.md new file mode 100644 index 0000000..a1c30d9 --- /dev/null +++ b/commands/vercel.md @@ -0,0 +1,34 @@ +--- +description: Set up Vercel Analytics and Speed Insights +argument-hint: +tags: [vercel, analytics, monitoring] +--- + +Set up essential Vercel integrations for a React/Vite project. + +## Tasks + +1. **Install Vercel Packages** + - Install @vercel/analytics + - Install @vercel/speed-insights + +2. **Add Components to App** + - Import Analytics and SpeedInsights from their respective packages + - Add both components to the main App component (typically in src/App.tsx or src/main.tsx) + - For React projects, use `/react` imports (not `/next`) + +3. **Create vercel.json for SPA Routing** + - Create vercel.json in project root + - Add rewrite rules to serve index.html for all routes + - This fixes 404 errors when accessing routes directly + +4. **Verify Setup** + - Check that both components are rendered in the app + - Test that direct route access works without 404s + +## Expected Output + +After running this command, the project should have: +- Analytics tracking configured +- Speed Insights monitoring configured +- SPA routing properly configured for Vercel deployment diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..f05c972 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:kanaerulabs/growth-kit:analytics-plugin", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "208ad4cb5f45af75b44f86058baa5422aaeef59e", + "treeHash": "9653d5135937b49638c55802346285cb482a4ca7dfb581aa5f8539acb8d40a97", + "generatedAt": "2025-11-28T10:19:24.608805Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "analytics", + "description": "Web analytics and tracking toolkit - Vercel Analytics, Google Analytics, and more", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "4121ec845ab90765c0fe2c85ba8882dc52535a98668c501ba82dcf230f26270d" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "30feebea52c8681b9f280b6572d7103094a97fa798504ebbc05ba9d828220a6d" + }, + { + "path": "commands/vercel.md", + "sha256": "e9c970a4bda87f5b63ad934aa8685f67293d177a65a14fe255da7ef50bc6d082" + } + ], + "dirSha256": "9653d5135937b49638c55802346285cb482a4ca7dfb581aa5f8539acb8d40a97" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file