A web application that visualizes user activity across different platforms as calendar-style heatmaps.
React application built with Vite, featuring:
- React 19 with TypeScript
- Tailwind CSS
- Clerk Authentication
- TanStack Query
Hono API server built with Node.js:
- TypeScript
- CORS enabled
- Endpoints:
GET /health- Health checkGET /api- Welcome messageGET /api/hello/:name- Personalized greeting
- GitHub Integration: Real commit data using GitHub's GraphQL API (requires token)
- Modular Architecture: Easy to add new platforms by implementing the
HeatmapProviderinterface - Interactive Heatmap: Click on cells to see detailed information
HeatmapProvider: Interface that all platform providers must implementProviderRegistry: Manages and provides access to all registered providersGrid: Renders the calendar-style heatmap grid
- User enters username and selects platform
- Application fetches data from the selected provider
- Data is normalized to
ActivityDataPoint[]format - Heatmap visualization renders the data as a calendar grid
To add support for a new platform (e.g., LeetCode), simply:
- Create a new provider class implementing
HeatmapProvider:
import type { HeatmapProvider, ActivityDataPoint } from '@/providers/heatmap'
export class LeetCodeHeatmapProvider implements HeatmapProvider {
name = 'leetcode'
async fetchData(username: string): Promise<ActivityDataPoint[]> {
// Implement data fetching logic
// Return data in standardized format
}
}- Register it in
ProviderRegistry:
import { LeetCodeHeatmapProvider } from './LeetCodeHeatmapProvider';
constructor() {
// ... existing providers
this.registerProvider(new LeetCodeHeatmapProvider());
}That's it! The new platform will automatically appear in the UI dropdown and work with the existing heatmap visualization.
All providers must return data in this standardized format:
interface ActivityDataPoint {
date: string // ISO date string (YYYY-MM-DD)
count: number // Activity count for that date
}- Data Source: GitHub GraphQL API (with fallback to mock data)
- Authentication: Optional GitHub token for better rate limits
- Data: Daily commit counts
- Data Source: Community LeetCode API
- Data: Daily submissions counts
- Fork the repository
- Create a feature branch
- Implement your changes
- Add tests if applicable
- Submit a pull request