Server Web
Language
- Elixir.
Runtime Context
- Server HTTP/UI boundary.
- Phoenix Router, controllers, LiveView, channels, components, and LiveDashboard extensions.
Purpose
- Exposes browser UI routes, JSON API routes, Ash JSON:API forwarding, E2E API routes, LiveDashboard pages, and terminal WebSocket channels.
Key Files
packages/server/lib/nixstasis_web/router.expackages/server/lib/nixstasis_web/endpoint.expackages/server/lib/nixstasis_web/controllers/*.expackages/server/lib/nixstasis_web/live/**/*.expackages/server/lib/nixstasis_web/channels/user_socket.expackages/server/lib/nixstasis_web/channels/terminal_channel.expackages/server/lib/nixstasis_web/components/*.expackages/server/lib/nixstasis_web/live_dashboard/*.ex
Public Interfaces
Browser Routes
//devices/devices/new/devices/:id/alerts/alerts/new/alerts/:id/edit/alerts/rules/reports/reports/new/reports/:id/edit/reports/:id/settings
JSON API Routes
GET /api/v1/builder-schemasGET /api/v1/builder-schemas/:schema_id/versions/:schema_version/optionsPOST /api/v1/builder-configurations/validateGET /api/v1/devicesPOST /api/v1/devices/registerPOST /api/v1/devices/:device_id/heartbeatPOST /api/v1/devices/:device_id/command_resultsGET /api/v1/devices/:device_id/command_payloads/:refGET /api/v1/reports/:id/resultsGET /api/v1/check_domain
E2E Routes
GET /e2e/suitesGET /e2e/runsPOST /e2e/runsGET /e2e/runs/:idPOST /e2e/runs/:id/cancelGET /e2e/runs/:id/resultsPOST /e2e/runs/:id/resultsGET /e2e/runs/:id/results/:journey_id/log
Channels
- Socket channel topic pattern:
terminal:*. - Socket connect requires a Phoenix token signed for
terminal_socket. - Terminal channel join uses an opaque, expiring server-side session ref.
Dependencies
Internal
Nixstasis.DevicesNixstasis.MonitoringNixstasis.ReportingNixstasis.E2ENixstasis.DeploymentNixstasisWeb.Plugs.E2EEnabled
External
- Phoenix
- Phoenix LiveView
- Phoenix Channels
- Phoenix LiveDashboard
- OpenApiSpex
- Plug/Swoosh development routes
Client-Server Interaction Details
- Go client device traffic uses JSON routes under
/api/v1/devices. - Browser UI uses Phoenix LiveView over HTTP and LiveView WebSocket transport.
- Device detail uses the
/devices/:idLiveView route and may render as a modal overlay over the Devices list; the old REST modal API is not part of the supported surface. - Terminal UI uses Phoenix Channels over WebSocket.
- Caddy on-demand TLS calls
/api/v1/check_domain. - E2E harness calls
/e2eroutes withX-E2E-Protocol-Versionon run creation.
Traceable references:
packages/server/lib/nixstasis_web/router.ex:1-117packages/server/lib/nixstasis_web/channels/user_socket.ex:37-64packages/server/lib/nixstasis_web/channels/terminal_channel.ex:20-113packages/server/lib/nixstasis_web/controllers/e2e_run_controller.ex:7-62