Generate system architecture, ER, flowchart, network packet, circuit logic, 3D, math, and sequence diagrams from natural language prompts.
A backend-powered diagram assistant for developers, educators, and system designers.
Supports 13+ diagram engines like PlantUML, Mermaid, Graphviz, Structurizr, D2, Vega-Lite, Tikz, and many more.
meta-llama/llama-4-scout-17b-16e-instruct
llama-3.3-70b-versatile
llama-3.1-8b-instant
meta-llama/llama-4-maverick-17b-128e-instruct
mistralai/mistral-small-3.2-24b-instruct-2506:free
Engine | Can Generate |
---|---|
Graphviz | Flowcharts, directed/undirected graphs |
Blockdiag | Block diagrams |
Seqdiag | Sequence diagrams |
Packetdiag | Network packet diagrams |
C4 | C4 model diagrams (software architecture) |
D2 | Entity relationships, org charts, architectures |
ERD | Entity Relationship Diagrams |
Mermaid | Flowcharts, Gantt, class, pie, state diagrams |
Nomnoml | UML class diagrams |
PlantUML | UML diagrams (sequence, activity, use-case, etc.) |
Structurizr | Software architecture diagrams (C4 model) |
Symbolator | Digital logic and circuit diagrams |
TikZ | Math figures, circuit diagrams, flowcharts |
Vega-Lite | Bar, line, scatter charts (data visualization) |
Wavedrom | Digital timing diagrams |
- Natural language to diagram via Kroki
- Image + text-based diagram generation
- Multi-model LLM support
- Custom prompt engineering support
- Rate limiting and bot protection via Arcjet
- Supports 13+ diagram engines
Generates a diagram image from a natural language prompt, with optional image input (used for models that support images).
This route performs the full LLM-to-Kroki pipeline and returns both the generated code and the rendered diagram.
Renders a given diagram code (in a supported diagram syntax) directly into an image using the selected Kroki engine.
This route bypasses the LLM and is ideal when you already have the code and just want to convert it to an image.
POST /api/generate-image
{
"prompt": {
"text": "Create a CI/CD pipeline diagram with key stages and tool relationships."
},
"model": "llama-3.3-70b-versatile",
"engine": "plantuml"
}
{
"success": "true",
"code": "...",
"svg": "..."
}
{
"success": "false",
"error": "..."
}
POST /api/generate-image
{
"prompt": {
"text": "Create an ER diagram from following image",
"image": "https://dataedo.com/asset/img/blog/erd_with_pen.png"
},
"model": "llama-3.3-70b-versatile",
"engine": "erd"
}
{
"success": "true",
"code": "...",
"svg": "..."
}
{
"success": "false",
"error": "..."
}
POST /api/render-code
{
"code":"..."
"engine": "plantuml"
}
{
"success": "true",
"svg": "..."
}
{
"success": "false",
"error": "..."
}
Parameter | Type | Allowed Values | Description |
---|---|---|---|
model |
string (LLM) | Text-based LLMsmeta-llama/llama-4-scout-17b-16e-instruct ,llama-3.3-70b-versatile ,llama-3.1-8b-instant ,meta-llama/llama-4-maverick-17b-128e-instruct Text+Image LLMs mistralai/mistral-small-3.2-24b-instruct-2506:free |
LLMs used for generating diagrams |
engine |
string (Diagram Engine) | plantuml , mermaid , graphviz , structurizr , blockdiag , seqdiag , packetdiag , c4plantuml , d2 , erd , nomnoml , tikz , vegalite , symbolator , wavedrom |
Rendering engines supported by Kroki |
Create a file named either:
.env.development.local
– for development.env.production.local
– for production
⚠️ Other filenames will not work without changes to the environment loader config.
Place it in the root of your project directory.
# ENVIRONMENT
NODE_ENV=development
# PORT
PORT=3000
# ARCJET
ARCJET_KEY=your_arcjet_key_here
# LLM PROVIDERS
# 1. GROQ
GROQ_API=your_groq_api_key_here
GROQ_ENDPOINT=https://api.groq.com/openai/v1/chat/completions
# GROQ MODELS
GROQ_LLM_1=meta-llama/llama-4-scout-17b-16e-instruct
GROQ_LLM_2=llama-3.3-70b-versatile
GROQ_LLM_3=llama-3.1-8b-instant
GROQ_LLM_4=meta-llama/llama-4-maverick-17b-128e-instruct
# 2. OPENROUTER
OPENROUTER_ENDPOINT=https://openrouter.ai/api/v1/chat/completions
# OPENROUTER MODELS
OPENROUTER_LLM_1=mistralai/mistral-small-3.2-24b-instruct-2506:free
OPENROUTER_API_1=your_mistralai_api_key_here
# RENDER ENGINES
ENGINE_1=graphviz
ENGINE_2=blockdiag
ENGINE_3=seqdiag
ENGINE_4=packetdiag
ENGINE_5=c4plantuml
ENGINE_6=d2
ENGINE_7=erd
ENGINE_8=mermaid
ENGINE_9=nomnoml
ENGINE_10=plantuml
ENGINE_11=structurizr
ENGINE_12=symbolator
ENGINE_13=tikz
ENGINE_14=vegalite
ENGINE_15=wavedrom
-
ARCJET API Key → https://arcjet.com
Sign up at https://arcjet.com and create a new project. Once created, your API key will be displayed at the top under your project name as ARCJET_KEY = **************
-
GROQ API Key → https://console.groq.com/keys
-
Mistral API Key → https://openrouter.ai/mistralai/mistral-small-3.2-24b-instruct:free/api
git clone git@github.com:anubhav-m/logisketch-server.git
cd logisketch-server
npm install
Refer to the Environment Configuration section for setup
npm run dev
When deploying on Render, Railway, Fly.io, or similar platforms, make sure to configure the following:
npm install
npm start
NODE_ENV=production
Upload your env.production.local
file.
Refer to the Environment Configuration section for the full list of variables.
This project is licensed under the terms of the MIT License.