Commit
·
b429825
1
Parent(s):
e253d75
Update .gitignore
Browse files- .gitignore +4 -1
- CLAUDE.md +0 -60
.gitignore
CHANGED
|
@@ -36,4 +36,7 @@ yarn-error.log*
|
|
| 36 |
next-env.d.ts
|
| 37 |
|
| 38 |
# binary file
|
| 39 |
-
bun.lockb
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
next-env.d.ts
|
| 37 |
|
| 38 |
# binary file
|
| 39 |
+
bun.lockb
|
| 40 |
+
|
| 41 |
+
# CLAUDE.md
|
| 42 |
+
CLAUDE.md
|
CLAUDE.md
DELETED
|
@@ -1,60 +0,0 @@
|
|
| 1 |
-
# CLAUDE.md
|
| 2 |
-
|
| 3 |
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
| 4 |
-
|
| 5 |
-
## Project Overview
|
| 6 |
-
|
| 7 |
-
A Next.js application that displays GitHub-style contribution heatmaps for Korean AI organizations and users, tracking their model/dataset/space releases on Hugging Face. The app fetches data from Hugging Face's public API and visualizes release activity over a rolling 12-month period.
|
| 8 |
-
|
| 9 |
-
## Development Commands
|
| 10 |
-
|
| 11 |
-
```bash
|
| 12 |
-
npm run dev # Start development server (http://localhost:3000)
|
| 13 |
-
npm run build # Build for production
|
| 14 |
-
npm run start # Start production server
|
| 15 |
-
npm run lint # Run ESLint
|
| 16 |
-
```
|
| 17 |
-
|
| 18 |
-
## Architecture
|
| 19 |
-
|
| 20 |
-
### Data Flow
|
| 21 |
-
1. **Static Generation (ISR)**: The main page (`src/pages/index.tsx`) uses `getStaticProps` with 1-hour revalidation to fetch data for all configured providers
|
| 22 |
-
2. **Dynamic Route**: `src/pages/[author]/index.tsx` uses `getServerSideProps` for on-demand heatmap generation for any Hugging Face user/org
|
| 23 |
-
3. **Search Dialog**: Client-side search via `UserSearchDialog` component that fetches data on demand
|
| 24 |
-
|
| 25 |
-
### Key Concepts
|
| 26 |
-
|
| 27 |
-
**Providers**: Organizations grouped under a single entity. Defined in `src/pages/index.tsx` as the `PROVIDERS` array. Each provider has:
|
| 28 |
-
- `color`: Hex color for heatmap visualization
|
| 29 |
-
- `authors`: Array of Hugging Face usernames/orgs that map to this provider (e.g., `["clovaix", "navervision"]` both map to Naver)
|
| 30 |
-
|
| 31 |
-
**Calendar Generation**: `src/utils/calendar.ts` transforms raw Hugging Face model/dataset/space data into:
|
| 32 |
-
- Daily activity counts for the past 12 months
|
| 33 |
-
- Intensity levels (0-4) calculated relative to each provider's average release rate
|
| 34 |
-
- Zero-filled entries for days with no activity
|
| 35 |
-
|
| 36 |
-
**API Integration**: `src/utils/authors.ts` handles all Hugging Face API calls:
|
| 37 |
-
- `fetchOrganizationData()`: Gets org/user metadata (avatar, name, stats) - tries org API first, falls back to user API
|
| 38 |
-
- `fetchAuthorData()`: Fetches all models/datasets/spaces for a given author
|
| 39 |
-
- Falls back gracefully with empty/default data on API errors
|
| 40 |
-
|
| 41 |
-
### Component Structure
|
| 42 |
-
|
| 43 |
-
- **Heatmap**: Core visualization component using `react-activity-calendar` library
|
| 44 |
-
- **ProviderSummary**: Horizontal summary cards showing top providers with ranking badges
|
| 45 |
-
- **OrganizationCard**: Provider header with avatar, name, stats, and verification badges
|
| 46 |
-
- **UserSearchDialog**: Modal for searching any Hugging Face user/org and generating embed codes
|
| 47 |
-
|
| 48 |
-
### Styling
|
| 49 |
-
|
| 50 |
-
- Tailwind CSS with custom config in `tailwind.config.ts`
|
| 51 |
-
- Radix UI primitives via `src/components/ui/` (dialog, button, input, tooltip, avatar)
|
| 52 |
-
- MUI components (`@mui/material`) for specific elements like Avatar and Tooltip in Heatmap
|
| 53 |
-
- Responsive design with mobile-first approach
|
| 54 |
-
|
| 55 |
-
## Adding/Modifying Providers
|
| 56 |
-
|
| 57 |
-
Edit the `PROVIDERS` array in `src/pages/index.tsx`. Each provider needs:
|
| 58 |
-
- A unique color
|
| 59 |
-
- At least one author in the `authors` array
|
| 60 |
-
- The first author is used as the primary key for calendar data aggregation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|