Friction Logs

Friction Log: InstantDB

Diwaker Gupta
· 3 min read
Send by email

Hot on the heels of my friction log on Convex, I wanted to check out InstantDB.

ℹ️ What is InstantDB?

From the horse's mouth:

Instant is the easy to use backend for your frontend. With Instant you can build delightful apps in less than 10 minutes.
...
Instant gives you a database with queries, transactions, auth, permissions, storage, real-time and offline support. All in a simple SDK you can use directly in the browser.

🟢 Working with LLMs

Instant has (smartly) leaned heavily into making life easier for LLMs. I especially appreciated that they treat Zed like a first-class citizen, alongside Cursor etc 😅 They have pre-built rules, MCP server, LLM ready docs etc. That made it super easy to build something real without having to fully grok all the concepts and APIs up front.

🟡 Getting started in a "non standard" setup

Instant has a bunch of pre-made templates if you're starting a new React / React Native project. But, if you're trying to add on Instant in an existing project, or if you are using one of gazillions of other frontend frameworks out there, there's just that little added friction. Again, the LLMs are mostly good at this sort of thing so it's not a huge deal.

🟢 Docs

The documentation is solid and easy to follow. A nice touch was if you're logged in, all the code samples are pre-populated with your APP_ID.

🟢 Backend support

While the primary way to use Instant is directly in your application (e.g. within your React code), I like that there's a separate "admin" SDK. I haven't used it in my project yet, but I can imagine quite a few situations where something like that would come in handy. For instance, if you have some periodic cron or batch job that goes through the data for error correction or integrity checks.

🟢 Simple pricing

I really like the current pricing model (and hope it doesn't change!): unlimited API calls, no restrictions on number of apps etc, only restriction is the database size.

🟡 Testing and Development

Instant's recommendation to manage dev vs. prod environments is to use multiple apps. This is fine and works, but it would be nice to have first-class support for different application environments. In my case, the app is non-trivial but also not "serious", so I'm kinda sorta testing in prod.

Related: I'm not quite sure how to write unit tests for code that interacts with Instant. I don't want to pollute my dev or prod data, and ideally I should be able to run my unit tests offline (e.g. on a flight without wifi).

🟡 Schemas and Permissions

Schemas are loosely modeled after traditional relational databases, so the basics are not hard to grasp. One area I've struggled with is best practices. For example, you can just write your schema as part of your application. Or you could use the instant-cli to push and pull the schema down, at which my brain immediately starts thinking in git terms. You can also manipulate the schema directly from the dashboard. For a beginner like me, I like being told "This is the right way" ™️

Auth works great out of the box (I've only tried the magic codes thus far). But I'm still wrapping my head around the permission model. Here's an example: say I'm building a surveymonkey style application, where only logged in users can create surveys and anyone with a survey link can anonymously take the survey. Since the APP_ID is meant to be public, does that mean that by default my application is susceptible to anyone spamming the surveys? I'm sure there's a way to manage this with careful structuring of permissions, but again as a newcomer to Instant, it definitely makes me nervous.

🟠 Lot of new "languages"

While the basics of Instant are easy to pick up, and LLMs make it easy to get going, Instant does throw a lot of new languages in the mix. The permissions model is based on Google's CEL but it's not CEL exactly, the query language is based on GraphQL but it's not GraphQL, mutations are inspired by Firebase but not exactly like it and so on.

Again, none of this is a deal breaker, but it does add cognitive burden to the new developer.

🎁 Wrapping up

Overall I've really enjoyed using Instant thus far. I've built a non-toy app (not quite production ready yet) and I'm excited to push it live soon!