Add Accounts and Feed Identity to InstaLite
Explore how to enhance InstaLite by adding user accounts with sign-up and login features. Understand how to connect posts and comments to real users, display usernames in the feed, and implement ownership rules that restrict deletion to post owners. This lesson teaches integrating user identity to make the app more realistic and user-centric while maintaining simplicity and usability.
InstaLite is already doing the first social job well. We can create posts, see them in the feed, like them, comment on them, and delete them. That gives us a working app, though one important part of the product is still missing. The feed still feels anonymous.
A social app becomes much more believable once posts and comments belong to real people. User identity gives the feed more meaning, and ownership rules make actions such as delete feel more sensible. That is why accounts are the next useful improvement. We want to make InstaLite feel tied to real users without making the product larger than it needs to be.
Add sign-up, login, and feed identity
The first step is to tell Cursor exactly how identity should fit into the app. We do not need a broad redesign here. We need a focused upgrade that connects accounts to posting, comments, and ownership. Let’s give Cursor the prompt below:
Prompt:
Now let’s expand InstaLite from a simple social feed into a user based app.
At this step, we want to add sign-up and login so posting belongs to real users. We also want user identity to appear in the feed and comments, and ownership should control who can delete a post.
Please implement the account and user identity flow in the current Flask project.
What to build
Sign-up
Add a sign-up flow where a new user can create an account with username, email, and password.
Username should be unique.
Email should be unique.
The sign-up experience should feel simple and clear.Login
Add a login flow where an existing user can sign in with username or email and password.
After login, the app should recognize the signed in ...