Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions elixir/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# Temporary files, for example, from tests.
/tmp/

# Generated browser assets.
/priv/static/assets/

# Local runtime logs.
/log/
/logs/
Expand Down
8 changes: 6 additions & 2 deletions elixir/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help all setup deps fmt fmt-check lint test coverage ci dialyzer
.PHONY: help all setup deps build fmt fmt-check lint test coverage ci dialyzer

MIX ?= mix

Expand All @@ -11,6 +11,9 @@ setup:
deps:
$(MIX) deps.get

build:
$(MIX) build

fmt:
$(MIX) format

Expand All @@ -31,7 +34,8 @@ dialyzer:
$(MIX) dialyzer --format short

ci:
$(MAKE) deps
$(MAKE) setup
$(MAKE) build
$(MAKE) fmt-check
$(MAKE) lint
$(MAKE) coverage
Expand Down
15 changes: 12 additions & 3 deletions elixir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If no path is passed, Symphony defaults to `./WORKFLOW.md`.
Optional flags:

- `--logs-root` tells Symphony to write logs under a different directory (default: `./log`)
- `--port` also starts the HTTP observability service (default: disabled)
- `--port` also starts the Phoenix observability service (default: disabled)

The `WORKFLOW.md` file uses YAML front matter for configuration, plus a Markdown body used as the
Codex session prompt.
Expand Down Expand Up @@ -145,8 +145,17 @@ codex:
```
- If `WORKFLOW.md` is missing or has invalid YAML, startup and scheduling are halted until fixed.
- `server.port` or CLI `--port` enables the optional HTTP dashboard and JSON API at `/`,
`/api/v1/state`, `/api/v1/<issue_identifier>`, and `/api/v1/refresh`.
- `server.port` or CLI `--port` enables the optional Phoenix LiveView dashboard and JSON API at
`/`, `/api/v1/state`, `/api/v1/<issue_identifier>`, and `/api/v1/refresh`.

## Web dashboard

The observability UI now runs on a minimal Phoenix stack:

- LiveView for the dashboard at `/`
- JSON API for operational debugging under `/api/v1/*`
- Bandit as the HTTP server
- Phoenix dependency static assets for the LiveView client bootstrap

## Project Layout

Expand Down
16 changes: 16 additions & 0 deletions elixir/config/config.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Config

config :phoenix, :json_library, Jason

config :symphony_elixir, SymphonyElixirWeb.Endpoint,
adapter: Bandit.PhoenixAdapter,
url: [host: "localhost"],
render_errors: [
formats: [html: SymphonyElixirWeb.ErrorHTML, json: SymphonyElixirWeb.ErrorJSON],
layout: false
],
pubsub_server: SymphonyElixir.PubSub,
live_view: [signing_salt: "symphony-live-view"],
secret_key_base: String.duplicate("s", 64),
check_origin: false,
server: false
1 change: 1 addition & 0 deletions elixir/lib/symphony_elixir.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ defmodule SymphonyElixir.Application do
:ok = SymphonyElixir.LogFile.configure()

children = [
{Phoenix.PubSub, name: SymphonyElixir.PubSub},
{Task.Supervisor, name: SymphonyElixir.TaskSupervisor},
SymphonyElixir.WorkflowStore,
SymphonyElixir.Orchestrator,
Expand Down
Loading