Liking cljdoc? Tell your friends :D

boundary.user.core.ui

User-specific UI components based on User schema.

This namespace contains pure functions for generating user-related Hiccup structures. Components are derived from the User schema and handle user-specific business logic for display and forms.

User-specific UI components based on User schema.

This namespace contains pure functions for generating user-related Hiccup
structures. Components are derived from the User schema and handle
user-specific business logic for display and forms.
raw docstring

action-badgeclj

(action-badge action)

Display action type with appropriate styling.

Args: action - keyword action type (:create, :update, :delete, etc.)

Returns: Hiccup span with styled badge

Pure: true

Display action type with appropriate styling.

Args:
  action - keyword action type (:create, :update, :delete, etc.)
  
Returns:
  Hiccup span with styled badge
  
Pure: true
sourceraw docstring

audit-detail-modalclj

(audit-detail-modal)

Reusable modal for viewing audit log details.

Reusable modal for viewing audit log details.
sourceraw docstring

audit-detail-modal-scriptclj

(audit-detail-modal-script)

Script for wiring audit detail buttons to modal.

Script for wiring audit detail buttons to modal.
sourceraw docstring

audit-filtersclj

(audit-filters filters)

Generate filter form for audit logs.

Args: filters - current filter values

Returns: Hiccup form for filtering

Pure: true

Generate filter form for audit logs.

Args:
  filters - current filter values
  
Returns:
  Hiccup form for filtering
  
Pure: true
sourceraw docstring

audit-log-rowclj

(audit-log-row audit-log)

Generate audit log table row.

Args: audit-log - audit log entity map

Returns: Hiccup table row

Pure: true

Generate audit log table row.

Args:
  audit-log - audit log entity map
  
Returns:
  Hiccup table row
  
Pure: true
sourceraw docstring

audit-logs-tableclj

(audit-logs-table audit-logs table-query total-count)
(audit-logs-table audit-logs table-query total-count filters)

Generate audit logs table.

Args: audit-logs - collection of audit log entity maps table-query - normalized TableQuery total-count - total number of audit logs filters - optional map of parsed search filters

Returns: Hiccup structure for audit logs table

Pure: true

Generate audit logs table.

Args:
  audit-logs - collection of audit log entity maps
  table-query - normalized TableQuery
  total-count - total number of audit logs
  filters - optional map of parsed search filters
  
Returns:
  Hiccup structure for audit logs table
  
Pure: true
sourceraw docstring

audit-pageclj

(audit-page audit-logs table-query total-count opts)
(audit-page audit-logs table-query total-count filters opts)

Full audit logs page with layout.

Args: audit-logs - collection of audit log entity maps table-query - normalized TableQuery total-count - total number of audit logs filters - optional map of parsed search filters opts - page options (user context, flash messages, etc.)

Returns: Complete page hiccup

Pure: false

Full audit logs page with layout.

Args:
  audit-logs - collection of audit log entity maps
  table-query - normalized TableQuery
  total-count - total number of audit logs
  filters - optional map of parsed search filters
  opts - page options (user context, flash messages, etc.)
  
Returns:
  Complete page hiccup
  
Pure: false
sourceraw docstring

create-user-formclj

(create-user-form)
(create-user-form data errors)
(create-user-form data errors password-violations policy)
(create-user-form data errors password-violations policy opts)

Generate a form for creating new users based on CreateUserRequest schema.

Args: data: Optional form data map for pre-filling errors: Optional validation errors map password-violations: Optional password violations from policy check policy: Optional password policy configuration opts: Optional map with :return-to URL for post-create redirect

Returns: Hiccup structure for create user form

Generate a form for creating new users based on CreateUserRequest schema.

Args:
  data: Optional form data map for pre-filling
  errors: Optional validation errors map
  password-violations: Optional password violations from policy check
  policy: Optional password policy configuration
  opts: Optional map with :return-to URL for post-create redirect

Returns:
  Hiccup structure for create user form
sourceraw docstring

create-user-pageclj

(create-user-page & [data errors opts])

Complete create user page.

Args: data: Optional form data for pre-filling errors: Optional validation errors opts: Optional page options. Supports :return-to for the 'Back to users' button target and to thread through the form as a hidden field so the HTMX POST handler can redirect to the same URL on success.

Returns: Complete HTML page for creating users

Complete create user page.

Args:
  data: Optional form data for pre-filling
  errors: Optional validation errors
  opts: Optional page options. Supports :return-to for the 'Back to users'
        button target and to thread through the form as a hidden field so
        the HTMX POST handler can redirect to the same URL on success.

Returns:
  Complete HTML page for creating users
sourceraw docstring

dashboard-pageclj

(dashboard-page user dashboard-data opts)

User dashboard/welcome page with account statistics.

Args: user - authenticated user entity dashboard-data - map containing: :active-sessions-count - number of active sessions :mfa-enabled - boolean indicating MFA status opts - page options (flash messages, etc.)

Returns: Complete page hiccup

Pure: false

User dashboard/welcome page with account statistics.

Args:
  user - authenticated user entity
  dashboard-data - map containing:
    :active-sessions-count - number of active sessions
    :mfa-enabled - boolean indicating MFA status
  opts - page options (flash messages, etc.)
  
Returns:
  Complete page hiccup
  
Pure: false
sourceraw docstring

format-audit-timestampclj

(format-audit-timestamp timestamp)

Format timestamp for audit log display.

Args: timestamp - java.time.Instant or similar

Returns: Formatted timestamp string like '2026-02-01 07:39:15'

Pure: true

Format timestamp for audit log display.

Args:
  timestamp - java.time.Instant or similar

Returns:
  Formatted timestamp string like '2026-02-01 07:39:15'

Pure: true
sourceraw docstring

format-relative-time*clj

(format-relative-time* timestamp now zone-id)

Format a timestamp as relative time (e.g., '2 hours ago', 'just now').

Args: timestamp - java.time.Instant or similar now - java.time.Instant supplied by the shell

Returns: String describing time relative to the explicit reference time

Pure: true

Format a timestamp as relative time (e.g., '2 hours ago', 'just now').

Args:
  timestamp - java.time.Instant or similar
  now - java.time.Instant supplied by the shell
  
Returns:
  String describing time relative to the explicit reference time
  
Pure: true
sourceraw docstring

login-formclj

(login-form data errors)

Login form for email/password sign-in.

Args: data - map with optional :email / :remember / :return-to errors - map of field keyword -> vector of error messages

Login form for email/password sign-in.

Args:
   data   - map with optional :email / :remember / :return-to
   errors - map of field keyword -> vector of error messages
sourceraw docstring

login-pageclj

(login-page & [data errors opts])

Complete login page.

Args: data - form data map (may be empty) errors - validation errors (may be nil) opts - page options (user context, flash messages, return-to URL, etc.)

Complete login page.

Args:
  data   - form data map (may be empty)
  errors - validation errors (may be nil)
  opts   - page options (user context, flash messages, return-to URL, etc.)
sourceraw docstring

mfa-login-formclj

(mfa-login-form data errors)

Form for entering MFA code during login.

Args: data - map with :email, :password, :remember, :return-to errors - map of field keyword -> vector of error messages

Form for entering MFA code during login.

Args:
   data   - map with :email, :password, :remember, :return-to
   errors - map of field keyword -> vector of error messages
sourceraw docstring

mfa-login-pageclj

(mfa-login-page & [data errors opts])

Complete MFA login page (shown after successful password verification).

Args: data - form data map (must contain :email and :password) errors - validation errors (may be nil) opts - page options (user context, flash messages, return-to URL, etc.)

Complete MFA login page (shown after successful password verification).

Args:
  data   - form data map (must contain :email and :password)
  errors - validation errors (may be nil)
  opts   - page options (user context, flash messages, return-to URL, etc.)
sourceraw docstring

parse-user-agentclj

(parse-user-agent user-agent)

Extract browser and device information from user-agent string.

Args: user-agent - user-agent string

Returns: String like 'Chrome on Desktop' or 'Safari on Mobile'

Pure: true

Extract browser and device information from user-agent string.

Args:
  user-agent - user-agent string
  
Returns:
  String like 'Chrome on Desktop' or 'Safari on Mobile'
  
Pure: true
sourceraw docstring

password-requirement-itemclj

(password-requirement-item requirement)

Display a single password requirement with status indicator.

Args: requirement - map with :met?, :message

Returns: Hiccup list item with checkmark/x indicator

Pure: true

Display a single password requirement with status indicator.

Args:
  requirement - map with :met?, :message
  
Returns:
  Hiccup list item with checkmark/x indicator
  
Pure: true
sourceraw docstring

password-requirements-listclj

(password-requirements-list violations policy)

Display list of password requirements with current status.

Args: violations - vector of violation maps from meets-password-policy? policy - password policy configuration map

Returns: Hiccup list of requirements

Pure: true

Display list of password requirements with current status.

Args:
  violations - vector of violation maps from meets-password-policy?
  policy     - password policy configuration map
  
Returns:
  Hiccup list of requirements
  
Pure: true
sourceraw docstring

password-strength-indicatorclj

(password-strength-indicator violations)

Display password strength meter based on violation count.

Args: violations - vector of violation maps

Returns: Hiccup structure for strength meter

Pure: true

Display password strength meter based on violation count.

Args:
  violations - vector of violation maps
  
Returns:
  Hiccup structure for strength meter
  
Pure: true
sourceraw docstring

register-formclj

(register-form data errors)
(register-form data errors password-violations policy)

Form for self-service account creation.

Args: data - map with optional :name / :email / :return-to errors - map of field keyword -> vector of error messages password-violations - optional password violations from policy check policy - optional password policy configuration

Form for self-service account creation.

Args:
  data   - map with optional :name / :email / :return-to
  errors - map of field keyword -> vector of error messages
  password-violations - optional password violations from policy check
  policy - optional password policy configuration
sourceraw docstring

register-pageclj

(register-page & [data errors opts])

Complete self-service registration page.

Args: data - form data map (may be empty) errors - validation errors (may be nil) opts - page options (user context, flash messages, etc.)

Complete self-service registration page.

Args:
  data   - form data map (may be empty)
  errors - validation errors (may be nil)
  opts   - page options (user context, flash messages, etc.)
sourceraw docstring

result-badgeclj

(result-badge result)

Display result status with appropriate styling.

Args: result - keyword result (:success or :failure)

Returns: Hiccup span with styled badge

Pure: true

Display result status with appropriate styling.

Args:
  result - keyword result (:success or :failure)
  
Returns:
  Hiccup span with styled badge
  
Pure: true
sourceraw docstring

session-rowclj

(session-row session current-token user-id current-time zone-id)

Single row in the sessions table.

Args: session - session map with :token, :ip-address, :user-agent, :created-at, :last-active current-token - the current session token (to mark current session) user-id - user ID for action URLs

Returns: Hiccup table row

Pure: true

Single row in the sessions table.

Args:
  session       - session map with :token, :ip-address, :user-agent, :created-at, :last-active
  current-token - the current session token (to mark current session)
  user-id       - user ID for action URLs
  
Returns:
  Hiccup table row
  
Pure: true
sourceraw docstring

sessions-listclj

(sessions-list sessions current-token user-id current-time zone-id)

Table displaying all user sessions.

Args: sessions - collection of session maps current-token - the current session token user-id - user ID for action URLs

Returns: Hiccup table

Pure: true

Table displaying all user sessions.

Args:
  sessions      - collection of session maps
  current-token - the current session token
  user-id       - user ID for action URLs
  
Returns:
  Hiccup table
  
Pure: true
sourceraw docstring

user-created-successclj

(user-created-success user)

Generate success message for user creation based on User schema.

Args: user: Created User entity map

Returns: Hiccup structure showing success message

Generate success message for user creation based on User schema.

Args:
  user: Created User entity map
  
Returns:
  Hiccup structure showing success message
sourceraw docstring

user-deleted-successclj

(user-deleted-success user-id)

Generate success message for user deletion.

Args: user-id: ID of deleted user

Returns: Hiccup structure showing success message

Generate success message for user deletion.

Args:
  user-id: ID of deleted user
  
Returns:
  Hiccup structure showing success message
sourceraw docstring

user-detail-formclj

(user-detail-form user)

Generate a form for viewing/editing user details based on User schema.

Args: user: User entity map (from User schema)

Returns: Hiccup structure for user detail form

Generate a form for viewing/editing user details based on User schema.

Args:
  user: User entity map (from User schema)
  
Returns:
  Hiccup structure for user detail form
sourceraw docstring

user-detail-pageclj

(user-detail-page user & [opts])

Complete user detail page.

Args: user: User entity opts: Optional page options (user context, flash messages, etc.)

Returns: Complete HTML page for user details

Complete user detail page.

Args:
  user: User entity
  opts: Optional page options (user context, flash messages, etc.)
  
Returns:
  Complete HTML page for user details
sourceraw docstring

user-rowclj

(user-row user)

Generate user table row data based on User schema.

Args: user: User entity map (from User schema)

Returns: Vector of cell values for table row (some as Hiccup structures)

Generate user table row data based on User schema.

Args:
  user: User entity map (from User schema)
  
Returns:
  Vector of cell values for table row (some as Hiccup structures)
sourceraw docstring

user-sessions-pageclj

(user-sessions-page user sessions current-token opts)

Complete page for managing user sessions.

Args: user - user map sessions - collection of session maps current-token - the current session token opts - page options (user context, flash messages, etc.)

Returns: Complete page hiccup

Pure: false

Complete page for managing user sessions.

Args:
  user          - user map
  sessions      - collection of session maps
  current-token - the current session token
  opts          - page options (user context, flash messages, etc.)
  
Returns:
  Complete page hiccup
  
Pure: false
sourceraw docstring

user-updated-successclj

(user-updated-success user)

Generate success message for user update based on User schema.

Args: user: Updated User entity map

Returns: Hiccup structure showing success message

Generate success message for user update based on User schema.

Args:
  user: Updated User entity map
  
Returns:
  Hiccup structure showing success message
sourceraw docstring

user-validation-errorsclj

(user-validation-errors errors)

Generate validation error display for user forms based on User schema.

Args: errors: Map of field -> error messages from user validation

Returns: Hiccup structure for validation errors

Generate validation error display for user forms based on User schema.

Args:
  errors: Map of field -> error messages from user validation
  
Returns:
  Hiccup structure for validation errors
sourceraw docstring

users-pageclj

(users-page users)
(users-page users opts)
(users-page users total-count opts)

Complete users listing page.

Arities:

  • ([users]) ; infer total-count and no extra options
  • ([users opts]) ; infer total-count, with page options
  • ([users total-count opts]) ; full control

Args (3-arity): users: Collection of User entities total-count: Total number of users opts: Optional page options (user context, flash messages, etc.) May contain :table-query for sorting/paging and :filters.

Returns: Complete HTML page for users listing

Complete users listing page.

Arities:
- ([users])                  ; infer total-count and no extra options
- ([users opts])             ; infer total-count, with page options
- ([users total-count opts]) ; full control

Args (3-arity):
  users:       Collection of User entities
  total-count: Total number of users
  opts:        Optional page options (user context, flash messages, etc.)
               May contain :table-query for sorting/paging and :filters.

Returns:
  Complete HTML page for users listing
sourceraw docstring

users-tableclj

(users-table users)
(users-table users table-query total-count)
(users-table users table-query total-count filters)

Generate a table displaying users based on User schema.

Arities:

  • ([users]) ; basic table with default sorting, no query params in hx-get
  • ([users table-query total-count]) ; full control for paging/sorting
  • ([users table-query total-count filters]) ; with search filters

Args (3-arity): users: Collection of User entity maps table-query: TableQuery map (sorting/paging) total-count: Total number of users

Returns: Hiccup structure for users table

Generate a table displaying users based on User schema.

Arities:
- ([users])                         ; basic table with default sorting, no query params in hx-get
- ([users table-query total-count]) ; full control for paging/sorting
- ([users table-query total-count filters]) ; with search filters

Args (3-arity):
  users:       Collection of User entity maps
  table-query: TableQuery map (sorting/paging)
  total-count: Total number of users

Returns:
  Hiccup structure for users table
sourceraw docstring

users-table-fragmentclj

(users-table-fragment users table-query total-count)
(users-table-fragment users table-query total-count filters)

Generate just the users table container fragment (for HTMX refresh).

Args: users: Collection of User entity maps table-query: Normalized TableQuery (see boundary.platform.shell.web.table) total-count: Total number of users filters: Optional map of parsed search filters (see boundary.platform.shell.web.table)

Returns: Hiccup structure for users table container (no page layout)

Generate just the users table container fragment (for HTMX refresh).

Args:
  users:       Collection of User entity maps
  table-query: Normalized TableQuery (see boundary.platform.shell.web.table)
  total-count: Total number of users
  filters:     Optional map of parsed search filters (see boundary.platform.shell.web.table)

Returns:
  Hiccup structure for users table container (no page layout)
sourceraw docstring

web-root-pageclj

(web-root-page & [opts])

Landing page shown at /web — logo, welcome message, and login link.

Args: opts: Optional page options (flash messages, etc.)

Returns: Complete HTML page structure

Landing page shown at /web — logo, welcome message, and login link.

Args:
  opts: Optional page options (flash messages, etc.)

Returns:
  Complete HTML page structure
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close