svg
Head

ARVX Dev Log #8: Backend Architecture Finally Makes Sense

This week was all about backend architecture, and honestly? It was the week everything started to click. I finally understand how subscription-based databases actually work. Not just copying code from tutorials, but really getting it. Building out the full authentication system with Supabase taught me more about database security, user management, and data modeling than months of reading ever could. What I Built This Week I implemented a complete authentication flow with a “try before you buy” experience – users can explore the property input form and select their exit strategy before being asked to sign up. Once they hit “Analyze Deal,” that’s when the signup modal appears. It feels natural and doesn’t force people to commit before they even know what the app does. The database architecture was the real learning curve. I built out tables for properties, analyses, and user subscriptions with proper Row Level Security policies. That last part was crucial – making sure users can only see their own data while keeping property info public. Getting RLS policies right took some trial and error (hello, 42501 errors), but understanding the difference between INSERT and SELECT policy syntax was a game changer. I also implemented the subscription tracking system that counts unique addresses instead of total analyses. This means free users can update repairs or change strategies on properties they’ve already analyzed without burning through their 3-per-month limit. It’s how I’d want it to work if I were the user. Built out the History and Profile pages too, plus started laying groundwork for property photos using Edge Functions to keep API keys secure. The whole system is starting to feel cohesive. Blockers RLS policies gave me more trouble than I expected. Turns out there’s specific syntax for INSERT policies (WITH CHECK) versus SELECT policies (USING), and mixing them up blocks database operations entirely. Took a minute to debug, but once I understood why it works that way, it made perfect sense. Also hit some React useEffect infinite loops that were causing the app to crash. The fix was understanding dependency arrays better – don’t include state setters that the effect itself modifies. Another one of those things that seems obvious in hindsight. The biggest conceptual blocker was just wrapping my head around how subscription periods, usage tracking, and database triggers all work together. But that’s also what finally clicked this week. What’s Next I’m wrapping up the core functionality before integrating the property data API. That means making sure authentication, subscription limits, and the analysis flow all work smoothly together. Once that foundation is solid, adding real property data through an API will be straightforward. Feels good to be at this point. The app is moving from “prototype with features” to “actual product with architecture.”

Let’s Build Something Together

I’m a fullstack developer passionate about creating dynamic, performant web experiences. Whether it’s a sleek front-end interface or a robust back-end system, I can help bring your ideas to life. Send me a message and let’s get started!

svg