A Forge app (for Confluence cloud) that renders mermaid diagrams from code blocks in Confluence pages.
Resources:
- Add a code block to your Confluence page
- Write your mermaid diagram syntax inside the code block
- Add a macro using "/" key and search for "mermaid"
- The diagram will be rendered automatically on the page
This app supports all Mermaid diagram types, including:
- Flowcharts
- Sequence diagrams
- Class diagrams
- State diagrams
- Entity relationship diagrams
- And more...
This is a Forge app. Install it from the Atlassian Marketplace.
Clone the repository and install dependencies:
yarn # install dependenciesThe project uses Yarn workspaces to manage dependencies across three packages:
app- The Forge app backendcustom-ui- The React UI for rendering diagramsshared- Shared code between app and custom-ui
# Terminal 1: Start the custom UI dev server
cd custom-ui
yarn dev # starts vite dev server on port 5173
# Terminal 2: Start the Forge tunnel
cd app
forge tunnel # proxies requests to local dev server and executes lambdas locallyThen install the app on your Confluence instance using:
forge install --upgrade# Build the custom UI
cd custom-ui
yarn build
# Deploy to your Forge app
cd app
forge deploy
forge install --upgradeRun tests across all workspaces:
# Run all tests
yarn test
# Run tests with coverage
yarn test --coverage
# Run tests for a specific workspace
cd custom-ui && yarn test
cd app && yarn test
cd shared && yarn test- Linting: Run
yarn lintto check code style - Node Version: Latest node LTS is required
- Package Manager: Yarn v1
Contributions to Mermaid Diagrams Viewer are welcome! Please see CONTRIBUTING.md for details.
Copyright (c) 2024 Atlassian US., Inc. Apache 2.0 licensed, see LICENSE file.



