How styliteag/ssm works
SSM is a Phoenix LiveView application and wire-compatible JSON API for managing users, SSH keys, host access authorizations, and remote authorized_keys files. Users enter through the authenticated web UI or API; the application manages those records and provides activity, host-diff, and synchronization capabilities. The sampled host, key, and authorization API controllers show calls into domain services; the README documents the wider SSH and diff capabilities, whose internal call paths were not sampled. The graph therefore keeps those links explicitly unverified rather than implying a detailed execution chain.
Main entry points: router.ex Phoenix router · live LiveView screens · authorization_controller.ex Authorization API · hosts.ex Host management
Components 21
Web application
- Phoenix router
phoenix/lib/ssm_web/router.ex - LiveView screens
phoenix/lib/ssm_web/live - Web sessions
phoenix/lib/ssm_web/controllers/session_controller.ex - Web authentication
phoenix/lib/ssm_web/user_auth.ex - UI components
phoenix/lib/ssm_web/components/core_components.ex - UI layouts
phoenix/lib/ssm_web/components/layouts.ex
JSON API
- API authentication
phoenix/lib/ssm_web/api/auth_plug.ex - Host API
phoenix/lib/ssm_web/controllers/api/host_controller.ex - Key API
phoenix/lib/ssm_web/controllers/api/key_controller.ex - Authorization API
phoenix/lib/ssm_web/controllers/api/authorization_controller.ex - Other API endpoints
phoenix/lib/ssm_web/controllers/api
Access management
- Host management
phoenix/lib/ssm/hosts.ex - Users and keys
phoenix/lib/ssm/users/bulk_ops.ex - Access authorizations
phoenix/lib/ssm/authorizations.ex - Activity history
phoenix/lib/ssm/activity.ex
Remote operations
- Host diffs
phoenix/lib/ssm/diffs.ex - SSH operations
phoenix/lib/ssm/ssh/erlang_client.ex
Runtime and storage
- SQLite repository
phoenix/lib/ssm/repo.ex - OTP application
phoenix/lib/ssm/application.ex
Other components
- Operator
- API client
Connections 29
- Operator → Phoenix router: uses web
- API client → Phoenix router: calls API
- Phoenix router → LiveView screens: routes LiveView
phoenix/lib/ssm_web/router.ex - Phoenix router → Web sessions: routes sessions
phoenix/lib/ssm_web/router.ex - Phoenix router → Web authentication: guards pages
phoenix/lib/ssm_web/router.ex - Phoenix router → API authentication: protects API
phoenix/lib/ssm_web/router.ex - LiveView screens → UI components: uses components
- LiveView screens → UI layouts: uses layouts
- Web sessions → Web authentication: logs in
phoenix/lib/ssm_web/controllers/session_controller.ex - API authentication → API client: checks bearer token
- Host API → Host management: calls
phoenix/lib/ssm_web/controllers/api/host_controller.ex - Key API → Users and keys: calls
phoenix/lib/ssm_web/controllers/api/key_controller.ex - Authorization API → Access authorizations: calls
phoenix/lib/ssm_web/controllers/api/authorization_controller.ex - Authorization API → Host management: checks host
phoenix/lib/ssm_web/controllers/api/authorization_controller.ex - Authorization API → Users and keys: checks user
phoenix/lib/ssm_web/controllers/api/authorization_controller.ex - Phoenix router → Host API: routes hosts
phoenix/lib/ssm_web/router.ex - Phoenix router → Key API: routes keys
phoenix/lib/ssm_web/router.ex - Phoenix router → Authorization API: routes grants
phoenix/lib/ssm_web/router.ex - Phoenix router → Other API endpoints: routes endpoints
phoenix/lib/ssm_web/router.ex - LiveView screens → Host management: manages hosts
- LiveView screens → Users and keys: manages users and keys
- LiveView screens → Access authorizations: manages grants
- LiveView screens → Host diffs: shows diffs
- LiveView screens → Activity history: shows activity
- Host diffs → SSH operations: checks remote hosts
- SSH operations → Host management: targets managed hosts
- OTP application → SQLite repository: starts
phoenix/lib/ssm/application.ex - OTP application → SSH operations: starts client
phoenix/lib/ssm/application.ex - Host diffs → Activity history: records operations