Allowing user to create accounts and save news articles to their own database?

Hey all so I’m creating a news recommendation app and one of the features i want to implement is for users to be able to save their stories to a database so they can read them later. I want each user to have their own unique database if they create an account on the app where the saved stories will be stored. I’m just wondering if this is possible and what would be the best way to go about it. Thanks.

You can certainly do this. Maintain a database with users table and stories table. Once a user has logged in, you can pull the story associated with the given user to show it.

The other way is to maintain a file storage to store a formatted file for every user story. The file format can be a markdown. Users can upload their story. Your app will store it in the file storage. The advantage is they can style their story any way they want. Your app can pull the text data as a file stream and render it in streamlit.

I tried this stuff using the Deta Space platform. It is free with some limitations. It is fun to explore this.

Hi Ferdy, so i was thinking of having a database that would contain the users and their saved stories. I was planning that the stories would be stored as key value pairs, so it would be the news story title next to its link. so i was thinking it would look something like this

username: / saved_stories:
xxxxxx / “title”:“link to story”
xxxxxx / “title”:“link to story”

do you think this is a good idea or is there better approaches?