Skip to content

Add DNS Setup Reminder in Provision Command #332

Description

@josecelano

Overview

Add a reminder message in the provision command output to inform users they need to configure DNS to point their domains to the newly assigned server IP.

Specification

See detailed specification: docs/issues/332-dns-setup-reminder-in-provision-command.md

🏗️ Architecture Requirements

DDD Layers: Application + Presentation
Module Paths:

  • src/application/command_handlers/show/info/tracker.rs - Reuse domain extraction
  • src/presentation/controllers/provision/handler.rs - Controller orchestration
  • src/presentation/views/commands/provision/dns_reminder.rs - New view component

Pattern: MVC (Model-View-Controller) with DDD layering

Module Structure Requirements

Architectural Constraints

Anti-Patterns to Avoid

  • ❌ Duplicating domain extraction logic - reuse ServiceInfo
  • ❌ Mixing concerns across layers
  • ❌ Direct stdout/stderr access - always use UserOutput

Implementation Plan

Phase 1: Create DNS Reminder View

  • Create src/presentation/views/commands/provision/dns_reminder.rs
  • Add DnsReminderView struct with render() method
  • Extract all domains from ServiceInfo (HTTP trackers, API, health check, Grafana)
  • Format output with warning icon and domain list
  • Add unit tests for the view

Phase 2: Integrate into Provision Controller

  • Update src/presentation/controllers/provision/handler.rs
  • After displaying connection details, extract domain information
  • Use ServiceInfo::from_tracker_config() to get domains
  • Call DnsReminderView::render() if domains are present
  • Display using UserOutput methods

Phase 3: Update Show Command (Optional Enhancement)

  • Update show command to display DNS info for ALL domains (not just TLS)
  • Remove TLS-only restriction from HttpsHintView
  • Reuse DNS reminder view logic

Acceptance Criteria

Note for Contributors: These criteria define what the PR reviewer will check. Use this as your pre-review checklist before submitting the PR to minimize back-and-forth iterations.

Quality Checks:

  • Pre-commit checks pass: ./scripts/pre-commit.sh
  • All unit tests pass for new view
  • E2E tests pass (no regressions)

Task-Specific Criteria:

  • DNS reminder appears after provision command when domains are configured
  • DNS reminder lists ALL configured domains (HTTP trackers, API, health check, Grafana)
  • DNS reminder does NOT appear when no domains are configured
  • Output format includes warning icon, clear message, domain list
  • View follows MVC pattern
  • Uses UserOutput methods (no direct println!)

Related

  • Roadmap: Roadmap #1 (Section 10.1 - Improve usability)
  • Specification: docs/issues/332-dns-setup-reminder-in-provision-command.md

Metadata

Metadata

Assignees

Labels

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions