Skip to content

feat: 10-minute security token expiry enforcement and department PDF reports - #121

Merged
Mayur51015 merged 2 commits into
mainfrom
feature/security-token-expiry-and-dept-pdf-report
Aug 28, 2026
Merged

feat: 10-minute security token expiry enforcement and department PDF reports#121
Mayur51015 merged 2 commits into
mainfrom
feature/security-token-expiry-and-dept-pdf-report

Conversation

@Mayur51015

Copy link
Copy Markdown
Owner

Summary of Changes

1. 10-Minute Security Token Expiry & Purpose Isolation

  • Centralized Security Configuration: Created \server/src/config/securityTokenConfig.js\ enforcing a 10-minute (\text{s}$) maximum token lifetime across account verification, admin invitations, account activation, password reset, and email change flows.
  • Backend-Authoritative Validation: Enforced server-side checks (\isTokenExpired) and atomic single-use invalidation upon token consumption.
  • Email Templates: Updated all email templates in \server/src/utils/sendEmail.js\ with the 10-minute expiration notice.
  • Automated Tests: Added dedicated test suite \server/tests/securityTokenExpiry.test.js\ (7/7 passing) and updated existing test suites (24/24 passing).

2. Department Performance Report PDF Export

  • PDF Generation Service: Created \server/src/services/departmentReportService.js\ using \pdfkit\ for professional multi-page vector PDF generation with department KPIs, placement readiness metrics, score tier distributions, and student rosters.
  • API & UI Integration: Registered \GET /api/department-admin/reports/pdf\ and integrated [ Download PDF Report ]\ on the Department Admin dashboard.
  • Automated Tests: Added \server/tests/departmentReport.test.js\ (5/5 passing).

3. Verification & Build

  • Automated test suites passed (36+ tests).
  • Client production bundle verified (
    pm run build).

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mavi-linking Ready Ready Preview Aug 28, 2026 6:12am
mavi-linking-mq7d Ready Ready Preview Aug 28, 2026 6:12am

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 443ff511-1a36-4990-8f88-8f838d310f64


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Mayur51015 Mayur51015 self-assigned this Aug 28, 2026
@Mayur51015
Mayur51015 merged commit 87b6866 into main Aug 28, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant