The GDPR features a small SaaS actually has to build come down to three things: let people download their data, let them delete their account, and don't set optional cookies without asking. The interesting part is where these collide with the real world: a deleted customer who is still being charged, and tax law that says some records must stay.
This is how I built it, not legal advice. Have someone who knows the law where you operate review your processes and your privacy policy.
Data export
Articles 15 and 20 give people the right to get their data, in a machine-readable format for the portability part. A JSON download from the settings page covers both, and answers these requests without any manual work on your side. The service gathers the data into plain dicts:
# app/gdpr/service.py async def export_user_data ( session : AsyncSession , user : User ) -> dict : """Everything the app stores about the user, as JSON-ready data (GDPR art. 15 and 20).…