by aw4y on 11/16/21, 9:25 AM with 76 comments
by gwbas1c on 11/16/21, 2:24 PM
One of the security lessons from the late 1990s and early 2000s is that things like this quickly get hacked. Many developers forget that a service where all security is handled client-side are easy targets for hacking.
Furthermore: In a lot of cases, people will ship prototypes and run their stuff on top of them long after they have outgrown a critical component.
I have tried to write a universal backend... It's possible, but you really have to work in a permissions model from the beginning. What you'll find is that basic read/write/own enables very basic functionality. Unfortunately, to do anything complicated, you will need to write server-side queries that verify that the user is allowed to do what they are trying to do.
by aw4y on 11/16/21, 9:25 AM
Features:
no need to set up a database, all data is managed automagically*
REST paradigm CRUD for multiple entities/namespaces
schema validation
search using jq like syntax
CORS enabled
easy to deploy as container
by sgt on 11/16/21, 9:54 AM
Taking it even further; how about persisting the data in the file?
Sometimes your prototype will need some pre-added data so I think this might be useful.
by thih9 on 11/16/21, 11:09 AM
by brainzap on 11/16/21, 11:53 AM
by jpdelatorre on 11/16/21, 12:19 PM
by nkozyra on 11/16/21, 12:13 PM
While not a security risk if done locally, why not just use a where string builder to generate the $ values and a variadic as the input? It's about the same amount of work.
by shireboy on 11/16/21, 12:47 PM
by lhorie on 11/16/21, 5:07 PM
It never actually stores data on the server (it echos it into a cookie instead), so the dataset is only ever visible to you, no auth or service keys required.
by hardwaresofton on 11/16/21, 10:22 AM
https://github.com/rehacktive/caffeine/blob/master/service/s...
It's not "MVP" fashion but even for only one implementation making these interfaces is critical IMO.
That said, if it's not too much maybe consider adding a SQLite backend! :)
by rightly on 11/16/21, 11:46 AM
by josh_carterPDX on 11/16/21, 7:30 PM
The lesson I learned from that experience is that there is still a tremendous amount of distrust in platforms that make it easy to stand up something quickly. Even prototyping.
Even if you make it easy for users to export their code from your platform you will still run into scalability questions (i.e. what happens if someone builds the next Flappy Bird on your platform?).
All that aside, this is great! Congrats on launching Caffeine. :)
by l30n4da5 on 11/16/21, 2:24 PM
Correct me if I'm wrong, as I havent used Postgres in a few years, but doesn't the `json` column in Postgres just store the data as text?
Last I knew, jsonb was much more efficient/performant for queries and storage, while having a very robust api for querying specific properties.
Curious what the reasoning was for using json rather than jsonb.
by quickthrower2 on 11/16/21, 10:13 AM
I wonder if parse is still around and supported? I thought that was pretty good for this kinda thing.
by theK on 11/16/21, 11:49 AM
by miki_tyler on 11/16/21, 3:40 PM
by kjgkjhfkjf on 11/16/21, 7:47 PM
by hashimotonomora on 11/16/21, 12:09 PM
by cpursley on 11/16/21, 10:12 AM
by manx on 11/16/21, 9:40 AM
by blintz on 11/16/21, 9:49 AM
by sgt on 11/16/21, 9:42 AM
by kypro on 11/16/21, 5:24 PM
Am I the only person who rolls their eyes when I see another Caffeine / Coffee named project?