hikerpig / pintora

An extensible text-to-diagrams library that works in both browser and node.js
https://pintorajs.vercel.app
MIT License
1.1k stars 24 forks source link

Feature Request: support c4model #225

Open atian25 opened 8 months ago

atian25 commented 8 months ago

pintora is cool~

maybe you could support c4 model one day

hikerpig commented 8 months ago

Yeah C4 is really cool but I feel I will need some time investigating. As far as I know, C4-PlantUML is a extension of PlantUML, I'm interested in PlamtUML's extension system but not yet have dived into its source code. And then comes Mermaid's implementation.

I will mark this as a big feature and try my best be compatible with grammars of the above two.

But this will have to wait for the halfway classDiagram - which I started but delayed for quite a while.

atian25 commented 8 months ago

Awesome work! I'm really looking forward to seeing the implementation of class and c4 functionalities. I've been working on a GPT plugin recently, which involves drawing capabilities. Unfortunately, I discovered that both PlantUML and Mermaid are too heavy (depends on Java or Puppeteer) and do not support the WINTERCG running environment.

hikerpig commented 8 months ago

Pintora itself depends node-canvs in Node.js side, does it work well in WINTERCG running environment ? I'm not familiar with WINTERCG yet, so here is a quick question, hope we don't miss anything.

atian25 commented 8 months ago

Pintora itself depends node-canvas in Node.js side, does it work well in WINTERCG running environment ?

er... that may be a big problem for me...

Looking ahead, there's an increasing need for lightweight development options in the GPTS Plugin. Platforms like Cloudflare Worker and Deno, which use WINTERCG Runtime, are becoming preferable choices due to their efficiency and minimal resource requirements. These platforms offer an effective solution to the challenges posed by heavier, more traditional development environments.

BTW, The node-canvas library, being a Node Addon package, presents certain challenges similar to those encountered with jsdom and node-sass. These packages are commonly known for causing oncall issues primarily because they lack prebuilt packages available for direct download by users. This absence often results in slow installation processes and a high likelihood of build failures. Such issues are particularly prevalent among developers working in Windows development environments, where setting up and successfully building these packages can be especially problematic. The lack of prebuilt packages means that users often have to compile the code themselves, which can be a complex and error-prone process, especially on systems where the necessary build tools and environments are not readily available or properly configured.

hikerpig commented 8 months ago

I do share your concerns, but it may take some time to investigate if replacing - or even rewriting one - canvas backend is acceptable regards time and quality under current circumstances.

I will take this in mind and explore some alternative options, but not promises though. Maybe we should open a new issue for this.