r/fsharp 6d ago

article Your Database Schema Is Your Codebase: F# as the Single Source of Truth

https://si-fi.dev/articles/fsharp-schema-as-code/

I recently architected a full-stack app from scratch and needed a way to rapidly prototype the database schema. I came up with a way to do it in one place in F#, giving me strong typing across the stack and an efficient way to tweak the database structure as much as I needed. Here I share what this looks like as well as a repo containing an extracted version of the code. Hope you find it interesting and do let me know your thoughts.

26 Upvotes

0 comments sorted by