How mermaid-chart/confluence-mermaid-chart-plugin-v2 works
File structure
• Top‐level files:
• atlassian-connect.json (plugin descriptor)
• Procfile, vercel.json (deployment targets: Heroku, Vercel)
• config.json + credentials.json.sample (app config & Atlassian creds)
• Directories:
• routes/ (page routes: editor, settings, auth callback)
• views/ (Handlebars templates following MVC)
• public/ (static assets: CSS, plugin.js + editor client JS under public/js/editor)
• utils/ (MermaidChart renderer, redis helper)
• scripts/ (server startup, serverless-redis entrypoint)
README for additional insights
• Uses environment variables for OAuth client ID and MC_BASE_URL
• Instructions for embedding plugin.js in Confluence, then using window.CP.* functions to save, cancel or get data
• Development flow: atlassian-connect-express handles JWT auth, ngrok for tunneling
Elements
– Blue = Atlassian components (Confluence, JWT)
– Green = Plugin server internals (routes, APIs, utils)
– Orange = Data stores (Redis, external MC_BASE_URL)
– Gray = Client assets (plugin.js, editor scripts)
• Legends or labels for OAuth/JWT, “iframe boundary,” and API endpoints (/api, /editor)