Skip to content

Export snippets to JSON #6

Description

@byteofhoney

Goal: Let users download all their snippets as a single JSON file for backup.
User story: As a user, I want to export my snippets to JSON so that I always have a backup outside the application.

Steps and Rules

  • Add a new route, e.g. GET /export
  • Query all snippets from the database
  • Convert to JSON, handle the _id field (convert ObjectId to string)
  • Return as a downloadable .json file (correct Content-Disposition header)
  • Add a visible "Export" button in the UI

Acceptance Criteria

  • Clicking Export downloads a valid .json file
  • File contains every snippet currently in the database
  • Downloaded file can be opened and read without errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions