3 ms·
This is really interesting. I spent a while a few weeks ago looking around for a serious, open-source BaaS effort backed by... anyone. I've been influenced by
by eatonphil 6y ago
This is really interesting. I spent a while a few weeks ago looking around for a serious, open-source BaaS effort backed by... anyone.
I've been influenced by code generators like xo/xo [0] and sqlboiler [1] recently (so you can have type-safe APIs and you still manage/own the resulting code).
My bet is that you can generate an entire API _and_ basic CRUD browser UI from a db schema. I've been working on a code generator that does this. It can currently generate an entire Go REST API with CRUD operations from a PostgreSQL database. Next is to generate a React/TypeScript UI and add auth support.
The advantage a project like mine has over this is that it defines a standard API specification and you can build an APIs and UIs against that standard. Right now the only API is Go, but I'd like to build a Java one too and would be open to community submissions.
Same thing goes for database dialect. Right now it's PostgreSQL only, but this kind of code generation can be done on any database once a driver is added.
Won't link to it here because the whole thing is WIP but it's on Github. I see this kind of project as a long-term base for rapidly building any sort of db-based applications in the future.
[0] https://github.com/xo/xo https://github.com/xo/xo
[1] https://github.com/volatiletech/sqlboiler https://github.com/volatiletech/sqlboiler
- jimktrains2 6y agoI built something a while ago call bam[0] that basically did that. You specces your application in an xml file and it built out the admin ui, orm code, and db schema. I took a bet on a soon to be dead framework and ultimately didn't have time to continue the project, but it worked pretty well.
- eatonphil 6y agoThat makes sense. I'm hedging against dead technology by keeping the database and code generation parts separate from the templates. This way you can have templates for any languages so long as they speak a shared (HTTP) API specification.
- jimktrains2 6y agoI did the same, I just didn't feel like going back and rewriting all the templates. Whoopse! forgot the link earlier https://github.com/jimktrains/bam https://github.com/jimktrains/bam I wish I had included an example in there though :(
- kiwicopple 6y ago> My bet is that you can generate an entire API _and_ basic CRUD browser UI from a db schema That's what we're building! We already have the auto-APIs, and auto-documentation. The auto-UI is in the works. It essentially is Airtable, but backed by Postgres Also, we will provide "meta" REST APIs for your database. Want to programmatically add columns or fetch all your database types? No probs.
- eatonphil 6y agoAs an eng manager, my concern with Supabase is the complexity of the systems involved. There's PostgREST (Haskell) and then a bunch of Elixir on top? Not only is that two services (plus the database) but they're in languages that aren't easy to hire for if I have to do maintenance or development. I don't think this will be a problem for attracting startups (who will take up the new hotness) or for large enterprises (where you can package all the services into a black box that you support). And I get that you're building on some well-known existing software (PostgREST, primarily) but I'm still concerned about the operational overhead. My preference (as an eng manager) would be to operate (and develop hooks for) a single generated server in Go, Java, or Python rather than manage a real BaaS. Still, it's a cool project and good to have open source _and_ backed by YC. I passed it along to friends whk are looking for this kind of thing. Best of luck.
- eatonphil 6y agoHere's [0] the docs site for the code generator I'm working on. It generates a Go REST API with basic CRUD operations (plus filtering, pagination and sorting). Next up is authentication and a React UI. [0] https://eatonphil.github.io/dbcore/ https://eatonphil.github.io/dbcore/