Conversation
Co-authored-by: Debatreya Das <116421305+Debatreya@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the website contributors page UI to a timeline-based layout (with richer contributor cards), adds production infrastructure runbook documentation for the self-hosted setup, and removes an unused icon dependency.
Changes:
- Remove
lucide-reactfrom dependencies. - Add a reusable
Timelineclient component and use it to render contributors by batch/year. - Add
infra/Production.mddocumenting the on-prem self-hosted production stack and operational procedures.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Drops lucide-react from dependencies. |
| package-lock.json | Removes the lucide-react package entry from the lockfile. |
| infra/Production.md | Adds production infrastructure + backup/restore documentation for self-hosting. |
| components/ui/timeline.tsx | Introduces a framer-motion based timeline UI component. |
| app/[locale]/contributions-for-website-development/page.tsx | Refactors contributors page to build year groups and render via the new timeline. |
| app/[locale]/contributions-for-website-development/contributor-timeline.tsx | Adds client wrapper that transforms grouped contributors into Timeline entries. |
| app/[locale]/contributions-for-website-development/contributor-card.tsx | Expands contributor card UI with designation styling and social/email links. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import React, { useEffect, useRef, useState } from 'react'; | ||
|
|
||
| interface TimelineEntry { | ||
| title: string; | ||
| content: React.ReactNode; |
There was a problem hiding this comment.
The default React import is unused (only hooks are referenced). With the new JSX transform this should be removed to avoid @typescript-eslint/no-unused-vars warnings.
| import React, { useEffect, useRef, useState } from 'react'; | |
| interface TimelineEntry { | |
| title: string; | |
| content: React.ReactNode; | |
| import { useEffect, useRef, useState } from 'react'; | |
| import type { ReactNode } from 'react'; | |
| interface TimelineEntry { | |
| title: string; | |
| content: ReactNode; |
| const rect = ref.current.getBoundingClientRect(); | ||
| setHeight(rect.height); | ||
| } | ||
| }, [ref]); |
There was a problem hiding this comment.
useEffect depends on the stable ref object, so [ref] is effectively the same as [] and also triggers react-hooks/exhaustive-deps noise. Use an empty dependency array (or recompute height on relevant changes like resize/data updates) to keep this predictable.
| }, [ref]); | |
| }, []); |
components/ui/timeline.tsx
Outdated
| <h3 className="md:hidden block text-2xl mb-4 text-left font-bold text-neutral-500 dark:text-neutral-500"> | ||
| {item.title} | ||
| </h3> | ||
| {item.content}{""} |
There was a problem hiding this comment.
{item.content}{""} adds an unnecessary empty string node to the DOM. Remove the {""} to avoid extra rendering noise.
| {item.content}{""} | |
| {item.content} |
| import ImageHeader from '~/components/image-header'; | ||
| import { getTranslations } from '~/i18n/translations'; | ||
| import { db } from '~/server/db'; |
There was a problem hiding this comment.
Heading is imported but no longer used in this page. Please remove the unused import to satisfy linting and keep imports accurate.
| linkedinId: true, | ||
| }, | ||
| orderBy: (contributor, { desc, asc }) => [ | ||
| desc(contributor.passoutYear), |
There was a problem hiding this comment.
The DB query ordering no longer includes a secondary sort (e.g. by name). With only passoutYear ordering, contributors within the same year can come back in an arbitrary order depending on the query plan, which can cause UI churn. Add a stable secondary orderBy (like asc(name) or asc(id)).
| desc(contributor.passoutYear), | |
| desc(contributor.passoutYear), | |
| asc(contributor.name), |
| } | ||
|
|
||
| const FALLBACK_IMAGE = 'fallback/user-image.jpg'; | ||
| const FALLBACK_IMAGE = '/fallback/user-image.jpg'; |
There was a problem hiding this comment.
FALLBACK_IMAGE now starts with /, but the repo’s Next image loader prefixes non-HTTP src values with env.NEXT_PUBLIC_AWS_S3_URL (see lib/loader.ts). This will produce a double-slash URL and likely point to a non-existent object key. Use the established key format without a leading slash (e.g. fallback/user-image.jpg) or bypass the loader for local assets.
| const FALLBACK_IMAGE = '/fallback/user-image.jpg'; | |
| const FALLBACK_IMAGE = 'fallback/user-image.jpg'; |
| interface ContributorCardProps { | ||
| name: string; | ||
| rollNumber: string; | ||
| image?: string | null; | ||
| rollNumberLabel: string; | ||
| designation: 'developer' | 'designer' | 'devops'; | ||
| githubId: string | null; | ||
| linkedinId: string | null; | ||
| } |
There was a problem hiding this comment.
rollNumberLabel is still part of ContributorCardProps, and callers pass it, but the component no longer uses it. Either remove it from the props (and update call sites) or render it (e.g. for accessible text) to avoid dead/unused API surface.
| Public access via Caddy: | ||
|
|
||
| ``` | ||
| http://SERVER_IP/files/nitkkr-public/... |
There was a problem hiding this comment.
MinIO public URL examples here don’t appear to match the code’s current URL construction. getS3Url() appends an isaac-s3-images path segment (see server/s3/index.ts), so the documented /files/nitkkr-public/... pattern may be incomplete/misleading. Please align the documentation with the actual URL format used by the app.
| http://SERVER_IP/files/nitkkr-public/... | |
| http://SERVER_IP/files/isaac-s3-images/nitkkr-public/... |
| import { | ||
| motion, | ||
| useMotionValueEvent, | ||
| useScroll, | ||
| useTransform, | ||
| } from 'framer-motion'; | ||
| import React, { useEffect, useRef, useState } from 'react'; |
There was a problem hiding this comment.
useMotionValueEvent is imported but never used, and the import order will violate the repo’s import/order rule (React imports must come before other externals). Remove the unused import and reorder imports so react comes first.
| import { | |
| motion, | |
| useMotionValueEvent, | |
| useScroll, | |
| useTransform, | |
| } from 'framer-motion'; | |
| import React, { useEffect, useRef, useState } from 'react'; | |
| import React, { useEffect, useRef, useState } from 'react'; | |
| import { | |
| motion, | |
| useScroll, | |
| useTransform, | |
| } from 'framer-motion'; |
| # 🖥 Server Specs | ||
|
|
||
| | Resource | Value | | ||
| | -------- | ------------------ | | ||
| | CPU | 20 cores | | ||
| | RAM | 16 GB | | ||
| | Storage | Local disk | | ||
| | OS | Ubuntu 24.04 | | ||
| | Network | Institute intranet | | ||
|
|
There was a problem hiding this comment.
This doc includes environment-specific details (exact server username/path, hardware specs, network context). If this repository is public (or shared broadly), consider replacing these with placeholders and moving sensitive operational runbooks to a private/internal location to reduce information exposure risk.
Co-authored-by: Yashika Choudhary <161009245+yashika1221@users.noreply.github.com> Co-authored-by: Aryawart-kathpal <aryawart.kathpal2909@gmail.com> Co-authored-by: Kartik <ks25152005@gmail.com> Co-authored-by: Arnav Sharma <145358467+ArnavSharma005@users.noreply.github.com> Co-authored-by: soumil221 <soumiljain221@gmail.com> Co-authored-by: Debatreya Das <116421305+Debatreya@users.noreply.github.com> Co-authored-by: Navneet Kaur <navneet78141@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: heydoyouknowme0 <akrb2204@gmail.com> Co-authored-by: Aryawart Kathpal <132134276+Aryawart-kathpal@users.noreply.github.com> Co-authored-by: Abhay Agarwal <161469723+Abhay145@users.noreply.github.com> Co-authored-by: Debatreya <debatreyadas@gmail.com> Co-authored-by: Swastik Bhowmick <swastik200419@gmail.com> Co-authored-by: Rahul Gupta <Rahul5g3d.official@gmail.com> Co-authored-by: ArnavSharma005 <arnavoct.20@gmail.com> Co-authored-by: Jayant Gautam <jayant10449@gmail.com> Co-authored-by: Rizul Gupta <162694744+Rogan308Rylie@users.noreply.github.com> Co-authored-by: Rizul Gupta <rizulgupta2811@gmail.com> Co-authored-by: Saksham1143me <150987031+Saksham1143me@users.noreply.github.com> Co-authored-by: Ayush Sur <145102142+SurAyush@users.noreply.github.com>
Co-authored-by: Yashika Choudhary <161009245+yashika1221@users.noreply.github.com> Co-authored-by: Aryawart-kathpal <aryawart.kathpal2909@gmail.com> Co-authored-by: Kartik <ks25152005@gmail.com> Co-authored-by: Arnav Sharma <145358467+ArnavSharma005@users.noreply.github.com> Co-authored-by: soumil221 <soumiljain221@gmail.com> Co-authored-by: Navneet Kaur <navneet78141@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: heydoyouknowme0 <akrb2204@gmail.com> Co-authored-by: Aryawart Kathpal <132134276+Aryawart-kathpal@users.noreply.github.com> Co-authored-by: Abhay Agarwal <161469723+Abhay145@users.noreply.github.com> Co-authored-by: Swastik Bhowmick <swastik200419@gmail.com> Co-authored-by: Rahul Gupta <Rahul5g3d.official@gmail.com> Co-authored-by: ArnavSharma005 <arnavoct.20@gmail.com> Co-authored-by: Jayant Gautam <jayant10449@gmail.com> Co-authored-by: Rizul Gupta <162694744+Rogan308Rylie@users.noreply.github.com> Co-authored-by: Rizul Gupta <rizulgupta2811@gmail.com> Co-authored-by: Saksham1143me <150987031+Saksham1143me@users.noreply.github.com> Co-authored-by: Ayush Sur <145102142+SurAyush@users.noreply.github.com> Co-authored-by: Devansh032 <devanshsinghal627@gmail.com>
made a new branch to avoid conflicts.Modified the faculty and staff files because the were causing build to fail and eslint errors. --------- Co-authored-by: Debatreya Das <116421305+Debatreya@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces a major refactor and feature expansion for the Training and Placement statistics section. The main changes include replacing hardcoded placement PDF links with a database-driven approach, implementing dynamic routing for academic session statistics, and adding a new stats page with detailed charts for both UG and PG data. Additionally, the codebase is improved with reusable chart components and a custom multi-line axis tick renderer for better chart readability. **Database-driven Placement Statistics & Dynamic Routing:** - Replaced the hardcoded placement stats PDF list in `page.tsx` with a database-driven approach: unique academic sessions are now fetched from the database, and the placement stats section dynamically links to a new per-session stats page. ([[app/[locale]/training-and-placement/page.tsxR8-L45](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aR8-L45)], [[app/[locale]/training-and-placement/page.tsxR48-R61](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aR48-R61)], [[app/[locale]/training-and-placement/page.tsxL252-R258](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL252-R258)]) - Added a mapping utility (`placement-stats-map.ts`) to associate academic sessions with their respective PDF files, and provided helper functions to retrieve sessions and PDFs. ([[app/[locale]/training-and-placement/placement-stats-map.tsR1-R87](diffhunk://#diff-c54bb5fc4851fe8fa3e79d7c079c1158290ab67c78f3a9dd916cda84b1bb6477R1-R87)]) **New Per-Session Statistics Page:** - Introduced `[session]/page.tsx`, a dynamic route that displays detailed placement statistics for a selected academic session, including: - Validation of session existence in the database. - Sectioned display of UG and PG statistics with bar charts for placement numbers, packages, and placement percentages. - A list of relevant placement report PDFs for the session. - A back navigation link to the main Training & Placement page. ([[app/[locale]/training-and-placement/stats/[session]/page.tsxR1-R306](diffhunk://#diff-aad6f042397c6770ed3119aa9b8c7362b51c38b208d3571c2b27a9d95ad680e7R1-R306)]) **Charting Components and Visualization Improvements:** - Added and exported reusable chart components: `PlacementBarChart`, `PackageBarChart`, `PercentageBarChart`, and `PgPercentageAccordion` for visualizing placement data. ([[components/charts/index.tsR1-R4](diffhunk://#diff-c56e67c541cf7a7e5db2a83a031653134e31ee5052ea230cd1187bb03c2f7bbcR1-R4)]) - Implemented a custom `MultiLineAxisTick` component to improve the readability of axis labels in charts with long programme or discipline names. ([[components/charts/multi-line-axis-tick.tsxR1-R58](diffhunk://#diff-2f7c131dbaccf9dbf04dc18e47d234d8b45f3f6a36183148ecf0d1b136687a50R1-R58)]) **UI/UX Adjustments:** - Improved section spacing and removed redundant CSS classes for a cleaner layout across notification, placement stats, and events sections. ([[app/[locale]/training-and-placement/page.tsxL122-R129](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL122-R129)], [[app/[locale]/training-and-placement/page.tsxL231-R238](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL231-R238)], [[app/[locale]/training-and-placement/page.tsxL270-R275](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL270-R275)]) --- **Placement Statistics Refactor:** - Placement stats are now database-driven, with unique academic sessions fetched and displayed dynamically instead of hardcoded PDF links. ([[app/[locale]/training-and-placement/page.tsxR8-L45](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aR8-L45)], [[app/[locale]/training-and-placement/page.tsxR48-R61](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aR48-R61)]) - Introduced `placement-stats-map.ts` to map sessions to their PDFs and provide helper retrieval functions. ([[app/[locale]/training-and-placement/placement-stats-map.tsR1-R87](diffhunk://#diff-c54bb5fc4851fe8fa3e79d7c079c1158290ab67c78f3a9dd916cda84b1bb6477R1-R87)]) **New Features:** - Added a `[session]/page.tsx` dynamic route for per-session placement stats, showing detailed UG/PG data, charts, and PDFs. ([[app/[locale]/training-and-placement/stats/[session]/page.tsxR1-R306](diffhunk://#diff-aad6f042397c6770ed3119aa9b8c7362b51c38b208d3571c2b27a9d95ad680e7R1-R306)]) **Charts and Visualization:** - Exported reusable chart components for placement statistics. ([[components/charts/index.tsR1-R4](diffhunk://#diff-c56e67c541cf7a7e5db2a83a031653134e31ee5052ea230cd1187bb03c2f7bbcR1-R4)]) - Added a custom multi-line axis tick renderer for improved chart label readability. ([[components/charts/multi-line-axis-tick.tsxR1-R58](diffhunk://#diff-2f7c131dbaccf9dbf04dc18e47d234d8b45f3f6a36183148ecf0d1b136687a50R1-R58)]) **UI/UX Improvements:** - Enhanced section spacing and layout for better clarity and consistency. ([[app/[locale]/training-and-placement/page.tsxL122-R129](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL122-R129)], [[app/[locale]/training-and-placement/page.tsxL231-R238](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL231-R238)], [[app/[locale]/training-and-placement/page.tsxL270-R275](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL270-R275)]) Issue #554
…n same for larger than 500px wide tables
No description provided.