Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements final tweaks and adjustments to prepare the portfolio for production deployment. The changes focus on updating API endpoints, enhancing theme and language detection, updating branding to a new domain, and preparing the project for GitHub Pages deployment.
Key changes include:
- Switching from proxy-based API calls to direct GitHub API calls
- Improving theme and language initialization with system preference detection
- Updating domain references from al7arthy.me to al7arthy.dev
- Adding deployment configuration and comprehensive documentation
Reviewed Changes
Copilot reviewed 10 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Updated quote styles and added base path configuration |
| src/hooks/useTheme.ts | Enhanced theme initialization with localStorage and system preference detection |
| src/hooks/useLanguage.ts | Improved language detection with system language fallback |
| src/hooks/useGitHubStats.ts | Changed from proxy API calls to direct GitHub API calls |
| src/hooks/useGitHubProjects.ts | Updated API endpoint to use direct GitHub API |
| src/hooks/useGitHubProfile.ts | Switched to direct GitHub API endpoint |
| src/components/Contact.tsx | Updated website URL from al7arthy.me to al7arthy.dev |
| package.json | Added GitHub Pages deployment configuration and gh-pages dependency |
| README.md | Complete rewrite with comprehensive project documentation |
| LICENSE | Added custom educational-use-only license |
Comments suppressed due to low confidence (1)
package.json:23
- The version ^6.3.0 for gh-pages does not exist. The latest stable version of gh-pages is around 6.1.x. Please verify and use a valid version number.
"gh-pages": "^6.3.0",
| const userResponse = await fetch(`https://api.github.com/users/${username}`); | ||
| if (!userResponse.ok) throw new Error('Failed to fetch user data'); | ||
| const userData = await userResponse.json(); | ||
|
|
||
| // Fetch repositories to calculate total stars | ||
| const reposResponse = await fetch(`/api/github/users/${username}/repos?per_page=100`); | ||
| const reposResponse = await fetch(`https://api.github.com/users/${username}/repos?per_page=100`); |
There was a problem hiding this comment.
Direct GitHub API calls may hit rate limits (60 requests/hour for unauthenticated requests). Consider implementing error handling for rate limit responses (status 403) and possibly adding retry logic or user feedback when limits are exceeded.
|
|
||
| const response = await fetch( | ||
| `/api/github/users/${username}/repos?sort=updated&per_page=20` | ||
| `https://api.github.com/users/${username}/repos?sort=updated&per_page=20` |
There was a problem hiding this comment.
Direct GitHub API calls may hit rate limits (60 requests/hour for unauthenticated requests). Consider implementing error handling for rate limit responses (status 403) and possibly adding retry logic or user feedback when limits are exceeded.
| setLoading(true); | ||
| const response = await fetch(`/api/github/users/${username}`); | ||
| const response = await fetch(`https://api.github.com/users/${username}`); | ||
|
|
There was a problem hiding this comment.
Direct GitHub API calls may hit rate limits (60 requests/hour for unauthenticated requests). Consider implementing error handling for rate limit responses (status 403) and possibly adding retry logic or user feedback when limits are exceeded.
| if (response.status === 403 && response.headers.get('X-RateLimit-Remaining') === '0') { | |
| throw new Error('Rate limit exceeded. Please try again later.'); | |
| } | |
No description provided.