{"id":13580954,"url":"https://github.com/phoenixframework/phoenix_live_dashboard","last_synced_at":"2025-05-15T00:00:31.114Z","repository":{"id":39923342,"uuid":"224534171","full_name":"phoenixframework/phoenix_live_dashboard","owner":"phoenixframework","description":"Realtime dashboard with metrics, request logging, plus storage, OS and VM insights","archived":false,"fork":false,"pushed_at":"2025-04-28T08:30:50.000Z","size":4443,"stargazers_count":2084,"open_issues_count":12,"forks_count":195,"subscribers_count":40,"default_branch":"main","last_synced_at":"2025-05-07T23:28:48.041Z","etag":null,"topics":["dashboard","ecto","liveview","metrics","phoenix"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phoenixframework.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-11-27T23:29:51.000Z","updated_at":"2025-05-03T09:48:16.000Z","dependencies_parsed_at":"2022-08-09T15:36:32.898Z","dependency_job_id":"30fd6854-d074-47f0-b71e-36604fc5e396","html_url":"https://github.com/phoenixframework/phoenix_live_dashboard","commit_stats":{"total_commits":688,"total_committers":86,"mean_commits":8.0,"dds":0.5973837209302326,"last_synced_commit":"d1578d877a99e0f31eb6384201f4bbd7239e4028"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixframework%2Fphoenix_live_dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixframework%2Fphoenix_live_dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixframework%2Fphoenix_live_dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixframework%2Fphoenix_live_dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phoenixframework","download_url":"https://codeload.github.com/phoenixframework/phoenix_live_dashboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253900609,"owners_count":21981273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","ecto","liveview","metrics","phoenix"],"created_at":"2024-08-01T15:01:56.737Z","updated_at":"2025-05-15T00:00:31.067Z","avatar_url":"https://github.com/phoenixframework.png","language":"Elixir","funding_links":[],"categories":["Elixir","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Phoenix LiveDashboard\n\n[![CI](https://github.com/phoenixframework/phoenix_live_dashboard/actions/workflows/ci.yml/badge.svg)](https://github.com/phoenixframework/phoenix_live_dashboard/actions/workflows/ci.yml)\n\n[Online Documentation](https://hexdocs.pm/phoenix_live_dashboard).\n\n\u003c!-- MDOC !--\u003e\n\nLiveDashboard provides real-time performance monitoring and debugging tools for Phoenix developers. It provides the following modules:\n\n- Home - See general information about the system\n\n- OS Data - See general information about OS, such as CPU, Memory and Disk usage\n\n- Metrics - See how your application performs under different conditions by visualizing [`:telemetry`](https://hexdocs.pm/telemetry) events with real-time charts\n\n- Request logging - See everything that was logged for certain requests\n\n- Applications - See, filter, and search applications in the current node and view their processes in a supervision tree\n\n- Processes - See, filter, and search processes in the current node\n\n- Ports - See, filter, and search ports (responsible for I/O) in the current node\n\n- Sockets - See, filter, and search sockets (responsible for tcp/udp) in the current node\n\n- ETS - See, filter, and search ETS tables (in-memory storage) in the current node\n\n- Ecto Stats - Shows index, table, and general usage about the underlying Ecto Repo storage\n\nThe dashboard also works across nodes. If your nodes are connected via Distributed Erlang, then you can access information from node B while accessing the dashboard on node A.\n\n![screenshot](https://github.com/phoenixframework/phoenix_live_dashboard/raw/main/screenshot.png)\n\n## Installation\n\nThe LiveDashboard is built on top of LiveView. Both LiveView and LiveDashboard ship by default as part of Phoenix. But if you skipped them, you can LiveDashboard in three steps:\n\n1. Add the `phoenix_live_dashboard` dependency\n2. Configure LiveView\n3. Add dashboard access\n\n### 1. Add the `phoenix_live_dashboard` dependency\n\nAdd the following to your `mix.exs` and run `mix deps.get`:\n\n```elixir\ndef deps do\n  [\n    {:phoenix_live_dashboard, \"~\u003e 0.7\"}\n  ]\nend\n```\n\n### 2. Configure LiveView\n\nFirst, update your endpoint's configuration to include a signing salt:\n\n```elixir\n# config/config.exs\nconfig :my_app, MyAppWeb.Endpoint,\n  live_view: [signing_salt: \"SECRET_SALT\"]\n```\n\nThen add the `Phoenix.LiveView.Socket` declaration to your endpoint:\n\n```elixir\nsocket \"/live\", Phoenix.LiveView.Socket\n```\n\nAnd you are good to go!\n\n### 3. Add dashboard access for development-only usage\n\nOnce installed, update your router's configuration to forward requests to a LiveDashboard with a unique `name` of your choosing:\n\n```elixir\n# lib/my_app_web/router.ex\nuse MyAppWeb, :router\nimport Phoenix.LiveDashboard.Router\n\n...\n\nif Mix.env() == :dev do\n  scope \"/\" do\n    pipe_through :browser\n    live_dashboard \"/dashboard\"\n  end\nend\n```\n\nThis is all. Run `mix phx.server` and access the \"/dashboard\" to configure the necessary modules.\n\n### Extra: Add dashboard access on all environments (including production)\n\nIf you want to use the LiveDashboard in production, you should put authentication in front of it. For example, if you use `mix phx.gen.auth` to generate an Admin resource, you could use the following code:\n\n```elixir\n# lib/my_app_web/router.ex\nuse MyAppWeb, :router\nimport Phoenix.LiveDashboard.Router\n\n...\n\npipeline :admins_only do\n  plug :fetch_current_admin\n  plug :require_authenticated_admin\nend\n\nscope \"/\" do\n  pipe_through [:browser, :admins_only]\n  live_dashboard \"/dashboard\"\nend\n```\n\nIf you'd rather have some quick and dirty HTTP Authentication, the following code can be used as a starting point:\n\n```elixir\n# lib/my_app_web/router.ex\nuse MyAppWeb, :router\nimport Phoenix.LiveDashboard.Router\n\n...\n\npipeline :admins_only do\n  plug :admin_basic_auth\nend\n\nscope \"/\" do\n  pipe_through [:browser, :admins_only]\n  live_dashboard \"/dashboard\"\nend\n\ndefp admin_basic_auth(conn, _opts) do\n  username = System.fetch_env!(\"AUTH_USERNAME\")\n  password = System.fetch_env!(\"AUTH_PASSWORD\")\n  Plug.BasicAuth.basic_auth(conn, username: username, password: password)\nend\n```\n\nIf you are running your application behind a proxy or a webserver, you also have to make sure they are configured for allowing WebSocket upgrades. For example, [here is an article](https://web.archive.org/web/20171104012240/https://dennisreimann.de/articles/phoenix-nginx-config.html) on how to configure Nginx with Phoenix and WebSockets.\n\n\u003c!-- MDOC !--\u003e\n\n## Contributing\n\nFor those planning to contribute to this project, you can run a dev version of the dashboard with the following commands:\n\n    $ mix setup\n    $ mix dev\n\nAdditionally, you may pass some options to enable Ecto testing. For example, to enable the PostgreSQL repo:\n\n    $ mix dev --postgres\n\n...and to enable the MySQL repo:\n\n    $ mix dev --mysql\n\n...and to enable the SQLite repo:\n\n    $ mix dev --sqlite\n\nAlternatively, run `iex -S mix dev [flags]` if you also want a shell.\n\nBefore submitting a pull request, discard any changes that were made to the `dist` directory.\n\nFor example, to rollback using git restore:\n\n    $ git restore dist\n\n## License\n\nMIT License. Copyright (c) 2019 Michael Crumm, Chris McCord, José Valim.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoenixframework%2Fphoenix_live_dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphoenixframework%2Fphoenix_live_dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoenixframework%2Fphoenix_live_dashboard/lists"}