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
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
Acceptance Criteria