Skip to content

Instantly share code, notes, and snippets.

@itsMapleLeaf
Last active August 26, 2024 04:52
Show Gist options
  • Select an option

  • Save itsMapleLeaf/0fea3021b6e29fc86f6111bd5fec9659 to your computer and use it in GitHub Desktop.

Select an option

Save itsMapleLeaf/0fea3021b6e29fc86f6111bd5fec9659 to your computer and use it in GitHub Desktop.

Revisions

  1. itsMapleLeaf revised this gist Aug 26, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,7 @@ 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

  2. itsMapleLeaf revised this gist Aug 26, 2024. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ Good:
    Not good:

    - Type safety is lacking and feels like an afterthought:
    - No way to sync the database accessor types with your schema
    - No way to sync your schema type with `instant.schema.ts`
    - `instant.perms.ts` is untyped
    - DB updates are completely untyped
    - Column types are not enforced on the backend; you can insert invalid documents without any warnings or errors
    - Types in `instant.schema.ts` are not enforced on the backend; you can insert invalid documents without any warnings or errors
  3. itsMapleLeaf revised this gist Aug 26, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ Not good:
    - 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](https://labs.convex.dev/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 yet for some reason)
    - 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 unsafe `v.any()`

    # Instant
  4. itsMapleLeaf created this gist Aug 26, 2024.
    40 changes: 40 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    Comparison between two modern BaaS services

    # Convex

    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](https://labs.convex.dev/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 yet for some reason)
    - No `v.unknown()` validator, only the very unsafe `v.any()`

    # Instant

    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 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 the database accessor types with your schema
    - `instant.perms.ts` is untyped
    - DB updates are completely untyped
    - Column types are not enforced on the backend; you can insert invalid documents without any warnings or errors