Comparison between two modern BaaS services
Good:
- Realtime
- Alongside DB, also supports auth, file uploads, server functions, and background tasks
- Experience from end to end is very typesafe
- Backend is open-source
- DB is very strictly validated by the schema
- Very extensible
Not good:
- No direct database access outside of mutations
- Convex requires queries, mutations, and actions for technical reasons, but not being able to let trusted backends directly access the database is a huge pain sometimes
- No built-in support for relationships beyond ID pointers, e.g. cascading deletes, enforced related documents
- This is a design decision, and this exists in the form of the convex-ents third party library, but is not enforced at the DB level
- The Convex Auth library only has backend support for Next.js
- No
v.record()
validator (it exists, but it's not a part of the public API for some reason) - No
v.unknown()
validator, only the very unsafev.any()
Good:
- Very good onboarding experience
- DB queries and updates can be made from anywhere, including the backend
- A robust permissions system which makes free database access less scary
- Builtin auth support
- Builtin app devtools - very cool!
- No enforced frontend/backend separation makes it really quick and painless to iterate and add features
Not good:
- Type safety is lacking and feels like an afterthought:
- No way to sync your schema type with
instant.schema.ts
instant.perms.ts
is untyped- DB updates are completely untyped
- No way to sync your schema type with
- Types in
instant.schema.ts
are not enforced on the backend; you can insert invalid documents without any warnings or errors