drawdb-io / drawdb

Free, simple, and intuitive online database design tool and SQL generator.
https://drawdb.app
GNU Affero General Public License v3.0
19.83k stars 1.38k forks source link

Usage as a library/ in another app #182

Open mmkal opened 1 month ago

mmkal commented 1 month ago

Hi, this looks fantastic!

I would love to use this within another application (specifically, in https://pgkit.dev which is a work-in-progress set of Postgres tools I'm working on). Looking at the code/docs I don't see anything about this, but it presumably would be possible since the repo is already open-source.

Of course if not set up this way it might take a bit of refactoring, to extract out the parts that belong in a library and not the drawdb.app website etc. I would be very happy to help with this if interested.

1ilit commented 1 month ago

Hey! Thanks for reaching out.

I've been thinking about wrapping it in a react component similar to tldraw. It will have the essential editor functions maybe not all of them.

pgkit looks really good, good luck

millette commented 1 month ago

@mmkal https://github.com/mmkal/pgkit is MIT, typegen and client have ISC licenses, npm defaults but it's not stated in the package.json files. See #190 for the issue regarding licensing.

I see many reasons to prefer copyleft licenses (à la GPL/AGPL) but that's just my opinion, I haven't contributed to drawdb.

mmkal commented 4 weeks ago

Licensing is definitely something that would need to be figured out, yes. pgkit is still v0 so the license is subject to change before it's ready for usage. There'd only be one small part of pgkit that used this so licensing that part differently, or just providing a way for end-users to download and run a drawdb react component might be possible.