Hey, I’m Rafael (codeblvck).
Backend engineer focused on secure APIs, auth, and protecting data.
Recently built a hospital system with hybrid encryption + RBAC.
Now working with FastAPI and learning web/API security.
Let’s connect.
Building the cart for my store and stuck on two things:
How do you keep a cart saved when the user leaves and comes back?
Every product has variants, so how do you calculate the final total cleanly?
If you’ve built this before, how did you do it?
Backend lesson from my store project: don’t check if a user exists before inserting.
Insert, then catch the IntegrityError on the unique column. Two requests can pass the check at the same moment, but the database constraint can’t be raced. It’s also one query instead of two.
Started my first e-commerce project for SIWES. A clothing store called FORME.
Flask and MySQL. Every product and image is rendered by the server. Guests can browse and add to cart. Login is required to view the cart and check out.
Cart logic is what I’m working on now.
One thing I’m more careful about now: user enumeration.
It’s tempting to say:
“Email not found” or “Wrong password”
But that tells attackers which accounts exist.
Better:
Always return “Invalid email or password”
Small change. Less information leaked.