Skip to content

Commit 7b9def3

Browse files
feat: Migrate to Shadcn/ui, add Contributor Insights, and fix errors
This commit includes a major overhaul of your GitHub Analytics dashboard. Key changes: 1. **Error Handling:** * I fixed the "org doesn't exist" error by improving backend API responses (returning 404 for not found orgs) and refining frontend error display to be more specific. 2. **UI Migration to Shadcn/ui and Tailwind CSS:** * I removed Material UI and all its dependencies. * I installed and configured Tailwind CSS and Shadcn/ui. * I converted the main application layout and page structure to use Tailwind CSS and Shadcn theming (backgrounds, typography, etc.). * I rebuilt all core UI components using Shadcn/ui components and/or custom Tailwind styling: * Organization Input Form (Input, Button, Label) * Stats Cards (Card) * Error Message Display (Card) * Repositories Table (Table) * Activity Timeline (custom Tailwind, Card) * I integrated Recharts for data visualization: * Top Repositories Chart (Bar Chart) * Issues Overview Chart (Pie Chart) * Stars Over Time Chart (Line Chart with simulated data) * Commit Activity Chart (Bar Chart with simulated data) * All charts are styled to align with the Shadcn theme using CSS variables. 3. **New Feature: Top Contributors:** * Backend: I extended the `/api/github` route to accept a `type=contributors` parameter. This new functionality fetches contributor data for the top N repositories of an organization, aggregates it, caches it, and returns a sorted list of contributors. * Frontend: * I added a `TopContributorsList` component to display avatars, names (linked to GitHub profiles), total contributions, and repositories contributed to. * I modified the main page to fetch contributor data in parallel with repository data and display it in a new "Top Contributors" card. Your application now has a modern aesthetic, improved error handling, and enhanced analytics capabilities with the new Top Contributors feature. This sets a solid foundation for further feature development.
1 parent 930e077 commit 7b9def3

24 files changed

+1928
-1543
lines changed

components.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "default",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.js",
8+
"css": "src/app/globals.css",
9+
"baseColor": "slate",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils"
16+
}
17+
}

0 commit comments

Comments
 (0)