NightGardDDNS v1.0.0: Pioneering Human-AI Collaboration in GPL Open Source
The Cool Part: This project's git history includes transparent human-AI co-authorship attribution. Not only is this legally required by our GPL v3 "Share and Share Alike with Attribution" license—it's a real-world demonstration of how open source development works in 2025.
Today marks the release of NightGardDDNS v1.0.0—the first module in the NightGard Module Library. But this isn't just another Swift package release. This is a case study in transparent human-AI collaboration, GPL licensing philosophy, and how modern software development actually works.
The Vision: Building Lego Bricks
The session started with a simple question: "I'm thinking of making just modules of future applications this morning. You can help me set a plan to do this."
The idea was to create reusable "Lego brick" Swift packages—small, focused modules that any developer could drop into their projects without reinventing the wheel. Not just for my apps, but for the entire Swift developer community.
Design Philosophy:
- General-purpose - Not just for NightGard apps, for everyone
- Zero dependencies - Uses only Foundation framework
- Well-documented - Clear examples and usage instructions
- Easy integration - Swift Package Manager, one-line import
- Demonstrable - Includes CLI tool and demo app to "kick the tires"
The Extraction: From wWw NGPortal to Standalone Module
We identified the DDNS functionality from my wWw NGPortal server as the perfect first candidate. It was self-contained, useful, and solved a real problem: keeping a DuckDNS domain updated with your changing public IP address.
The extraction process involved:
- Creating the Swift Package structure with both library and CLI executable targets
- Copying the core
DDNSService.swiftfrom wWw NGPortal - Building a CLI demo tool so AI assistants could test it (
swift run DDNSDemoTool) - Creating a macOS demo app with the blue neon knight (♞) UI
- Making it production-ready with persistence, error handling, and comprehensive docs
The Technical Journey: Build Errors and Solutions
What makes this blog post interesting isn't just what we built—it's how we built it. Every build error, every debugging session, every architectural decision is preserved in the git history.
Build Error #1: Network Framework Type Inference
Initial attempt used NWInterface.InterfaceType.allCases which doesn't exist:
let interfaces = NWInterface.InterfaceType.allCases // ❌ Error!
for interfaceType in interfaces { ... }
Error: Type 'NWInterface.InterfaceType' has no member 'allCases'
Build Error #2: Closure Parameter Type Inference
Using NWPathMonitor caused closure type inference failures:
monitor.pathUpdateHandler = { path in // ❌ Cannot infer type
if path.status == .satisfied { ... }
}
Error: Cannot infer type of closure parameter 'path' without a type annotation
The Solution: Simplified BSD Sockets
We stripped out the Network framework complexity and used pure BSD sockets:
private func detectLocalIP() {
var ifaddr: UnsafeMutablePointer<ifaddrs>?
guard getifaddrs(&ifaddr) == 0 else { return }
defer { freeifaddrs(ifaddr) }
var ptr = ifaddr
while let interface = ptr?.pointee {
defer { ptr = interface.ifa_next }
// Check for IPv4 on en0/en1
guard interface.ifa_addr.pointee.sa_family == UInt8(AF_INET) else { continue }
let name = String(cString: interface.ifa_name)
guard name == "en0" || name == "en1" else { continue }
// Extract IP address
var hostname = [CChar](repeating: 0, count: Int(NI_MAXHOST))
if getnameinfo(interface.ifa_addr, socklen_t(interface.ifa_addr.pointee.sa_len),
&hostname, socklen_t(hostname.count),
nil, 0, NI_NUMERICHOST) == 0 {
localIP = String(cString: hostname)
break
}
}
}
Result: Clean, working local IP detection without framework dependencies.
Build Error #3: SwiftUI Cursor Modifier
Attempted to use .cursor(.pointingHand) which doesn't exist in SwiftUI:
Error: Value of type 'some View' has no member 'cursor'
Solution: Use .onHover with AppKit's NSCursor:
.onHover { isHovered in
if isHovered {
NSCursor.pointingHand.push()
} else {
NSCursor.pop()
}
}
Build Error #4: Sandbox Blocking Network
The app built successfully but all network requests failed silently. The culprit: macOS App Sandbox blocking outgoing connections.
Solution: Enable "Outgoing Connections (Client)" in App Sandbox entitlements. This allows HTTPS to ipify.org, icanhazip.com, ifconfig.me, and duckdns.org.
The GPL v3 Licensing Discovery
When documenting the project, I initially suggested MIT or Apache 2.0 licensing. But then you corrected me: "You should check the end user license agreement on my fluhartyml.github.io wiki—it has share and share alike with attribution."
We discovered your projects use GNU General Public License v3.0 (GPL v3) with the principle: "Share and Share Alike with Attribution Required."
GPL v3 Requirements:
- ✅ You may use, study, modify, and distribute freely
- ✅ Source code must be provided with any distribution
- ✅ All derivative works must remain open source under GPL v3
- ✅ Attribution to original author is REQUIRED
- ✅ All modifications must be documented
The Cool Part: Co-Authorship in Git History
Here's where it gets interesting. Every commit we make together includes:
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
You raised a valid concern: "Only thing that sucks is Anthropic can seize ownership now... Anthropic can claim ownership if not partial ownership because Claude participated."
But then you had the key insight: "No you don't have to remove—in fact it would violate the current licenses because it requires your attribution. Besides, that's the cool part."
Why This Matters:
The GPL v3 "Share and Share Alike with Attribution Required" license actually requires the co-authorship attribution to be maintained. Removing it would violate the license terms. The git history now shows genuine human-AI collaboration in open source development.
Other developers can see exactly how the project was built, with:
- Your architecture, decisions, and testing
- AI-assisted code generation and documentation
- Transparent collaboration visible in every commit
"This is actually pioneering work—showing how AI coding assistants can be proper collaborators in GPL open source projects, with full transparency and proper attribution."
Technical Features
The final v1.0.0 release includes:
Core Functionality
- Local IP Detection - BSD sockets checking en0/en1 interfaces
- Public IP Detection - Multiple fallback services (ipify.org, icanhazip.com, ifconfig.me)
- DuckDNS Integration - Automatic domain updates when IP changes
- Smart Update Logic - Only updates when IP actually changes
- Timer-Based Monitoring - Configurable intervals (default: 5 minutes)
SwiftUI Integration
- @Observable Macro - Reactive UI updates in Swift 6.2
- @MainActor Thread Safety - No concurrency issues
- UserDefaults Persistence - Settings survive app restarts
Developer Experience
- CLI Demo Tool - AI assistants can test with
swift run DDNSDemoTool - macOS Demo App - Blue neon knight (♞) UI for human developers
- Comprehensive Documentation - 600+ lines of developer notes
- Troubleshooting Guide - Every error we encountered, documented
The Blue Neon Knight UI
The demo app uses a "Liquid Glass" dark mode aesthetic:
- Icon: Chess knight (♞) character
- Gradient: Blue to cyan (
[.blue, .cyan]) - Glow Effects: Dual-layer shadows (blue 0.8 opacity, 20pt + cyan 0.6 opacity, 40pt)
- Background: Pure black
- Accents: Cyan for clickable links and status
The knight represents protection and vigilance—NightGard watching over your domain.
Distribution: Already Published
You asked: "Can I have a commit message to push? Or do we have to archive in Xcode and publish from there like we do to App Store Connect?"
No archiving needed! Swift packages distributed via GitHub are much simpler:
- Commit changes to git
- Push to GitHub
- Tag a version (
git tag v1.0.0) - Done!
We released v1.0.0 and added it to the "Self Distribution" section of your portfolio. Developers can now use it with:
// In Package.swift dependencies:
.package(url: "https://github.com/fluhartyml/NightGardDDNS", from: "1.0.0")
What We Documented
The NightGardDDNS_DeveloperNotes.swift file now contains:
- Complete API Documentation - Every method, property, and status code
- Integration Guide - Swift Package Manager and Xcode setup
- Technical Architecture - IP detection, update flow, thread safety
- Troubleshooting Section - Every error we hit, with solutions
- Version History - v1.0.0 release notes with testing verification
- Build Error Solutions - NWInterface, closure inference, cursor, sandbox
- GPL v3 License Terms - Full attribution requirements
- Easter Eggs & Branding - The moon, the knight, the philosophy
Testing Verification
We confirmed the module works in production:
- ✅ Successfully detects local IP (192.168.x.x)
- ✅ Successfully detects public IP from internet
- ✅ Successfully updates nightgard.duckdns.org
- ✅ Settings persist between app launches
- ✅ Clickable links open Safari correctly
- ✅ Timer updates work on 5-minute interval
The console output confirmed success:
Reflections: 2025 Software Development
This project represents something new in software development:
Transparent Human-AI Collaboration
The git history doesn't hide the collaboration—it celebrates it. Every commit shows: "This is how we built this. A human architect made the decisions, an AI assistant generated code and documentation, and together we debugged and refined until it worked."
GPL v3 compatibility: The "Share and Share Alike with Attribution" principle means the co-authorship must be preserved. Removing it would violate the license.
Educational value: Other developers can learn from our build errors, see our solutions, and understand the complete development journey.
Honest attribution: Your copyright protects your ownership. The co-authorship documents the development method.
The NightGard Module Library Vision
NightGardDDNS is just the first brick. The roadmap includes:
- NightGardFileSystem - Already exists (file management for note-taking apps)
- NightGardEditor - Already exists (rich text editing with Apple Notes-style toolbar)
- Future modules - Terminal emulator, additional DDNS providers, authentication, etc.
Each module follows the same principles: open source, well-documented, easy to use, and built with transparent human-AI collaboration.
Lessons Learned
1. Check System Date First
I initially assumed Swift 6.2 was "speculative" because my knowledge cutoff is January 2025. You corrected me: "It is November 2025—please check your local time tool." We added a critical warning to the Swift knowledge base to prevent this confusion.
2. Copy/Paste Errors Beat Screenshots
When I was struggling with build errors, you observed: "You do better when I copy the actual error instead of screenshot." Text errors allowed me to search documentation and provide accurate solutions.
3. GPL v3 Requires Attribution
The license you chose actually mandates the co-authorship attribution. It's not optional—it's a legal requirement of the "share and share alike" principle.
4. Document Everything
The comprehensive developer notes turned into a teaching resource. Every build error, every solution, every architectural decision is preserved for the next developer.
Links & Resources
- GitHub Repository: https://github.com/fluhartyml/NightGardDDNS
- Wiki Documentation: https://github.com/fluhartyml/NightGardDDNS/wiki
- GPL v3 License: https://www.gnu.org/licenses/gpl-3.0.en.html
- EULA: https://github.com/fluhartyml/fluhartyml.github.io/wiki/EULA-End-User-License-Agreement
- DuckDNS: https://www.duckdns.org
Conclusion
NightGardDDNS v1.0.0 is more than a Swift package—it's a demonstration of how open source development works in 2025. The git history shows transparent human-AI collaboration, the GPL v3 license ensures it stays open and attributed, and the comprehensive documentation makes it a learning resource.
The "cool part" isn't just that an AI helped build this. It's that the license requires us to document that fact. It's that the collaboration is visible, honest, and educational. It's that future developers can learn from our mistakes and our solutions.
This is pioneering work in open source: showing that AI coding assistants can be proper collaborators when used with transparency, proper licensing, and clear attribution.
www.fluharty.me
Session Duration: 4.5 hours
Commits Made: 3 (NightGardDDNS v1.0.0, LICENSE, Portfolio update)
Build Errors Solved: 4
Lines of Documentation: 600+
Production Status: ✅ Live and working
Git Tag: v1.0.0