Skip to content

Final tweaks and adjustments#1

Open
al7arthy wants to merge 10 commits into
mainfrom
deploy
Open

Final tweaks and adjustments#1
al7arthy wants to merge 10 commits into
mainfrom
deploy

Conversation

@al7arthy

Copy link
Copy Markdown
Owner

No description provided.

@al7arthy al7arthy requested a review from Copilot July 26, 2025 05:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Comment on lines +23 to +28
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`);

Copilot AI Jul 26, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

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`

Copilot AI Jul 26, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
setLoading(true);
const response = await fetch(`/api/github/users/${username}`);
const response = await fetch(`https://api.github.com/users/${username}`);

Copilot AI Jul 26, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
if (response.status === 403 && response.headers.get('X-RateLimit-Remaining') === '0') {
throw new Error('Rate limit exceeded. Please try again later.');
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants