I'm working on a web app using NextJS with server-side rendering and I've integrated Supabase for authentication and database management. All of my code is in one repository. Since I'm making API calls to Supabase, it feels like I shouldn't classify it as a single monolith. But does that mean I have a distributed monolith? Additionally, how exactly could a web app with a database be classified as a monolith? Wouldn't the database need to be housed within the web app for that to happen? I'm feeling a bit confused about this!
1 Answer
In general terms, a monolith is when all your code is deployed as one unit. If your database is just a service that's not separated from the web app, then it can still be considered a monolith. You’re right in thinking that a distributed monolith might apply here since you’re connecting to Supabase, but since it’s all in one repo, it gives off that monolithic vibe. Just remember, breaking a small app into microservices isn't usually ideal; save that for when you have multiple teams.
So, it's like the connection to the database acts as a microservice, but the whole app is still just one unit, right?