caclawphony/elixir/Makefile
Alex Kotliarskyi b0e0ff0082
Move Elixir observability dashboard to Phoenix (#29)
#### Context

Replace the custom Elixir observability TCP server with Phoenix while
keeping the shipped escript and existing operational API calls working
the same way they did before.

#### TL;DR

*Move the Elixir observability dashboard and API onto Phoenix without
breaking the escript or curl workflows.*

#### Summary

- replace the custom HTTP server with a Phoenix endpoint, router,
controller, and shared presenter
- add a LiveView operations dashboard with PubSub-driven updates and
embed its CSS and JS assets in code
- preserve runtime compatibility by accepting form-style POSTs and
extending the endpoint coverage around those paths

#### Alternatives

- keep extending the hand-rolled TCP server, but that keeps custom
parsing and routing complexity in the app
- serve dashboard assets from priv directories, but the shipped escript
cannot rely on those files existing on disk

#### Test Plan

- [x] `make -C elixir all`
- [x] `mix -C elixir test test/symphony_elixir/extensions_test.exs`
- [x] `./bin/symphony
--i-understand-that-this-will-be-running-without-the-usual-guardrails
--port 40123`
- [x] `curl -si http://127.0.0.1:40123/dashboard.css`
- [x] `curl -si http://127.0.0.1:40123/vendor/phoenix/phoenix.js`
- [x] `curl -si -X POST -d '' http://127.0.0.1:40123/api/v1/refresh`
- [x] `curl -si -X POST -d '' http://127.0.0.1:40123/api/v1/state`

---------

Co-authored-by: Codex <codex@openai.com>
2026-03-04 17:24:56 -08:00

45 lines
559 B
Makefile

.PHONY: help all setup deps build fmt fmt-check lint test coverage ci dialyzer
MIX ?= mix
help:
@echo "Targets: setup, deps, fmt, fmt-check, lint, test, coverage, dialyzer, ci"
setup:
$(MIX) setup
deps:
$(MIX) deps.get
build:
$(MIX) build
fmt:
$(MIX) format
fmt-check:
$(MIX) format --check-formatted
lint:
$(MIX) lint
coverage:
$(MIX) test --cover
test:
$(MIX) test
dialyzer:
$(MIX) deps.get
$(MIX) dialyzer --format short
ci:
$(MAKE) setup
$(MAKE) build
$(MAKE) fmt-check
$(MAKE) lint
$(MAKE) coverage
$(MAKE) dialyzer
all: ci