Viktor Berczeli’s Post

The glamorous side of full-stack development? ➔ Shipping shiny new UI features. ✨ The reality? ➔ Spending the last 24 hours completely rewriting schemas because you just pivoted your entire database architecture. 😅 Yesterday, I made a massive shift for my project, Siege of Eger. 🏰I transitioned the database layer to PostgreSQL via Supabase. 🐘⚡ It is a huge win for scalability, but it meant the plumbing had to be completely ripped out. I have been head-down rebuilding every schema from scratch to perfectly wire up the new DB to the UI. 🔌 📚 EDUCATION TIME 🧠 Why spend a whole day rewriting instead of just patching the old code? 🎯 SINGLE SOURCE OF TRUTH. In a modern TypeScript monorepo, your frontend and backend should never be guessing what shape your data is in. By defining our new PostgreSQL models with strict Zod schemas in a shared workspace, we guarantee end-to-end type safety. 🔒 Here is the flow: 🔹 Our NestJS server strictly validates the incoming Supabase data. 🔹 Our Angular 21 frontend consumes those exact same definitions using Signals and the new httpResource. ⚠️ If the database changes? TypeScript immediately yells at the frontend UI during build time, long before a user ever sees a broken screen. It is tedious work, but strict typing is a love letter to your future self. 💌 🗣️ How do you handle schema synchronization when moving across the stack in your monorepos? Drop your strategies below! 👇 #softwareengineering #angular #typescript #supabase #webdevelopment #buildinpublic #architecture #nestjs #frontend #backend

  • text, chat or text message

Love seeing Angular 21 and the new httpResource in action here! Combining it with strict PostgreSQL schemas and Signals makes for a very robust reactive flow. The upfront cost of rewriting schemas pays for itself the first time you refactor a field, and everything just "clicks". Good luck with the Siege of Eger!

single source of truth is everything when you're dealing with data that's gonna be consumed by multiple services - we've seen it with review data too, where having a strict schema in place saves so much headache down the line when you're trying to export or migrate that data to a different platform

See more comments

To view or add a comment, sign in

Explore content categories