13 points · by kashnote · 4y ago · 21 comments
1: When a user joins my website, I want to show them a Welcome popup. Once they see this popup, I want to mark has_seen_welcome_popup to true. Next time they log in, I'll know not to show it to them. This is just one example. I may want to have a dozen of these sort of values defined per user.
2: Let's say I have a banner on the landing page that says "40% off" and I want to change that to "30% off." Instead of making a code change, I want to make this change in some sort of UI in the SaaS and have it update automatically.
---
Basically just need a place to store little things that I don't really want to store in the main database. And some nice UI where I can toggle those values as an admin without touching the prod DB.
My initial thought is to use Airtable but I'm not sure if there is something more purpose-built for this sort of scenario.
CouchDB is quite easy to maintain and it has a built-in admin UI you can use to easily edit your documents. To retrieve your JSON documents on the client side you'd use the http api, eg GET /database_name/document_id.
Or, you know, just use json/plain text file(s) on your server and be done with it..
Also, there is nothing wrong with being a beginning web dev, and your question is not a dumb question, but I'd have to call it a beginner question. I'm not sure HN is the right place for that. Someplace like Stackexchange or Reddit might be more suitable.
I can definitely do this on my own, but a SaaS with a nice UI just makes sense for this use case.
What's the difference between this and having a custom UI for it? Are you afraid of breaking stuff in production? You could simply create a different database for the "dumb" stuff.
https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage...
Second one could be a file served though HTTP. Like a JSON in a S3 bucket, or an index.html on a Linux/nginx VM. A file system is a database.
No, he wants global user state, not local browser state. Those are fundamentally different. With a local browser state, if I clear my browser website data, I get that again. If I use a different browser, I get it again. If I use a different device, I get it again.
Local storage should always be considered ephemeral, because it's trivial and common for it to be deleted or be unavailable.
I'd caution against Airtable, last time I used them in this capacity, the API rate limiting / response time made it a no go. I'd err more on something like hasura if you want a flexible CRM like that.
(And yes, I see the username and suspect this was a joke comment, but still.)