Conversation
…d and notification pages
…nd robust authentication middleware across the platform
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a staging UI/UX refresh with a Tailwind/CSS-variable design system (including dark mode), and adds several new user-facing features (notifications, applications, leaderboard, hackathons, feedback). It also tightens authentication across multiple API routes and introduces new Mongoose models to support the new features.
Changes:
- Add theme system (CSS variables + Tailwind extensions) and update many pages/components to the new “glass” UI.
- Add new backend capabilities: notifications, applications list, leaderboard, hackathons, feedback, plus schema changes to support hackathon-linked projects.
- Add/expand auth checks on API routes and introduce middleware-based route protection.
Reviewed changes
Copilot reviewed 67 out of 70 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tailwind.config.ts | Enables class-based dark mode and extends theme tokens (fonts/colors/shadows/animations). |
| package.json | Adds next-themes dependency. |
| package-lock.json | Locks next-themes dependency. |
| next.config.ts | Changes root redirect target and restricts next/image remote patterns. |
| middleware.ts | Adds route protection middleware based on auth cookie presence. |
| app/types/projects.ts | Extends Project type with optional hackathon and duration. |
| app/store/useThemeStore.ts | Adds zustand theme store toggling dark class on <html>. |
| app/store/useSettingsStore.ts | Adds persisted settings toggles (notifications, privacy, etc.). |
| app/models/Projects.ts | Adds hackathon reference field to Project schema. |
| app/models/Notification.ts | Introduces Notification schema for in-app notifications. |
| app/models/Hackathon.ts | Introduces Hackathon schema for submitted events. |
| app/models/Feedback.ts | Introduces Feedback schema for user feedback submissions. |
| app/lib/cloudinary.ts | Switches Cloudinary config from hard-coded secrets to env vars. |
| app/layout.tsx | Adds Inter font + updates metadata + defaults <html> to dark theme. |
| app/globals.css | Adds CSS-variable design system, dark theme variables, utilities, animations, and MUI overrides. |
| app/api/user/[id]/route.ts | Enforces auth for user GET/PUT and expands updateable fields. |
| app/api/project/user_id/[user_id]/route.ts | Adds auth/ownership checks for project creation; supports hackathon link; pushes projectId into user. |
| app/api/project/project_id/[project_id]/route.ts | Requires auth for project detail GET. |
| app/api/notifications/route.ts | Adds notifications list endpoint + mark-as-read support. |
| app/api/notifications/[id]/route.ts | Adds notification detail endpoint scoped to the current user. |
| app/api/list/all/route.ts | Adds auth + domain/search/institute filtering for project listing. |
| app/api/linkage/request/[user_id]/[project_id]/route.ts | Fixes duplicate-request check to query JoinRequest (not Projects). |
| app/api/linkage/reject/[request_id]/route.ts | Fixes request_id parsing from URL path. |
| app/api/linkage/leave/[user_id]/[project_id]/route.ts | Awaits project.save() to ensure persistence. |
| app/api/linkage/join/[user_id]/[project_id]/route.ts | Adds auth/ownership checks and blocks duplicate join requests. |
| app/api/linkage/accept/[request_id]/route.ts | Fixes request_id parsing from URL path. |
| app/api/leaderboard/route.ts | Adds leaderboard endpoint (top users by score). |
| app/api/hackathons/route.ts | Adds hackathons list + submit endpoints (auth required for submit). |
| app/api/feedback/route.ts | Adds feedback submission endpoint (auth required). |
| app/api/applications/route.ts | Adds endpoint to list current user’s join requests (“applications”). |
| app/(root)/TabsComponent2.tsx | Refactors Tabs UI for theme tokens and improves a11y ids. |
| app/(root)/TableComponent.tsx | Replaces dummy table data with empty-state UI and theme styling. |
| app/(root)/settings/page.tsx | Rebuilds Settings page using zustand stores + new Switch component. |
| app/(root)/qna/page.tsx | Restyles QnA page with searchable accordion UI. |
| app/(root)/project/Sidebar1.tsx | Overhauls filters sidebar; syncs filters to URL query params. |
| app/(root)/project/ProjectList.tsx | Adds skeleton loading + filtered fetching via query params + new card UI. |
| app/(root)/project/page.tsx | Wraps sidebar/project list in Suspense and applies themed layout. |
| app/(root)/project/create/[id]/page.tsx | Redesigns create-project form; adds hackathon context + duration seconds selection. |
| app/(root)/project/[id]/Sidebar2.tsx | Restyles team list and application modal; adds mobile overlay behavior. |
| app/(root)/project/[id]/requests/page.tsx | Restyles join-requests management UI and adds status badges. |
| app/(root)/project/[id]/ProjectUpdates.tsx | Restyles updates/comments UI and adds improved interactions. |
| app/(root)/project/[id]/page.tsx | Applies themed layout wrapper around detail + sidebar. |
| app/(root)/project/[id]/Detail.tsx | Restyles project detail view and adds share/bookmark placeholder actions. |
| app/(root)/profile/page.tsx | Restyles profile page and wires “coming soon” feedback for achievements. |
| app/(root)/page.tsx | Adds a new themed landing page with project search routing. |
| app/(root)/notification/page.tsx | Implements notifications list UI backed by /api/notifications. |
| app/(root)/notification/[id]/page.tsx | Implements notification detail UI backed by /api/notifications/[id]. |
| app/(root)/leaderboard/page.tsx | Implements leaderboard UI backed by /api/leaderboard. |
| app/(root)/leaderboard/layout.tsx | Restyles leaderboard rank tabs and layout. |
| app/(root)/home/page.tsx | Replaces legacy home UI with the new themed hero/search layout. |
| app/(root)/help/page.tsx | Restyles help/FAQ page and personalizes greeting from auth store. |
| app/(root)/hackathons/submit/page.tsx | Adds hackathon submission UI calling /api/hackathons. |
| app/(root)/hackathons/page.tsx | Adds hackathons browsing UI and “find a team” deep-link into project creation. |
| app/(root)/feedback/page.tsx | Adds feedback form UI calling /api/feedback. |
| app/(root)/dashboard/page.tsx | Restyles dashboard and replaces announcements tab content. |
| app/(root)/dashboard/AnnouncementsList.tsx | Adds announcements list based on filtered notifications. |
| app/(root)/components/SignOutButton.tsx | Restyles sign-out button and adds icon-only behavior on small screens. |
| app/(root)/components/SignInButton.tsx | Adds callbackUrl and restyles sign-in button. |
| app/(root)/components/Signature.tsx | Restyles signature upload UI and adds icons. |
| app/(root)/components/ProfileCard.tsx | Restyles profile card, renders skills as badges, improves social links. |
| app/(root)/components/OnboardingModal.tsx | Adds onboarding modal to complete profile fields with backend update. |
| app/(root)/components/EditProfile.tsx | Adds API-backed profile saving + zustand update + improved skill UX. |
| app/(root)/components/Badge.tsx | Refactors badge styling and adds glow variants. |
| app/(root)/components/AchievementsCard.tsx | Replaces placeholder with styled “achievement” items. |
| app/(root)/application/page.tsx | Implements applications status page with new tabs and themed layout. |
| app/(root)/application/ApplicationsList.tsx | Adds applications list UI backed by /api/applications. |
Comments suppressed due to low confidence (1)
app/api/user/[id]/route.ts:20
GET /api/user/[id]currently allows any authenticated user to fetch the full User document for anyid, including private fields like email andprojectIds. If this endpoint is only meant for “my profile”, it should enforcesession.user.id === id(or otherwise return a public-safe projection).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+31
to
+35
| message: { type: String, required: true }, | ||
| link: { type: String }, | ||
| read: { type: Boolean, default: false }, | ||
| relatedProject: { type: Schema.Types.ObjectId, ref: "Projects" }, | ||
| relatedUser: { type: Schema.Types.ObjectId, ref: "User" }, |
| query.instituteName = { $regex: institute, $options: "i" }; | ||
| } | ||
|
|
||
| const list = (await Projects.find(query).select("-team -owner")).reverse(); |
Comment on lines
+7
to
+12
| // Check both secure and non-secure auth cookies | ||
| const isAuthenticated = | ||
| req.cookies.has("authjs.session-token") || | ||
| req.cookies.has("__Secure-authjs.session-token") || | ||
| req.cookies.has("next-auth.session-token") || | ||
| req.cookies.has("__Secure-next-auth.session-token"); |
Comment on lines
22
to
26
| "next": "15.1.2", | ||
| "next-auth": "^5.0.0-beta.25", | ||
| "next-themes": "^0.4.6", | ||
| "react": "^19.0.0", | ||
| "react-dom": "^19.0.0", |
Comment on lines
+22
to
+26
| const query: Record<string, any> = {}; | ||
| if (domains) { | ||
| const domainList = domains.split(","); | ||
| // Allow case insensitive matching | ||
| query.domains = { $in: domainList.map(d => new RegExp(`^${d}$`, "i")) }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.