Security improvements:
- Remove all debugging and test files (debug-db.js, test-db.js, init-db.js, etc.)
- Remove unused @vercel/postgres endpoint (track-download.js)
- Eliminate .env.production and .env.local files with exposed credentials
- Update documentation to reference correct API endpoint
- Ensure all sensitive data uses environment variables properly
Production ready:
- Only essential files remain for production deployment
- All endpoints use proper environment variable configuration
- Clean, secure codebase ready for main branch merge
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add track-download-supabase.js using @supabase/supabase-js client
- Add init-db.js to check/initialize database tables
- Update dependencies to include Supabase client and latest @vercel/postgres
- Configure Supabase environment variables
- Provide SQL instructions for manual table creation if needed
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove accidentally created nested cli-tool/cli-tool directory
- Add simple tracking test script for local verification
- Confirmed tracking system works correctly with proper error handling
- Both database and telemetry endpoints are functional
- System gracefully handles local vs production differences
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace pool-based connection with @vercel/postgres sql template
- Use Vercel's auto-detection instead of explicit runtime config
- Convert all database queries to sql template literals
- Simplify table creation with proper error handling
- Maintain all functionality while ensuring Vercel compatibility
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix runtime configuration to use @vercel/node instead of nodejs18.x
- Convert API to ES modules for Vercel compatibility
- Add package.json for API function dependencies
- Ensure proper module handling for @vercel/postgres
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
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>