This Flask app renders Mermaid text directly in the browser. It does not use Harmonia,
product packs, or draw.io. You can paste Mermaid text manually or simulate an AI/API call.
The /api/generate route is a safe stub. Replace that logic with your real AI or API call later.
Mermaid renders to SVG, which behaves like a crisp image in the browser. You can also export the SVG from the DOM later if needed.
GET / -> Web UI
GET /health -> Health check for Cloud Run
POST /api/generate -> Returns Mermaid text as JSON (safe stub)
POST /api/render -> Validates Mermaid text and returns JSON
GET /api/example -> Returns a sample Mermaid diagram