Big-Link-Man/docs/technical-debt.md

75 lines
2.1 KiB
Markdown

# Technical Debt & Future Enhancements
This document tracks technical debt, future enhancements, and features that were deferred from the MVP.
---
## Story 1.6: Deployment Infrastructure Management
### Domain Health Check / Verification Status
**Priority**: Medium
**Epic Suggestion**: Epic 4 (Deployment) or Epic 3 (Pre-deployment)
**Estimated Effort**: Small (1-2 days)
#### Problem
After importing or provisioning sites, there's no way to verify:
- Domain ownership is still valid (user didn't let domain expire)
- DNS configuration is correct and pointing to bunny.net
- Custom domain is actually serving content
- SSL certificates are valid
With 50+ domains, manual checking is impractical.
#### Proposed Solution
**Option 1: Active Health Check**
1. Create a health check file in each Storage Zone (e.g., `.health-check.txt`)
2. Periodically attempt to fetch it via the custom domain
3. Record results in database
**Option 2: Use bunny.net API**
- Check if bunny.net exposes domain verification status via API
- Query verification status for each custom hostname
**Database Changes**
Add `health_status` field to `SiteDeployment` table:
- `unknown` - Not yet checked
- `healthy` - Domain resolving and serving content
- `dns_failure` - Cannot resolve domain
- `ssl_error` - Certificate issues
- `unreachable` - Domain not responding
- `expired` - Likely domain ownership lost
Add `last_health_check` timestamp field.
**CLI Commands**
```bash
# Check single domain
check-site-health --domain www.example.com
# Check all domains
check-all-sites-health
# List unhealthy sites
list-sites --status unhealthy
```
**Use Cases**
- Automated monitoring to detect when domains expire
- Pre-deployment validation before pushing new content
- Dashboard showing health of entire portfolio
- Alert system for broken domains
#### Impact
- Prevents wasted effort deploying to expired domains
- Early detection of DNS/SSL issues
- Better operational visibility across large domain portfolios
---
## Future Sections
Add new technical debt items below as they're identified during development.