We've been happily building on Supabase for ~two years, two major DX frustrations aside: 1. The iteration cycle for database functions was needlessly complex. Some variation of this workflow was common:
2. Code reviews were painful since every function modification appeared as a complete rewrite. Adding a single line in a 400-line function results in an entirely new file with +401 lines. No historic context, either. Lots of mental overhead for reviewers.I have searched for tools/workflows to address this, but have came up short. (https://news.ycombinator.com/item?id=36007640, https://news.ycombinator.com/item?id=37755076) So, over the holidays I paired with Claude to make SRTD (Supabase Repeatable Template Definitions), addressing these issues with a template-based workflow:
Key features:
Focus has been on Supabase migrations, but it'll work with any Postgres database using `20250109104647_migration_name.sql` formatted migrations with some configuration adjustments.Happy to accept PR or issues for other migration file formats (or even DBs). Project: https://github.com/t1mmen/srtd Would love to hear your thoughts, feedback, and ideas for improvement! |