And when you take a step back and think for a moment, it just doesn't make sense that you have to run a whole separate team for something that's pretty much reusable across products.
18 karma · joined January 9, 2025
And when you take a step back and think for a moment, it just doesn't make sense that you have to run a whole separate team for something that's pretty much reusable across products.
"we just let our frontend engineer build the whole backend and schema and it turned into a disaster and wasn't maintainable"
and I was like - so it's the database's fault? :)
And great point - while we're focusing on full-stack web apps, I believe the same problem exists for other domains / stacks and there will most likely be more players focusing on these as well.
Relational dbs just have more built-in guardrails, but in our case we prefer to have the same guardrails in the framework.
The schema in Modelence is defined in your code, and at the moment the only use case where it's not enough is if someone directly modifies the database data externally. We're not against having the native MongoDB schema as an extra enforcement, the only reason we haven't added it yet is because it requires extra work to carefully sync both. I believe at some point we'll add it as an extra layer to prevent corrupting the data by direct modifications.
Later, the second realization is when you start needing deeper observability, and realize you have to bring in one more platform and set it up. Just adding another service is easy, but making them work seamlessly together is much harder. In this case the "failure" is that they realize they are spending way too much time to set things up to even see what's happening in their application in prod.
We don't automatically generate migration code - there's a set of structured mapping / guardrails, so for example if you add a new field without marking it as optional, you should get a warning/error when deploying it on an environment with existing data that has old records without that field set.
Modelence also has built-in support for user-defined migration scripts for more complex cases, but in these simpler cases we will be adding easy mappings with existing patterns, for example "set the field to X as the default value for all existing data".
Our focus here is the guardrails rather than the migration itself - LLMs today (especially Opus) are smart enough to figure out how to do the migration, but the guardrails make sure they don't miss it under any circumstances.
For the problems you're mentioning, what we've seen is that many people use it incorrectly, and we're building the framework in a way that prevents that in the app layer. But still curious about your experience - what are the biggest problems you've had in production MongoDB?
As for the framework, we always wanted to have things like built-in config management, cron jobs, and better live data support (pub/sub was too rigid) - Meteor was actually a huge inspiration in creating Modelence.
The client/server communication in Modelence is somewhat similar to Meteor, for example: https://github.com/modelence/examples/blob/main/ai-chat/src/...
And then the client calls these via react-query useQuery/useMutation for which Modelence has an adapter.
Most of the users we talked to had issues when they made changes like this in the schema with app builders, in any database regardless, where the management layer doesn't exist.
- For extending auth, currently the framework contribution is the main option, but we've intentionally made everything modular so we will be making it extensible with custom external packages as well (or even directly in your app without a package).
- Our system prompt actually doesn't have anything TypeScript specific (only Modelence specific instructions). But the typing system is literally a miracle - the success percentage from a single prompt went from about 30% to 90%+ just by adding the type checks for the agent. It is surprisingly good at self-correcting, to the point that even when it lacks context it ends up going into the framework code itself from node_modules to find the right usage.
The previous startup I’ve co-founded has been running on MongoDB since 2014 and everything was great for over 10 years of using it as our main db, hosting over million users and large enterprise customers.
A lot of this is obviously subjective, but we’ve always found MongoDB’s flexibility work great for a startup’s constant db changes. And we also believe that the existence of “Supabase for MongoDB” will be a good reason for more people to use it.
One of the AI-native aspects is if you use the built-in AI SDK (https://github.com/modelence/modelence/tree/main/packages/ai), you get all your AI prompt runs in the built-in dashboard in Modelence Cloud and you can also connect your AI provider (e.g. OpenAI) in the dashboard without having to manually specify the key in the code or pass through environment variables.
But there's more we adding soon - vector search and embeddings that are built into your database / MongoDB documents.
Probably need to add screenshots also, but our own platform at https://cloud.modelence.com uses these built-in auth UI from Modelence and a lot of other things it is bootstrapped with.