Using Coda as backend database for website and app?

Hey there!

I’ve been building a tool which tracks nutritional value from food and subsequently provides info on diet, as well as some other features.

I built it here to use as an MVP to test with customers, but since the experience of using coda to build is so quick and easy, I thought it was worth checking:

Is it possible/does anyone have any examples of where they’ve used coda as the backend/database which powers an app and website? Or is it simply not setup to do something like that?

Before I send up diving into researching this too heavily, it would be amazing to know what is possible/realistic, or whether I’m better off building the ‘real thing’ in something more purpose built/scalable, and if so, what alternatives others might have used?

Thanks so much for any thoughts!!

3 Likes

I’m building a diet manager for pet, let me tell you that work only with coda is a little “pain in the ass” for what concern the Huge nutritional DB’s and the “analysis table” to show the data (idk if you are on the “every nutrient must be logged” or more the “carbs fats and proteins” type, in the second case i would suggest you do try, in the other case probably using coda as a DB will make you loose precious developing time :slight_smile: )

So, for me the biggest problems are:

  1. The number of foods and nutrients you can have, as now the 125 mb max is a big stop, this to retain api capability. Just to say i’m like 97% full with 6500 ingredients and 100 nutrients.
  2. how fast this db will grow (a lot…) if you want to retain cross-link between recipes and ingredients (this to update your nutritional calculation with every foods value change) for example, you’ll have hard times splitting the data in more docs. So, also if you have a few foods and a few user you could get “125mb full” in a short! (multiple hack available to overcome, but still hack…)

Are you planning to retrive value from coda, calculate things and then sync those back into coda doc

or

Giving inputs from user (like “how many chicken have you eat today?” - A: 250g) to coda, that will calculate thing, and then re-ask with api for those in the front-end?
I’m really curious!

Update us on your progress! :slight_smile:

Not only possible, easy if you already know how to dev in something like 11ty. Especially for something simple like a personal/company blog or small marketing site.

Just use Postman to get up to speed with the Coda API and then use 11ty to pull in content from your Coda table.

The first build is easy. The ongoing builds (when a new entry is created in the Coda table…or an existing entry is modified) will require Coda talking to Netlify (assuming you’ll host on Netlify) via Netlify’s build hooks.

I’d have to test with Coda to see if a button could be configured to send the curl command to your Netlify build hook. Then the user could just click the button to trigger a deploy on either new rows or existing row updates.

(I’m currently doing a #100DaysOfCode project so perhaps I’ll add this as a mini-side-project to see what I can get working with Coda and 11ty)

Alternately, Zapier and Integromat both now support Coda and both have extensive integrations with Netlify to trigger builds.
Zapier => Netflify
Integromat => Netlify

NOTE: After checking the available Coda triggers at Integromat there is no “watch row updates” meaning there would be no way to use Integromat to push builds for updated rows. Only new rows in Coda.
Same with Coda triggers at Zapier… No way to trigger builds on Coda row updates.

3 Likes

Out dev team used the API for a DB of a small web project, so yes, it’s possible. if you need help building the app/web, reach me out at jonathan@intellbits.com

I would suggest a layer of caching is a necessity, and a pattern to ensure consistency should you miss an update or something else goes amiss, a popular safeguard is a list and watch pattern in the absence of stateful change streams.

Implementation of list and watch varies, in terms of webhooks you would listen for updates, but every X minutes poll for a full list of changes (possibly restricting time range) to compare for missed updates. Kubernetes controllers actually do this something like this.

When building your tooling add operations to ensure consistency, so in addition from ./pull-from-coda --watch and ./pull-from-coda [--dry-run] {resync, rebuild} - This will save your behind one day when it matters and time is precious.

On the zapier yes there is no hook for row updates but there is already built in automation to notify users on row change via email, you would need add a user update-consumer@mydomain and consume messages from this - you don’t need to digest pop3/imap if using gsuite, heck you could even build an App Script to consume the mesages and push to your webhook if you wanted to remove the mail dependency completely. This would be the simplest approach given the restrictions combined with the list+watch pattern.

@Codians - Is there a reason row update isn’t exposed as a zapier trigger? Also I’m surprised to see there is a webhook pack where I can simple configure a post URL and subscribe to events such row added to table, updated etc…

1 Like

Thank you all for the awesome replies! I’ll be reviewing this week and will come back with more thoughts once I have the time to really dig into this properly!

Thanks again!

1 Like

I having the same question on it. I’ll follow along to see if I could make it happen or else it’ll be quicker to learn to build in another language like nodeJS

Hi,
You can use Coda as a backend. It has it’s limitations, but I’m sure they’ll slowly iron them out as demand increases. You can use a frontend like toddle.dev to present the data from any Coda document.

Hey,

Using Coda as a backend/database for an app and website is technically feasible, but it may not be the most scalable solution for a production-level application. While Coda offers a user-friendly interface for building tools and databases, it may lack some of the advanced features and scalability options provided by dedicated backend solutions like Firebase, AWS, or MongoDB.

I’ve created an internal solution to show Coda’s data on a Google Apps Script generated website (it’s simple, but it works), so I would say it can be done.
But it comes with it’s caveats, for instance: the changes you do to your doc are not immediately available through API, so if you want anything real-time like, it won’t work.
Must consider scalability issues either – Coda won’t scale to millions of rows with the same performance as a true backend.

There are plenty of no-code / low-code backend solutions that maybe could be interesting for your use case, like https://www.xano.com/ and https://supabase.com/

1 Like