mirror of
https://github.com/davila7/claude-code-templates.git
synced 2026-09-19 01:30:23 +08:00
b5f5c49ec8
Implements a comprehensive download tracking system inspired by npm analytics to monitor component usage and improve popular components. Key features: • Anonymous download tracking for all component types (agents, commands, mcps, settings, hooks) • Vercel + PostgreSQL backend with dual endpoint strategy • Privacy-first design with complete opt-out support • Fire-and-forget tracking that never blocks user experience • Comprehensive test suite and documentation Backend changes: • Created API endpoint /api/track-download.js with PostgreSQL integration • Implemented proper database schema with download_stats aggregation • Added request validation, rate limiting, and security measures • Configured Vercel deployment with database functions CLI changes: • Enhanced TrackingService to support database + telemetry endpoints • Added automatic tracking for all installation types • Implemented graceful fallback when database is unavailable • Maintains existing privacy and opt-out mechanisms Testing & Documentation: • Added comprehensive test suite (test-download-tracking.js) • Created detailed documentation (DOWNLOAD_TRACKING.md) • Included deployment instructions and troubleshooting guide • Added security and compliance information The system respects user privacy by: - Only collecting anonymous usage metrics - Providing multiple opt-out mechanisms (CCT_NO_TRACKING, CCT_NO_ANALYTICS, CI=true) - Never storing personally identifiable information - Using fire-and-forget requests with timeout limits 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
27 lines
588 B
JSON
27 lines
588 B
JSON
{
|
|
"name": "claude-code-templates",
|
|
"version": "1.0.0",
|
|
"description": "Component templates and tracking system for Claude Code",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"dev": "vercel dev",
|
|
"build": "echo 'Build complete'",
|
|
"start": "vercel dev",
|
|
"test": "echo 'No tests specified'"
|
|
},
|
|
"dependencies": {
|
|
"@vercel/postgres": "^0.10.0"
|
|
},
|
|
"devDependencies": {
|
|
"@vercel/node": "^3.0.0"
|
|
},
|
|
"keywords": [
|
|
"claude-code",
|
|
"templates",
|
|
"components",
|
|
"tracking",
|
|
"analytics"
|
|
],
|
|
"author": "Claude Code Templates",
|
|
"license": "MIT"
|
|
} |