Download your data
A user asks for a copy of all the data the product holds about them. After they confirm their password, a background job builds an archive within 48 hours, and an email brings them back to download it within 7 days; an expired link opens a page where they can ask again. Deleting the account is a separate journey, linked from the same page.
What UJN shows here Point at a note to see its part of the drawing
The source (46 lines)
data-export.puml
@startujnrender { direction: down; arrow_spacing: 24 }journey EXPORT "Download your data"description: "Ask for a copy of your data and download it from an email link"unique_id_friendly: export start from_privacy { description: "From privacy settings" }view privacy { title: "Your data"; description: "Download or delete your data"; route: /settings/privacy }ref delete_account { journey: DELETE; title: "Delete account"; description: "30-day grace period" }action reauth { type: auth; title: "Confirm your password"; description: "Sign in again before a sensitive download" }action queue { title: "Queue export" }view requested { title: "Export requested"; description: "We email you when it is ready"; route: /settings/privacy/export }action export_ready { type: event; title: "Export ready"; description: "The background job finished"; timeout: 48 h }data archive { type: file; title: "Export archive"; description: "Deleted after 7 days"; location: "/exports/:user_id.zip" }action fail_notice { type: message; title: "Send failure notice"; description: "Asks the user to try again"; channel: email }end not_built { type: failure; description: "Export not built in 48 h" }action send_link { type: message; title: "Send download link"; channel: email }handoff mail_link { title: "Download link"; description: "The user opens the email"; channel: email; timeout: 7 d; resume: /export/:token }view download{ title: "Download your data" description: "Sign-in required; one archive, about 200 MB" route: /export/:token trace: [req:PRIV-02, test:e2e/export.spec.ts] unique_id: 83d5004848e ' AUTO GENERATED - DO NOT CHANGE}view link_expired { title: "Link expired"; description: "The archive was deleted"; route: /export/expired }end done { type: success; description: "Data downloaded" } from_privacy --> privacyprivacy -right-> delete_account : [Delete account]privacy --> reauth : [Download my data]reauth --> queue : verifiedreauth .x.> privacy : wrong passwordqueue -left-> requestedqueue --> export_readyexport_ready -left-> archive { payload: [archive] }export_ready --> send_link : builtexport_ready -x-> fail_notice : timeoutfail_notice -x-> not_builtsend_link --> mail_link { payload: [email, link] }mail_link ..> download : [Open link] validmail_link ..> link_expired : [Open link] expiredlink_expired --> reauth : [Request a new export]download --> done : [Download]@endujn