3.**Performance is Already Good**: JSON file loading takes <10ms, which is acceptable
4.**Hot Reload**: In development, we want fresh data on every request for testing
5.**YAGNI**: We don't need caching until we have evidence of performance issues
### Consequences
- Simple, maintainable code
- No cache invalidation bugs
- Slightly higher disk I/O (negligible for this scale)
- If traffic increases significantly, this decision can be revisited
---
## ADR-002: Static Dates Instead of Git Integration
**Status:** Accepted
**Date:** 2025-11-30
### Context
Previously, the project had a feature to dynamically fetch project start dates from git repository first commit dates using `exec.CommandContext` to run `git log` commands.
### Decision
**Git command execution has been removed. Use static dates in JSON files instead.**
As the CV site evolved to support multiple languages and increased usage, the original decision (ADR-001) to avoid caching was reconsidered. While the site traffic remains modest, the benefits of eliminating per-request file I/O became clear:
1.**Consistency**: Every request reads the same data
2.**Performance**: Eliminates disk I/O from hot paths
3.**Reliability**: Fail-fast at startup catches data errors early
4.**Simplicity**: No cache invalidation needed (data is static)
### Decision
**Implement application-level data caching with startup-time loading.**
The `internal/cache` package provides:
-`DataCache` struct holding CV and UI data for all supported languages
HTMX (1.9.10) and Hyperscript (0.9.14) were loaded from the unpkg.com CDN. This introduced a single point of failure — if unpkg goes down, the site loses all interactivity. Additionally, each CDN request adds DNS resolution, TLS negotiation, and potential redirect overhead. HTMX 1.9.10 was also two major versions behind the current 2.0.10 release.
### Decision
**Self-host HTMX and Hyperscript as vendored files. Remove unpkg.com from the Content Security Policy.**
1.**No external SPOF**: The site functions fully even if all CDNs are down
2.**Faster loading**: Same-origin assets skip DNS lookup and TLS handshake
3.**Smaller CSP surface**: `unpkg.com` removed from `script-src` whitelist
4.**Version upgrade**: HTMX 1.9.10 → 2.0.10 with zero breaking changes (all `hx-*` attributes are compatible; `hx-head` moved from extension to built-in)
5.**Cache alignment**: Libraries cached alongside the site's own assets
### Consequences
- **Positive:**
- Zero dependency on unpkg.com availability
- Reduced CSP attack surface
- HTMX 2.0 features available (built-in head support)
- Faster page loads (no cross-origin requests for core libs)
- **Considerations:**
- Version updates require manually downloading new files
- Must track current versions in documentation
- File sizes add ~223KB to the repository (acceptable trade-off)
### Documentation
See [02-MODERN-WEB-TECHNIQUES.md](02-MODERN-WEB-TECHNIQUES.md) Phase 11 for implementation details.