Skip to content

Refactor DnsClient#234

Merged
rorychatt merged 9 commits into
mainfrom
refactor-dnsclient
Oct 10, 2025
Merged

Refactor DnsClient#234
rorychatt merged 9 commits into
mainfrom
refactor-dnsclient

Conversation

@ArtemLazarchuk

Copy link
Copy Markdown
Collaborator

DNS Client

image

One-Click Development Environment

Open in GitHub Codespaces

Click the badge above to open Ivy Examples repository in GitHub Codespaces with:

  • .NET 9.0 SDK pre-installed
  • Ready-to-run development environment
  • No local setup required

Created Using Ivy

Web application created using Ivy-Framework.

Ivy - The ultimate framework for building internal tools with LLM code generation by unifying front-end and back-end into a single C# codebase. With Ivy, you can build robust internal tools and dashboards using C# and AI assistance based on your existing database.

Ivy is a web framework for building interactive web applications using C# and .NET.

Interactive Example For DNS Lookups

This example demonstrates DNS query operations using the DnsClient.NET library integrated with Ivy. DnsClient.NET is a simple yet very powerful and high performant open source library for the .NET Framework to do DNS lookups.

What This Application Does:

This specific implementation creates a DNS Lookup Tool that allows users to:

  • Query DNS Records: Perform DNS lookups for multiple record types (A, AAAA, MX, TXT, CNAME, NS, PTR, SRV, SOA)
  • Detailed Information Display: Shows IP addresses, mail servers with priorities, text records, name servers, and more
  • Query Status Tracking: View query success status, name server, record count, and message size
  • Record Sections: Organized display of Answers and Authority sections
  • Domain Validation: RFC 1035/1123 compliant domain name validation
  • Interactive UI: Clean card-based layout with structured data presentation

Technical Implementation:

  • Uses DnsClient.NET's LookupClient with singleton pattern for optimal performance
  • Type-specific rendering for each DNS record type (A, AAAA, MX, TXT, CNAME, NS, PTR, SRV, SOA)
  • Displays detailed record data: IPv4/IPv6 addresses, mail server priorities, TTL values
  • Implements async DNS queries with error handling and toast notifications
  • Domain validation using regex patterns (RFC 1035/1123 compliant)
  • Signal-based component communication for reactive UI updates
  • Split display with query form and detailed results sections

How to Run

  1. Prerequisites: .NET 9.0 SDK
  2. Navigate to the example:
    cd dnsclient
  3. Restore dependencies:
    dotnet restore
  4. Run the application:
    dotnet watch
  5. Open your browser to the URL shown in the terminal (typically http://localhost:5010)

How to Deploy

Deploy this example to Ivy's hosting platform:

  1. Navigate to the example:
    cd dnsclient
  2. Deploy to Ivy hosting:
    ivy deploy

This will deploy your DNS lookup application with a single command.

Learn More

@ArtemLazarchuk ArtemLazarchuk self-assigned this Oct 10, 2025
@rorychatt
rorychatt requested a review from Copilot October 10, 2025 14:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the DNS Client example application by renaming the project namespace from IvySample.DnsClient to DnsClientExample and enhancing the user interface with improved styling, better error handling, and more comprehensive DNS record display functionality.

  • Namespace refactoring from IvySample.DnsClient to DnsClientExample across all files
  • Enhanced UI with card-based layouts, better typography, and improved user experience
  • Expanded DNS record rendering with type-specific display logic for A, AAAA, MX, TXT, CNAME, NS, PTR, SRV, and SOA records

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
dnsclient/Utils/DnsValidator.cs Updated namespace declaration
dnsclient/Signals/DnsQueryResultsSignal.cs Updated namespace declaration
dnsclient/README.md Complete rewrite with detailed documentation, features, and deployment instructions
dnsclient/Program.cs Updated namespace import and added custom header with GitHub Codespaces badge
dnsclient/Models/LookupModel.cs Updated namespace declaration
dnsclient/GlobalUsings.cs Updated namespace declaration
dnsclient/Forms/DnsLookupForm.cs Enhanced UI with card layout, improved error handling, and default domain value
dnsclient/DnsClientExample.sln Updated project reference to match new naming
dnsclient/DnsClientExample.csproj Updated root namespace property
dnsclient/Components/DnsQueryResults.cs Major refactor with comprehensive DNS record type rendering and improved layout
dnsclient/Apps/DnsLookUpApp.cs Updated layout to horizontal split view with card-based results display
.devcontainer/dnsclient/devcontainer.json New development container configuration for GitHub Codespaces

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@rorychatt
rorychatt merged commit 32d3a26 into main Oct 10, 2025
63 checks passed
@rorychatt
rorychatt deleted the refactor-dnsclient branch October 10, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants