Clarity is an interactive introspection and visualization tool for Elixir projects.
It automatically discovers and visualizes applications, domains, resources,
modules, and their relationships, giving you a navigable graph interface
enriched with diagrams, tooltips, and documentation.
- 📊 Graph navigation – explore your application structure visually.
- 🗂 Extensible introspection – support for Ash domains/resources, Phoenix endpoints, Ecto repos, and more.
- 🖼 Mermaid & Graphviz diagrams – ER diagrams, class diagrams, and policy diagrams where available.
- 📝 Markdown rendering – show documentation from moduledocs and resource definitions.
- 🔎 Interactive tooltips – quick overviews of vertices and edges.
- ⚡ LiveView-powered – fully dynamic, real-time updates in the browser.
- 🔌 Custom extensions – add your own introspectors to visualize domain-specific concepts.
Third-party libraries can add custom content to Clarity, extending its
visualization capabilities. To install any of these libraries, simply add them
to your mix.exs
dependencies.
- ash_diagram – Provides mermaid diagrams for Ash
mix igniter.install clarity
The package can be installed by adding clarity
to your list of dependencies
in mix.exs
:
def deps do
[
{:clarity, "~> 0.1.0"}
]
end
Router:
import Clarity.Router
clarity("/clarity")
Documentation can be generated with ExDoc and published on HexDocs.The docs can be found at https://hexdocs.pm/clarity.
Copyright 2025 Alembic Pty Ltd
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.