Generate Architecture Diagrams from Text with OpenDiagram
Job to be done: Generate architecture diagrams from text prompts using a custom AI tool
🇳🇬 Ways to use this in Nigeria
Ideas to get you started, adapt to your situation.
- Student
For your CSC401 final year project, quickly generate a system architecture diagram for your e-commerce platform, showing the database, API, and frontend, then fine-tune it in Excalidraw for your presentation.
- Entrepreneur
When pitching your new fintech app to investors, generate a clear architecture diagram of your payment gateway, user authentication, and database to explain your system visually.
- 9-5 employee
As a software developer, quickly document the architecture of a legacy system for new team members by describing its components and generating an editable diagram.
What you’ll get
You will generate editable architecture diagrams from simple text descriptions. This approach works because it separates the AI’s job of understanding your system from the task of visual layout, using specialized tools for each part.
Tools you need
- Gemini (freemium): An AI model to understand your text prompt and describe the system components.
- Excalidraw (freemium): A virtual whiteboard tool that creates hand-drawn-style diagrams and allows for easy editing.
- OpenDiagram (free): A custom tool that takes the AI’s description and turns it into an Excalidraw diagram.
Steps
-
Describe your system: Go to the OpenDiagram website. In the text box, describe the system you want to diagram. Be clear about the main components and how they interact. For example:
Design a URL shortener: API, cache, database, click analytics.You should see a text output from the AI describing the components, without any layout information like coordinates or colors.
-
Generate the diagram: The OpenDiagram tool will automatically process the AI’s output. You should see a diagram appear on the Excalidraw canvas. This diagram will have components, icons, and arrows that are arranged by a layout engine, not the AI.
-
Edit the diagram: Since the diagram is in Excalidraw, you can now click and drag any element (boxes, arrows) to reposition them. You can also add or change text. This allows you to fine-tune the diagram to your exact needs.
Original source
This workflow is based on a blog post by agasta, who shared their experience building an open-source AI diagram generator called OpenDiagram. They were frustrated with the inconsistent output from AI models when asking for diagrams and created a solution that uses Gemini for system design and Excalidraw for visual editing.
Notes & variations
- Free tier alternative: While Gemini is used here, you could experiment with other AI models that output structured text descriptions. However, the OpenDiagram tool is specifically built to work with the output format it expects.
- Common mistake: Do not ask the AI to “draw” the diagram or specify layout details like “put X here.” The OpenDiagram approach relies on the AI focusing only on describing the system components, letting the layout engine handle the visual arrangement.
- Tip for better results: Be very specific in your text prompt about the components and their functions. For example, instead of just “database,” specify “Postgres database for storing user data.”