Skip to content

Conversation

@Om-Thanage
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Jul 20, 2025

@Om-Thanage is attempting to deploy a commit to the minavkaria's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jul 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
notes-aid ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 20, 2025 1:15pm

This comment was marked as outdated.

@MinavKaria MinavKaria requested a review from Copilot July 24, 2025 07:17
Copy link

Copilot AI left a comment

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 adds a comprehensive leaderboard feature with Google OAuth authentication specifically for Somaiya students. The implementation includes both frontend components and a dedicated backend service to handle student academic data.

Key changes:

  • Full-stack leaderboard implementation with search, filtering, and pagination capabilities
  • Google OAuth integration with domain restriction to @somaiya.edu emails
  • Backend API service with MongoDB integration for student academic records

Reviewed Changes

Copilot reviewed 17 out of 20 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
notes-aid/src/hook/useDebounce.tsx Custom hook for debouncing search input to optimize performance
notes-aid/src/components/ui/Input.tsx Reusable input component with consistent styling
notes-aid/src/components/ui/Card.tsx Card component system for consistent UI layout
notes-aid/src/components/lib/utils.ts Utility functions for CSS class management
notes-aid/src/components/ThemeChanger.tsx Bug fix for useEffect dependency array
notes-aid/src/components/Leaderboard.tsx Main leaderboard component with comprehensive features
notes-aid/src/app/page.tsx Added leaderboard navigation button to main page
notes-aid/src/app/leaderboard/page.tsx Leaderboard page with OAuth authentication
notes-aid/package.json Added OAuth and utility dependencies
leaderboard_backend/ Complete backend service with Express, MongoDB, and authentication
Files not reviewed (2)
  • leaderboard_backend/package-lock.json: Language not supported
  • notes-aid/package-lock.json: Language not supported

document.documentElement.setAttribute("data-theme", currentTheme);
}
}, []);
}, [currentTheme]);
Copy link

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

The useEffect dependency should include the initial load check. The current implementation may cause unnecessary re-renders when currentTheme changes, but the effect should only run on mount for initial setup.

Copilot uses AI. Check for mistakes.
</div>
</div>
</div>
); };
Copy link

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

There appears to be a formatting issue with extra spaces and incorrect indentation. The closing brace and semicolon should be properly formatted.

Suggested change
); };
);
};

Copilot uses AI. Check for mistakes.
</div>
)}
</>
)} {/* Empty State */}
Copy link

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

Missing line break between the closing JSX and the comment. This affects code readability and formatting consistency.

Suggested change
)} {/* Empty State */}
)}
{/* Empty State */}

Copilot uses AI. Check for mistakes.
} catch (googleError) {

try {
const decoded = jwt.verify(token, process.env.JWT_SECRET || 'your-secret-key');
Copy link

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

Using a hardcoded fallback secret key 'your-secret-key' is a serious security vulnerability. The application should fail securely if JWT_SECRET is not configured rather than using a default value.

Suggested change
const decoded = jwt.verify(token, process.env.JWT_SECRET || 'your-secret-key');
const decoded = jwt.verify(token, process.env.JWT_SECRET);

Copilot uses AI. Check for mistakes.
Comment on lines 17 to 18
origin: ['http://localhost:3000', 'https://notes-aid.minavkaria.tech', 'https://notes-aid-git-fork-om-thanage-main-minavkarias-projects.vercel.app', 'https://notes-d0qrfpgl6-minavkarias-projects.vercel.app'
],
Copy link

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

The CORS origins array contains hardcoded URLs including what appear to be temporary deployment URLs. Consider using environment variables for these origins to improve maintainability and security.

Suggested change
origin: ['http://localhost:3000', 'https://notes-aid.minavkaria.tech', 'https://notes-aid-git-fork-om-thanage-main-minavkarias-projects.vercel.app', 'https://notes-d0qrfpgl6-minavkarias-projects.vercel.app'
],
origin: process.env.CORS_ORIGINS ? process.env.CORS_ORIGINS.split(',') : [],

Copilot uses AI. Check for mistakes.
</h3>

{selectedStudent.sgpa_list && selectedStudent.sgpa_list.length > 0 ? (
<div className="space-y-3"> {selectedStudent.sgpa_list
Copy link

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

Missing line break between the opening div tag and the array map method. This creates a formatting issue that affects code readability.

Suggested change
<div className="space-y-3"> {selectedStudent.sgpa_list
<div className="space-y-3">
{selectedStudent.sgpa_list

Copilot uses AI. Check for mistakes.
…navKaria#113)

* bookmark page, module rendering done

* Bookmark page with states

* Bookmark and Bookmark pages done

* Bookmark and Bookmark page done

* Fixed UI

* UI fix
@MinavKaria MinavKaria force-pushed the main branch 5 times, most recently from 5c35ceb to 14e023d Compare September 2, 2025 15:46
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