diagrams-js: TypeScript/JavaScript port of diagrams #1212
hatemhosny
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi @mingrammer and the diagrams community,
I wanted to share a project I've been working on/vibe-coded:
diagrams-js, a TypeScript/JavaScript port of the excellent Python diagrams library.
Why a TypeScript Port?
The JavaScript/TypeScript port offers some unique advantages:
The API is intentionally very similar to the Python version, adapted to TypeScript idioms:
Python's
with Diagram():→ TypeScript'sconst diagram = Diagram()Python's
>>operator → TypeScript's.to()methodPython's
<<operator → TypeScript's.from()methodSame provider paths and class names for all 2000+ nodes
I've created a comprehensive migration guide that shows side-by-side comparisons of Python vs TypeScript syntax, including a dedicated AI skill that can automatically convert Python diagrams code to TypeScript.
📚 Full Documentation
🎮 Interactive Playground
📝 Migration Guide
🤖 AI Guide & Skills
💻 GitHub Repository
This project would not exist without the original diagrams library. I've created a credits page acknowledging the original work, added acknowledgments section in the repo's README, and the project maintains the same MIT license.
Thank you for creating such an elegant and powerful tool for drawing cloud architecture diagrams as code. The diagrams library has been incredibly valuable to the community.
I was wondering if you would welcome a PR to add diagrams-js to the README under the "Other languages" section? I believe it could help JavaScript/TypeScript developers discover the library and provide another option for those who prefer working in that ecosystem.
Thank you for this fantastic project!
All reactions