Contributions are welcome! Here's how to get started:
git clone https://github.com/ofershap/cursor-usage-tracker.git
cd cursor-usage-tracker
npm installnpm run dev # Start dev server at localhost:3000
npm run typecheck # Type checking
npm test # Run tests
npm run lint # Lint + format check
npm run format # Auto-format code- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Make your changes
- Run
npm run typecheck && npm test && npm run lint - Commit using conventional commits (
feat:,fix:, etc.) - Push and open a pull request
src/
app/ # Next.js pages and API routes
lib/
cursor-client.ts # Cursor API client
db.ts # SQLite schema and queries
collector.ts # Data collection pipeline
incidents.ts # Incident lifecycle management
types.ts # Shared TypeScript types
anomaly/ # Detection engine (thresholds, z-score, trends)
alerts/ # Slack and email alerting
cli/ # CLI commands (collect, detect)
components/ # React components (charts, dashboard)
tests/ # Vitest test files