Skip to content

Commit 9aa2328

Browse files
committed
cleaning readme
1 parent 1b8a04e commit 9aa2328

20 files changed

Lines changed: 161 additions & 53 deletions

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 6 Degrees
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 90 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,93 @@
11
# Github Stats Page Generator
22

3-
## Todo
3+
A powerful Next.js application that generates beautiful, interactive GitHub statistics dashboards for organizations and personal repositories.
4+
5+
![6 Degrees Github Stats](https://mo9a7i.github.io/github_stats/assets/images/Screenshot 2025-01-23 132648.png)
6+
7+
## 🌟 Features
8+
9+
- **Comprehensive Statistics**
10+
- Repository metrics (stars, forks, issues)
11+
- Code analysis (languages, lines of code)
12+
- Contribution insights
13+
- Development time estimates
14+
15+
- **Interactive Dashboard**
16+
- Dark/light theme support
17+
- Responsive design
18+
- Real-time data updates
19+
- Filterable repository list
20+
21+
- **Advanced Visualization**
22+
- Language distribution charts
23+
- Activity timelines
24+
- Contributor networks
25+
- Performance metrics
26+
27+
## 🚀 Quick Start
28+
29+
1. **Clone the repository**
30+
```bash
31+
git clone https://github.com/yourusername/github_stats.git
32+
cd github_stats
33+
```
34+
35+
2. **Install dependencies**
36+
```bash
37+
pnpm install
38+
```
39+
40+
3. **Set up environment variables**
41+
Create a `.env` file in the root directory:
42+
```env
43+
GH_TOKEN=your_github_personal_access_token
44+
```
45+
46+
4. **Run the development server**
47+
```bash
48+
pnpm dev
49+
```
50+
51+
Open [http://localhost:3000](http://localhost:3000) to view your dashboard.
52+
53+
## 🛠️ Tech Stack
54+
55+
- [Next.js 14](https://nextjs.org/) - React framework
56+
- [React 18](https://reactjs.org/) - UI library
57+
- [Chart.js](https://www.chartjs.org/) - Data visualization
58+
- [Radix UI](https://www.radix-ui.com/) - UI components
59+
- [Tailwind CSS](https://tailwindcss.com/) - Styling
60+
- [GitHub API](https://docs.github.com/en/rest) - Data source
61+
62+
## 📦 Deployment
63+
64+
This application is configured for easy deployment to GitHub Pages using GitHub Actions. The static export ensures optimal performance and reliability.
65+
66+
## 🤝 Contributing
67+
68+
Contributions are welcome! Please feel free to submit a Pull Request.
69+
70+
1. Fork the repository
71+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
72+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
73+
4. Push to the branch (`git push origin feature/AmazingFeature`)
74+
5. Open a Pull Request
75+
76+
## 📝 License
77+
78+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
79+
80+
## 🙏 Acknowledgments
81+
82+
- GitHub API for providing the data
83+
- The amazing open-source community
84+
- All contributors who help improve this project
85+
86+
## 📊 Screenshots
87+
88+
[Add screenshots of your dashboard here]
89+
90+
---
91+
92+
Built with ❤️ for the GitHub community
493

5-
- [ ] all the stats are linked to a page showing the details.
6-
- [ ] add the personal repos as well.
7-
- [ ] add sorting functionality or filtering.
8-
- [ ] add common commits graph somehow.
9-
- [ ] add total commits number and graph.

TODO.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# TODO
2+
3+
- [ ] all the stats are linked to a page showing the details.
4+
- [x] add the personal repos as well.
5+
- [x] add sorting functionality or filtering.
6+
- [ ] add combined commits graph somehow.
7+
- [ ] add total commits number and graph.

components/cards/coffee-cups-card.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
"use client";
22

33
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
4+
import { formatNumber } from "@/lib/utils";
45
import { Coffee } from "lucide-react";
56

67
interface CoffeeCupsCardProps {
78
totalHours: number;
89
}
910

10-
function formatNumber(num: number): string {
11-
return num.toLocaleString(undefined, { maximumFractionDigits: 0 });
12-
}
11+
1312

1413
export function CoffeeCupsCard({ totalHours }: CoffeeCupsCardProps) {
1514
// 4 cups per 8-hour workday
@@ -23,7 +22,7 @@ export function CoffeeCupsCard({ totalHours }: CoffeeCupsCardProps) {
2322
<Coffee className="h-4 w-4 text-muted-foreground" />
2423
</CardHeader>
2524
<CardContent>
26-
<div className="text-2xl font-bold">{formatNumber(totalCups)} cups</div>
25+
<div className="text-5xl font-bold">{formatNumber(totalCups)} cups</div>
2726

2827
</CardContent>
2928
<CardFooter>

components/cards/commits-card.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
2+
import { formatNumber } from "@/lib/utils";
23
import { GitCommit } from "lucide-react"
34

45
interface CommitsCardProps {
@@ -14,7 +15,7 @@ export function CommitsCard({ totalCommits, lastUpdated }: CommitsCardProps) {
1415
<GitCommit className="h-4 w-4 text-muted-foreground" />
1516
</CardHeader>
1617
<CardContent>
17-
<div className="text-2xl font-bold">{totalCommits}</div>
18+
<div className="text-5xl font-bold">{formatNumber(totalCommits)}</div>
1819
<p className="text-xs text-muted-foreground">
1920
Last updated {new Date(lastUpdated).toLocaleDateString()}
2021
</p>

components/cards/contributors-card.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ interface ContributorsCardProps {
1414
}
1515

1616
export function ContributorsCard({ totalContributors, contributors }: ContributorsCardProps) {
17-
const AVATAR_SIZE = "h-8 w-8";
18-
const AVATAR_GROUP_CLASS = "flex flex-wrap -space-x-2 mt-2 overflow-visible";
19-
const AVATAR_CLASS = `inline-block ${AVATAR_SIZE} rounded-full ring-2 ring-white hover:ring-neutral-200 transition-all bg-neutral-800`;
17+
const AVATAR_SIZE = "h-6 w-6";
18+
const AVATAR_GROUP_CLASS = "flex flex-wrap -space-x-1 mt-2 overflow-visible";
19+
const AVATAR_CLASS = `inline-block ${AVATAR_SIZE} rounded-full ring-1 ring-white hover:ring-neutral-200 transition-all bg-neutral-800`;
2020

2121
return (
2222
<Card className="bg-gray-50 dark:bg-[#040113] dark:border-[#0c0339]">
@@ -25,7 +25,7 @@ export function ContributorsCard({ totalContributors, contributors }: Contributo
2525
<Users className="h-4 w-4 text-muted-foreground" />
2626
</CardHeader>
2727
<CardContent>
28-
<div className="text-2xl font-bold">{totalContributors}</div>
28+
<div className="text-5xl font-bold">{totalContributors}</div>
2929
<div className={AVATAR_GROUP_CLASS}>
3030
{contributors.map((contributor) => (
3131
<Link

components/cards/development-time-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function DevelopmentTimeCard({ totalLines }: DevelopmentTimeCardProps) {
3030
<Clock className="h-4 w-4 text-muted-foreground" />
3131
</CardHeader>
3232
<CardContent>
33-
<div className="text-2xl font-bold">{formatHours(totalHours)}</div>
33+
<div className="text-5xl font-bold">{formatHours(totalHours)}</div>
3434

3535
</CardContent>
3636
<CardFooter>

components/cards/homepages-card.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ export function HomepagesCard({ homepages }: HomepagesCardProps) {
2626
}, {} as Record<string, Homepage[]>);
2727

2828
return (
29-
<Card className="bg-gray-50 dark:bg-[#040113] dark:border-[#0c0339] col-span-full">
29+
<Card className="bg-gray-50 dark:bg-[#040113] dark:border-[#0c0339] col-span-full mb-6">
3030
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
3131
<CardTitle className="text-sm font-medium">Project Homepages</CardTitle>
3232
<Globe className="h-4 w-4 text-muted-foreground" />
3333
</CardHeader>
3434
<CardContent>
35-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
35+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
3636
{Object.entries(groupedHomepages).map(([orgName, orgHomepages]) => (
3737
<div key={orgName} className="space-y-2 border rounded-lg p-4 dark:border-neutral-800">
3838
<h3 className="text-sm font-medium">{orgName}</h3>

components/cards/issues-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function IssuesCard({ totalIssues }: IssuesCardProps) {
1313
<AlertCircle className="h-4 w-4 text-muted-foreground" />
1414
</CardHeader>
1515
<CardContent>
16-
<div className="text-2xl font-bold">{totalIssues}</div>
16+
<div className="text-5xl font-bold">{totalIssues}</div>
1717
<p className="text-xs text-muted-foreground">
1818
Open issues
1919
</p>

components/cards/organizations-card.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ interface OrganizationsCardProps {
1414
}
1515

1616
export function OrganizationsCard({ organizations }: OrganizationsCardProps) {
17-
const AVATAR_SIZE = "h-8 w-8";
18-
const AVATAR_GROUP_CLASS = "flex flex-wrap -space-x-2 mt-2 overflow-visible";
19-
const AVATAR_CLASS = `inline-block ${AVATAR_SIZE} rounded-full ring-2 ring-white hover:ring-neutral-200 transition-all bg-neutral-800`;
17+
const AVATAR_SIZE = "h-6 w-6";
18+
const AVATAR_GROUP_CLASS = "flex flex-wrap -space-x-1 mt-2 overflow-visible";
19+
const AVATAR_CLASS = `inline-block ${AVATAR_SIZE} rounded-full ring-1 ring-white hover:ring-neutral-200 transition-all bg-neutral-800`;
2020

2121
return (
2222
<Card className="bg-gray-50 dark:bg-[#040113] dark:border-[#0c0339]">
@@ -25,7 +25,7 @@ export function OrganizationsCard({ organizations }: OrganizationsCardProps) {
2525
<Users className="h-4 w-4 text-muted-foreground" />
2626
</CardHeader>
2727
<CardContent>
28-
<div className="text-2xl font-bold">{organizations.length}</div>
28+
<div className="text-5xl font-bold">{organizations.length}</div>
2929
<div className={AVATAR_GROUP_CLASS}>
3030
{organizations?.map((org) => org && (
3131
<Link
@@ -36,6 +36,7 @@ export function OrganizationsCard({ organizations }: OrganizationsCardProps) {
3636
<Avatar
3737
title={org.name || org.login}
3838
className={AVATAR_CLASS}
39+
3940
>
4041
<AvatarImage src={org.avatar_url} alt={org.login} />
4142
<AvatarFallback>{org?.login?.slice(0, 2)?.toUpperCase() || '??'}</AvatarFallback>

0 commit comments

Comments
 (0)