r/FullStackDevelopers • u/mxrkkkkkkkkkk • 6d ago
How can I make my Vibe coded website secure
I've been learning about building full-stack e-commerce websites with Backend database admin panel.. through out the process I've been adding new tools like Fast2SMS/Resend(for sms services), Aws ses(for Authentication, forget password type emails), Stitch(for web design), Ai studio(for code) and Supabase for Backend and database.
I never give Ai my api keys all those keys(aws ses, Fast2SMS) i added using supabase and i secure supabase with Row Level Security.. other than that I put 30 second timer on OTP send button
This is enough? Or I need to secure anything else?
1
u/Secvura 5d ago
If the 30 second timer is only on the button, it only exists in the browser, so anyone can call whatever sends the OTP directly and skip it. Put a limit on the server side too (per phone number and per IP, plus a daily cap), otherwise someone can spam it and run up your Fast2SMS bill.
RLS being on is only half of it, the policies are what matter. Check that users can't update columns like role or is_admin on their own profile row, that the admin panel is protected by policies and not just hidden in the UI, and that order totals are worked out server side rather than trusted from the cart. And keep the service_role key and the SES/Fast2SMS keys server side only (Edge Function secrets, for example), never in frontend code or in a table that logged-in or anonymous users can read.
1
u/Simple-Sea7054 4d ago
Great start keeping your API keys out of prompts and enabling RLS! Since it's an e-commerce app, add these four essentials before going live:
Backend rate limiting: A frontend 30-second timer is easy to bypass. Add server-side rate limiting (like Upstash or Cloudflare) to your OTP/SMS endpoints so bots can't drain your Fast2SMS/AWS credits.
Strict RLS & Admin checks: Make sure your RLS policies restrict users to only their own data ( auth. uid() = user_id ), and verify admin roles on the backend-don't just hide the admin UI.
Server-side pricing: Never trust cart totals sent from the frontend. Always fetch real prices from Supabase on your backend before processing payments.
Billing alerts: Set hard spending caps on AWS SES and Fast2SMS immediately to prevent surprise bills from spam attacks.