What is a module?
Lots to unpack. Fantastic. Looking forward. Thanks for the detailed update! Especially looking forward to the Module System. Is that something akin to a library of Functions (open to all of the Convex community to build) that can be imported into projects? Curious what you meant by not having to copy and paste in that scenario.
1 Reply
There are lots of different applications of modules in Convex. At a high level you can think about it as some self-contained code, similar to an npm package, but that also has its own table state.
One userspace-feature application of modules would be something like a waiting room folks can use in their app. This has functions but also tables it needs to store data on who is waiting.
A more sophisticated application could be something like row-level security, where you install a module that takes a table reference and provides a wrapper that guards access to that table according to given rules.
There are plenty of modules that Convex want to build and that third parties will presumably write too, but this is also a good organizational tool for larger companies where there are shared components between projects, separate teams working in dependently, etc. A lot of this work is building blocks for future developments to support larger teams.