News for hackers. Stuff that matters.
Re:DBCore by eatonphil on Monday November 08, 2021 @04:50PM (#29154717)
Unexpected to see this here! I have not done a lot of work on this recently, but happy to answer any questions if you have any.
Re:DBCore by omarfarooq on Monday November 08, 2021 @05:37PM (#29155197)
Came across it on an old comment where you said you were building something similar to Supabase. ;)
Re:DBCore by claytonjy on Monday November 08, 2021 @04:50PM (#29154718)
Looks a lot like PostgREST, but with more backends (not just postgres), fewer fancy features (joins? not mentioned here), and with the client-side code generator built in (typescript).

If the author is reading, assuming I'm using Postgres and typescript, in what situations would I choose this over PostgREST + any openapi code generator?

Re:DBCore by eatonphil on Monday November 08, 2021 @04:56PM (#29154762)
The difference between this and openapi code generator (I think) is that I made a few specific decisions in the builtin templates that help get internal business apps off the ground faster. But since it's designed around a template system you could do whatever you want with it. And of course openapi is much more mature just generally speaking.

It's different from PostgREST in that it doesn't dynamically read schemas from the DB during the application server runtime. You generate an application from the DB up front and then you can do whatever you want with that generated application afterward.

Re:DBCore by eurasiantiger on Monday November 08, 2021 @05:30PM (#29155129)
How to migrate to a backwards-incompatible version of the schema without data loss?
Re:DBCore by eatonphil on Monday November 08, 2021 @06:16PM (#29155603)
This project has no state so to migrate your db you'd turn off the generated app, migrate the db, regenerate the app, and turn it back on.
Re:DBCore by llimllib on Monday November 08, 2021 @09:49PM (#29157141)
When I used a similar-ish library, the answer was mostly: don't make backwards-incompatible versions of the schema
Re:DBCore by algo_trader on Tuesday November 09, 2021 @08:16AM (#29161293)
Are there any UI-generators that can go with postgrest?

Dbcore looks so great, but i cant really stomach adding another language (Go..) to the mix.

Re:DBCore by claytonjy on Tuesday November 09, 2021 @09:17AM (#29162010)
I haven't used any of them, but PostgREST lists a bunch of client libs in a variety of languages in their docs. [0]

If you're worried about another language in the mix, you should know that PostgREST is powered by Haskell.

[0] https://postgrest.org/en/v8.0/ecosystem.html#client-side-lib...

Re:DBCore by eugeniox on Tuesday November 09, 2021 @03:12PM (#29166842)
You can try https://dadabik.com (disclaimer: I am the author/founder).
Re:DBCore by DoctorOW on Monday November 08, 2021 @04:57PM (#29154785)
Interesting how many languages are in here, HTML/CSS/TS on the front-end is no surprise, Go on the generated back-end is a little less expected than full-stack Typescript. The fact that the tool itself is in F# is really interesting. I kind of expected it to be some combinations of the others.

This is really cool. Poking around the source code, it's surprisingly simple. It's just a database -> template engine with a front-end/back-end template included.

Re:DBCore by PaulHoule on Monday November 08, 2021 @05:16PM (#29154998)
It is not surprising it is that simple. It really is that simple to generate CRUD templates. People just don’t do it.
Re:DBCore by hawksprite on Monday November 08, 2021 @06:54PM (#29155940)
I’ve been wanting to build this for years! Especially in a B2B setting, sometimes they simply want a prototype.
Re:DBCore by gravypod on Monday November 08, 2021 @04:56PM (#29154766)
I would love if something like this existed except it used a .proto as the source of truth and had a way to provide ways to rename/query certain fields.

Would make it easy to replace shared DBs with APIs over time.

Re:DBCore by revskill on Monday November 08, 2021 @11:28PM (#29157742)
Real world CRUD is a bit different though, you want to send the log to somewhere else, use Sentry to try catch error in your CRUD endpoint. Or publishing a message to Kafka after u created an object. How to integrate "real world components" into this ?
Re:DBCore by eatonphil on Monday November 08, 2021 @11:41PM (#29157817)
The primary use case I had in mind for this was internal business apps.

But a few ways you could hook without any code changes in dbcore: use LISTEN/NOTIFY or equivalent to hook on changes, poll for changes in the DB, "eject" the generated code and edit API handlers directly to call where you want, or just edit the default templates directly with whatever API handlers you want to call.

It's true there's not a great way to add hooks at a configuration level at the moment. But there are still many ways you could work around that.

Re:DBCore by manojlds on Tuesday November 09, 2021 @12:35AM (#29158103)
Lot of these internal business apps have a attached workflow to CRUD (reviews, approval etc)

Any thoughts around workflows?

Re:DBCore by rapnie on Tuesday November 09, 2021 @04:46AM (#29159573)
Not really in line with this particular CRUD subject, but combine-able esp. if things grow in size and scale: https://temporal.io provides a really nice way to code your workflows in Golang, applicable for small-scale, while hiding most complexity that come with scaling.
Re:DBCore by swyx on Tuesday November 09, 2021 @07:17PM (#29169417)
aye, i work at Temporal, happy to answer any qtns!
Re:DBCore by elzbardico on Monday November 08, 2021 @10:43PM (#29157468)
2021, let me introduce you to Microsoft Access, but now for the web
Re:DBCore by kfk on Tuesday November 09, 2021 @01:32AM (#29158428)
care to tell us what specific similarities you see between MS Access and this? I worked with Access and it had a few issues, it could be buggy and it did not support multiple users nor logins or sso.
Re:DBCore by elzbardico on Tuesday November 09, 2021 @08:21AM (#29161355)
I didn't meant to disparage the project. The comparison is because it does in the web basically the same thing that access provided: the ability for power users to build applications with minimal or absolutely no code given a physical data model.
Re:DBCore by ComodoHacker on Tuesday November 09, 2021 @05:11AM (#29159731)
It's more like Oracle APEX.
Re:DBCore by eatonphil on Tuesday November 09, 2021 @07:44AM (#29160977)
I have used Oracle APEX and I assure you this is pretty dissimilar to APEX. :)
Re:DBCore by cbsmith on Tuesday November 09, 2021 @07:24AM (#29160766)
Remember when DB's embedded web servers so you could access their data over HTTP? That was like 2000 right? The world has come full circle.
Re:DBCore by yummybear on Tuesday November 09, 2021 @07:27AM (#29160803)
We access the DB manually -> this is difficult and repetitive -> The DB does is -> This is inflexible and difficult -> We access the DB manually
Re:DBCore by jcmontx on Tuesday November 09, 2021 @07:39AM (#29160926)
I like these kind of tools. I wish there were more thing like this in the .NET ecosystem
Re:DBCore by vbilopav on Friday November 12, 2021 @01:04AM (#29196713)
There is, I made something similar for my needs.

Docs could be better, but it's a open source and free I did in my free ti lme without sponsors or any money.

https://github.com/vb-consulting/PgRoutiner