Skip to content

[FEAT] : Printable PDF Productivity Reports #3046

Description

@hrshjswniii

Problem Statement

Developers often want to share their progress, coding statistics (commit frequencies, active streaks, language distributions), and achievements on professional networks, portfolios, or directly with engineering managers and mentors during performance reviews.

While DevTrack has a web dashboard and sends weekly email digests, it lacks a clean, standardized format for sharing these stats offline or as formal attachments. Providing a styled, download-friendly, printable PDF report enables developers to easily document and share their productivity metrics.

Proposed Solution

Implement a client-side PDF generation feature using the existing jspdf package (which is already included in DevTrack's package.json dependencies):

  1. Report Export Button: Add a "Download PDF Report" action button to the Dashboard page header or Settings area.
  2. Data Aggregation: Capture current context metrics including WakaTime hours, language distribution, top repository commits, streak milestones, and goal completion rates.
  3. Styled PDF Layout: Design a professional, single-page or two-page document template (styled in line with DevTrack's premium, dark/light aesthetic).
  4. Client-Side PDF Generation:
    • Create a helper module src/lib/pdf-generator.ts using jspdf and jspdf-autotable.
    • Render vector graphics (e.g. contribution rings and language breakdowns) and text blocks dynamically onto the PDF canvas.
    • Trigger a direct browser file download (e.g. devtrack-report-July-2026.pdf).

Feature Area

Dashboard

Alternatives Considered

  • Server-Side Puppeteer Rendering: Considered running a headless browser in a serverless API route to render the page and convert it to PDF. However, serverless deployment environments (like Vercel) have strict size limits (50MB zip limit) and execution timeouts that make running headless Chrome engines highly unstable and expensive.
  • Basic @media print CSS Stylesheet: Considered using standard browser print styles. However, browser print dialogs are inconsistent, often insert browser headers/footers (like the page URL), do not support custom branding elements, and fail to provide clean page-break formatting.

Acceptance Criteria

  • A user can click a "Download PDF Report" button on their dashboard.
  • The generated PDF includes the user's name, profile summary, weekly/monthly commit numbers, streak numbers, WakaTime project/language charts, and completed goals.
  • The PDF follows a professional grid layout, maintains vector graphic resolution, and has proper page margins.
  • The document generation is fast (completes client-side in under 5 seconds) and is fully responsive across desktop and mobile browsers.

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions