Skip to content

Commit e882c27

Browse files
Merge branch 'main' into feat/optimize-api-requests-debounce
2 parents 1faa61d + 3744344 commit e882c27

11 files changed

Lines changed: 468 additions & 227 deletions

File tree

.github/workflows/auto-label-gssoc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ jobs:
2727
labels: |
2828
level:intermediate
2929
quality:clean
30+
type:accessibility
3031
gssoc:approved

CONTRIBUTING.md

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,130 @@
1-
# 🌟 Contributing to GitHub Tracker
1+
# 🌟 Contributing to GitHub Tracker
22

3-
Thank you for showing interest in **GitHub Tracker**! 🚀
4-
Whether you're here to fix a bug, propose an enhancement, or add a new feature, we’re thrilled to welcome you aboard. Let’s build something awesome together!
3+
Thank you for showing interest in **GitHub Tracker**! 🚀
4+
Whether you're here to fix a bug, propose an enhancement, or add a new feature, we’re thrilled to welcome you aboard. Let’s build something awesome together!
55

6-
<br>
6+
<br>
77

8-
## 🧑‍⚖️ Code of Conduct
8+
## 🧑‍⚖️ Code of Conduct
99

10-
Please make sure to read and adhere to our [Code of Conduct](https://github.com/GitMetricsLab/github_tracker/CODE_OF_CONDUCT.md) before contributing. We aim to foster a respectful and inclusive environment for everyone.
10+
Please make sure to read and adhere to our [Code of Conduct](https://github.com/GitMetricsLab/github_tracker/CODE_OF_CONDUCT.md) before contributing. We aim to foster a respectful and inclusive environment for everyone.
1111

12-
<br>
12+
<br>
1313

14-
## 🛠 Project Structure
14+
## 🛠 Project Structure
1515

16-
```bash
17-
github_tracker/
18-
├── backend/ # Node.js + Express backend
19-
│ ├── routes/ # API routes
20-
│ ├── controllers/ # Logic handlers
21-
│ └── index.js # Entry point for server
22-
23-
├── frontend/ # React + Vite frontend
24-
│ ├── components/ # Reusable UI components
25-
│ ├── pages/ # Main pages/routes
26-
│ └── main.jsx # Root file
27-
28-
├── public/ # Static assets like images
29-
30-
├── .gitignore
31-
├── README.md
32-
├── package.json
33-
├── tailwind.config.js
34-
└── CONTRIBUTING.md
35-
```
16+
```bash
17+
github_tracker/
18+
├── backend/ # Node.js + Express backend
19+
│ ├── routes/ # API routes
20+
│ ├── controllers/ # Logic handlers
21+
│ └── index.js # Entry point for server
22+
23+
├── frontend/ # React + Vite frontend
24+
│ ├── components/ # Reusable UI components
25+
│ ├── pages/ # Main pages/routes
26+
│ └── main.jsx # Root file
27+
28+
├── public/ # Static assets like images
29+
30+
├── .gitignore
31+
├── README.md
32+
├── package.json
33+
├── tailwind.config.js
34+
└── CONTRIBUTING.md
35+
```
3636

37-
---
37+
---
3838

39-
## 🤝 How to Contribute
39+
## 🤝 How to Contribute
4040

41-
### 🧭 First-Time Contribution Steps
41+
### 🧭 First-Time Contribution Steps
4242

43-
1. **Fork the Repository** 🍴
44-
Click "Fork" to create your own copy under your GitHub account.
43+
1. **Fork the Repository** 🍴
44+
Click "Fork" to create your own copy under your GitHub account.
4545

46-
2. **Clone Your Fork** 📥
47-
```bash
48-
git clone https://github.com/<your-username>/github_tracker.git
49-
```
46+
2. **Clone Your Fork** 📥
47+
```bash
48+
git clone https://github.com/<your-username>/github_tracker.git
49+
```
5050

51-
3. **Navigate to the Project Folder** 📁
52-
```bash
53-
cd github_tracker
54-
```
51+
3. **Navigate to the Project Folder** 📁
52+
```bash
53+
cd github_tracker
54+
```
5555

56-
4. **Create a New Branch** 🌿
57-
```bash
58-
git checkout -b your-feature-name
59-
```
56+
4. **Create a New Branch** 🌿
57+
```bash
58+
git checkout -b your-feature-name
59+
```
6060

61-
5. **Make Your Changes**
62-
After modifying files, stage and commit:
61+
5. **Make Your Changes**
62+
After modifying files, stage and commit:
6363

64-
```bash
65-
git add .
66-
git commit -m "✨ Added [feature/fix]: your message"
67-
```
64+
```bash
65+
git add .
66+
git commit -m "✨ Added [feature/fix]: your message"
67+
```
6868

69-
6. **Push Your Branch to GitHub** 🚀
70-
```bash
71-
git push origin your-feature-name
72-
```
69+
6. **Push Your Branch to GitHub** 🚀
70+
```bash
71+
git push origin your-feature-name
72+
```
7373

74-
7. **Open a Pull Request** 🔁
75-
Go to the original repo and click **Compare & pull request**.
76-
77-
---
74+
7. **Open a Pull Request** 🔁
75+
Go to the original repo and click **Compare & pull request**.
76+
77+
---
7878

79-
## 🚦 Pull Request Guidelines
79+
## 🚦 Pull Request Guidelines
8080

81-
### **Split Big Changes into Multiple Commits**
82-
- When making large or complex changes, break them into smaller, logical commits.
83-
- Each commit should represent a single purpose or unit of change (e.g. refactoring, adding a feature, fixing a bug).
84-
---
85-
- ✅ Ensure your code builds and runs without errors.
86-
- 🧪 Include tests where applicable.
87-
- 💬 Add comments if the logic is non-trivial.
88-
- 📸 Attach screenshots for UI-related changes.
89-
- 🔖 Use meaningful commit messages and titles.
81+
### **Split Big Changes into Multiple Commits**
82+
- When making large or complex changes, break them into smaller, logical commits.
83+
- Each commit should represent a single purpose or unit of change (e.g. refactoring, adding a feature, fixing a bug).
84+
---
85+
- ✅ Ensure your code builds and runs without errors.
86+
- 🧪 Include tests where applicable.
87+
- 💬 Add comments if the logic is non-trivial.
88+
- 📸 Attach screenshots for UI-related changes.
89+
- 🔖 Use meaningful commit messages and titles.
9090

91-
---
91+
---
9292

93-
## 🐞 Reporting Issues
93+
## 🐞 Reporting Issues
9494

95-
If you discover a bug or have a suggestion:
95+
If you discover a bug or have a suggestion:
9696

97-
➡️ [Open an Issue](https://github.com/GitMetricsLab/github_tracker/issues/new/choose)
97+
➡️ [Open an Issue](https://github.com/GitMetricsLab/github_tracker/issues/new/choose)
9898

99-
Please include:
99+
Please include:
100100

101-
- **Steps to Reproduce**
102-
- **Expected vs. Actual Behavior**
103-
- **Screenshots/Logs (if any)**
101+
- **Steps to Reproduce**
102+
- **Expected vs. Actual Behavior**
103+
- **Screenshots/Logs (if any)**
104104

105-
---
105+
---
106106

107-
## 🧠 Good Coding Practices
107+
## 🧠 Good Coding Practices
108108

109-
1. **Consistent Style**
110-
Stick to the project's linting and formatting conventions (e.g., ESLint, Prettier, Tailwind classes).
109+
1. **Consistent Style**
110+
Stick to the project's linting and formatting conventions (e.g., ESLint, Prettier, Tailwind classes).
111111
112-
2. **Meaningful Naming**
113-
Use self-explanatory names for variables and functions.
112+
2. **Meaningful Naming**
113+
Use self-explanatory names for variables and functions.
114114
115-
3. **Avoid Duplication**
116-
Keep your code DRY (Don't Repeat Yourself).
115+
3. **Avoid Duplication**
116+
Keep your code DRY (Don't Repeat Yourself).
117117

118-
4. **Testing**
119-
Add unit or integration tests for any new logic.
118+
4. **Testing**
119+
Add unit or integration tests for any new logic.
120120

121-
5. **Review Others’ PRs**
122-
Help others by reviewing their PRs too!
121+
5. **Review Others’ PRs**
122+
Help others by reviewing their PRs too!
123123

124-
---
124+
---
125125

126-
## 🙌 Thank You!
126+
## 🙌 Thank You!
127127

128-
We’re so glad you’re here. Your time and effort are deeply appreciated. Feel free to reach out via Issues or Discussions if you need any help.
128+
We’re so glad you’re here. Your time and effort are deeply appreciated. Feel free to reach out via Issues or Discussions if you need any help.
129129

130-
**Happy Coding!** 💻🚀
130+
**Happy Coding!** 💻🚀

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "GitHub Tracker",
2+
"name": "github-tracker",
33
"private": true,
44
"version": "0.0.0",
55
"type": "module",

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function App() {
1212
const isFullscreen = FULLSCREEN_ROUTES.includes(location.pathname);
1313

1414
return (
15-
<div className="relative flex flex-col min-h-screen">
15+
<div className="relative bg-[#1F2937] flex flex-col min-h-screen">
1616
{!isFullscreen && <ScrollProgressBar />}
1717

1818
{!isFullscreen && <Navbar />}

src/Routes/Router.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Contributors from "../pages/Contributors/Contributors";
66
import Signup from "../pages/Signup/Signup.tsx";
77
import Login from "../pages/Login/Login.tsx";
88
import ContributorProfile from "../pages/ContributorProfile/ContributorProfile.tsx";
9+
import Custom404 from "../pages/404.tsx";
910
import Home from "../pages/Home/Home.tsx";
1011
import Activity from "../pages/Activity.tsx";
1112

@@ -20,6 +21,7 @@ const Router = () => {
2021
<Route path="/contact" element={<Contact />} />
2122
<Route path="/contributors" element={<Contributors />} />
2223
<Route path="/contributor/:username" element={<ContributorProfile />} />
24+
<Route path="*" element={<Custom404 />} />
2325

2426
{/* ✅ new route */}
2527
<Route path="/activity" element={<Activity />} />

src/components/Footer.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { useState } from 'react';
1+
import React, { useState } from 'react';
2+
import { FaGithub, FaDiscord, FaArrowRight } from 'react-icons/fa';
3+
import { FaXTwitter } from 'react-icons/fa6';
24
import { Link } from 'react-router-dom';
35
import {
46
FaGithub,
@@ -154,15 +156,14 @@ function Footer() {
154156
>
155157
<FaGithub className="h-6 w-6" />
156158
</a>
157-
158-
<a
159-
href="https://x.com/your_handle"
160-
target="_blank"
161-
rel="noopener noreferrer"
162-
className="text-zinc-400 dark:text-zinc-500 hover:text-sky-500 dark:hover:text-zinc-100 transition-all duration-300 hover:-translate-y-1 hover:scale-110"
163-
aria-label="Twitter"
159+
<a
160+
href="https://x.com/your_handle"
161+
target="_blank"
162+
rel="noopener noreferrer"
163+
className="text-zinc-400 dark:text-zinc-500 hover:text-sky-500 dark:hover:text-zinc-100 transition-colors duration-200"
164+
aria-label="X"
164165
>
165-
<FaTwitter className="h-6 w-6" />
166+
<FaXTwitter className="h-7 w-7" />
166167
</a>
167168

168169
<a

src/hooks/useGitHubAuth.ts

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,45 @@
1-
import { useState, useMemo } from 'react';
2-
import { Octokit } from '@octokit/core';
1+
import { useState, useEffect } from 'react';
2+
import { Octokit } from 'octokit';
33

44
export const useGitHubAuth = () => {
5-
const [username, setUsername] = useState('');
6-
const [token, setToken] = useState('');
5+
const [username, setUsername] = useState(() => sessionStorage.getItem('tracker_username') || '');
6+
const [token, setToken] = useState(() => sessionStorage.getItem('tracker_token') || '');
7+
const [error, setError] = useState('');
78

8-
const octokit = useMemo(() => {
9-
if (!username) return null;
10-
if(token){
11-
return new Octokit({ auth: token });
9+
useEffect(() => {
10+
if (username) {
11+
sessionStorage.setItem('tracker_username', username);
12+
} else {
13+
sessionStorage.removeItem('tracker_username');
14+
}
15+
if (token) {
16+
sessionStorage.setItem('tracker_token', token);
17+
} else {
18+
sessionStorage.removeItem('tracker_token');
1219
}
13-
return new Octokit();
1420
}, [username, token]);
1521

16-
const getOctokit = () => octokit;
22+
const getOctokit = () => {
23+
try {
24+
setError('');
25+
if (!username) return null;
26+
if (token) {
27+
return new Octokit({ auth: token });
28+
}
29+
return new Octokit();
30+
} catch (err: any) {
31+
setError(err instanceof Error ? err.message : String(err));
32+
return null;
33+
}
34+
};
1735

1836
return {
1937
username,
2038
setUsername,
2139
token,
2240
setToken,
41+
error,
42+
setError,
2343
getOctokit,
2444
};
2545
};

src/pages/404.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { Link } from "react-router-dom";
2+
3+
export default function Custom404() {
4+
return (
5+
<section className="min-h-screen w-full flex items-center justify-center bg-gradient-to-br from-gray-50 to-blue-100 px-6">
6+
<div className="text-center">
7+
<h1 className="text-7xl md:text-8xl font-extrabold text-blue-600 mb-4">
8+
404
9+
</h1>
10+
11+
<h2 className="text-2xl md:text-3xl font-bold text-gray-900 mb-4">
12+
Page Not Found
13+
</h2>
14+
15+
<p className="text-gray-600 text-lg mb-8 max-w-md">
16+
The page you are looking for does not exist or has been moved.
17+
</p>
18+
19+
<Link
20+
to="/"
21+
className="inline-block bg-blue-600 text-white px-8 py-4 rounded-lg font-semibold hover:bg-blue-700 transition-all transform hover:scale-105 shadow-lg"
22+
>
23+
Go Back Home
24+
</Link>
25+
</div>
26+
</section>
27+
);
28+
}

0 commit comments

Comments
 (0)