Skip to content

[Feature Request] Add PDF Export Functionality for User Data #188

Description

@PJCODEX

- Implement a PDF Export feature that allows users to download their neonest data — such as feeding logs, vaccination records, and memories — in a well-formatted PDF file for offline access, record-keeping, and easy sharing with healthcare providers.

Motivation :

Parents often need printable reports for pediatrician visits or personal archives.

PDFs ensure consistent formatting across devices.

Offline access helps in low-connectivity areas.

Supports data ownership by allowing parents to keep a permanent record.

Proposed Solution:

Add an "Export as PDF" button in the Profile or Settings section.

Fetch user data from the backend and format it into a visually clean, structured PDF (with headings, dates, tables, etc.).

Use a library like pdfkit for generating the file server-side.

Automatically trigger the PDF download in the browser after generation.

Implementation Steps:

  1. Backend:

Create /export/pdf API endpoint.

Fetch user’s data securely from the DB.

Generate PDF with proper layout (baby’s name, timelines, tables).

  1. Frontend:

Add "Export as PDF" option in Settings/Profile.

Call the backend endpoint on click.

Show loading indicator until the file downloads.

  1. Security:

Require authentication (JWT) for the export endpoint.

Ensure only the logged-in user’s data is included.

Testing Criteria:

PDF contains only the current user’s data.

Formatting is consistent across all devices.

Dates, times, and logs display in user’s local timezone.


⚠️ Comment on this issue to get it assigned before starting your work. Unassigned PRs will not be counted under Commit and Conquer.

Metadata

Metadata

Labels

MediumCarries 10 points under Commit and ConquerenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions