Commit Graph

41 Commits

Author SHA1 Message Date
juanatsap ae430e6ea7 feat: Implement comprehensive AI-era SEO optimizations
- Add llms.txt file for AI crawlers (llmstxt.org standard)
- Enhance robots.txt with 15+ AI bot rules (GPTBot, ClaudeBot, etc.)
- Expand JSON-LD structured data from 1 to 12+ schema blocks:
  - Person (enhanced with occupations, languages, employers)
  - WebSite, BreadcrumbList, ProfilePage
  - EducationalOccupationalCredential (dynamic per education)
  - Course (dynamic per certification)
- Create doc/15-SEO.md with comprehensive SEO documentation
- Update MODERN-WEB-TECHNIQUES.md with SEO section (techniques 11-13)

Based on WPBeginner 2025 SEO recommendations for AI Overviews,
structured data, and E-E-A-T signals.
2025-11-30 13:23:22 +00:00
juanatsap 95de841e14 feat: Add CSS bundling with Lightning CSS for production optimization
- Add Lightning CSS integration for CSS bundling and minification
- Create Makefile targets: css-dev, css-prod, css-watch, css-clean
- Implement conditional CSS loading based on GO_ENV (dev=modular, prod=bundled)
- Add IsProduction template variable for environment-aware rendering
- Keep print.css separate with media="print" for PDF export
- Add static/dist/ to .gitignore (generated bundles)
- Fix Go template syntax in _cv-header.css
- Remove redundant font @import in _typography.css

Performance gains:
- 27 HTTP requests → 1 (96% reduction)
- 188KB → 86KB CSS (54% reduction)
- ~15KB gzip network transfer

Documentation:
- Update 12-CSS-ARCHITECTURE.md with bundling section
- Add Phase 9 to 2-MODERN-WEB-TECHNIQUES.md
- Add css-bundling.test.mjs Playwright test (8/8 pass)
2025-11-30 12:32:46 +00:00
juanatsap eb92f64e93 fix: Mobile hamburger menu and iPad sidebar visibility
Mobile fixes:
- Add click toggle handler for hamburger menu (was hover-only)
- Menu now opens/closes on tap and closes when clicking outside
- Keep hover support for desktop

iPad fixes:
- Sidebar content now visible on touch devices (901-1280px)
- Added (hover: hover) media query to prevent hide-on-hover on tablets

Security improvements:
- Replace exec.CommandContext with go-git library for git operations
- Add path traversal and command injection prevention
- Fix race condition in template hot reload
- Add environment-based cookie Secure flag

Code quality:
- Add constants.go for magic numbers
- Remove unused code (ParsePreferenceToggleRequest, DomainError)
- Add FOUC prevention with inline critical CSS
- Add Makefile dev/run/clean targets
- Fix README git clone URL
- Add doc/DECISIONS.md for architectural decisions

Tests:
- Add hamburger menu click toggle tests
- Add iPad sidebar visibility tests
- Update security tests for go-git implementation
- Add cookie Secure flag tests
2025-11-30 09:29:35 +00:00
juanatsap 60c1b5ac2b docs: Update HYPERSCRIPT-RULES.md with new functions and reserved words
- Add 6 new utility functions (closeOnBackdrop, scrollToTop, etc.)
- Add 10 zoom functions including drag handlers
- Document hyperscript reserved words (target, me, it, event)
- Add example showing the 'target' parameter pitfall
- Update file organization descriptions
- Add Phase 2 refactoring details to recent changes
2025-11-30 07:10:33 +00:00
juanatsap ba44b435e7 refactor: Major hyperscript refactoring and JS elimination
Inline Hyperscript Refactoring:
- Body tag keyboard handlers: 20→8 lines (using helper functions)
- Zoom control handlers: 85→35 lines (using zoom._hs)
- PDF modal card selection: 90→6 lines (3 identical blocks eliminated)

New Hyperscript Files:
- zoom._hs: handleZoomInput, handleZoomReset, initZoomControl
- pdf-modal._hs: selectPdfCard, handlePdfCardKey

JavaScript Elimination (232 lines removed):
- cv-functions.js: REMOVED - hyperscript defs are globally available
- scroll-at-bottom-handler.js: REMOVED - duplicate of handleScroll()
- footer-buttons-interaction.js: REMOVED - moved to hyperscript

Added Tests:
- 32-hyperscript-multi-src.test.mjs: Verifies multi-file loading
- 33-keyboard-shortcuts-refactored.test.mjs: Keyboard shortcuts
- 34-hyperscript-refactor-comprehensive.test.mjs: Full test suite

Key Findings:
- No hyperscript multi-file bug in 0.9.14
- Hyperscript def statements are globally accessible
- Previous refactoring failures were syntax errors, not library bugs
2025-11-30 05:58:44 +00:00
juanatsap c23068508f docs: Add comprehensive documentation for architectural enhancements
Created detailed documentation for all 5 architectural improvements:

Educational Documentation (_go-learning/):
- Created 005-architectural-enhancements.md (900+ lines)
- Detailed explanation of each enhancement
- Code examples and usage patterns
- Before/after comparisons
- Benefits and interview talking points
- Future considerations

Public Documentation (doc/):
- Updated 14-BACKEND-HANDLERS.md
- Added "Architectural Enhancements" section
- Response Types with examples
- Validation Tags guide
- Context Helpers usage
- Typed Errors documentation
- Performance Benchmarks guide
- Updated table of contents
- Updated changelog

Documentation Coverage:
- Response Types: Structure, helpers, usage examples
- Validation Tags: Declarative rules, self-documenting
- Context Helpers: 13 functions documented
- Typed Errors: 13 error codes, constructors, usage
- Benchmarks: 23 benchmarks, running instructions

All improvements now fully documented for:
- Internal learning and interviews
- Public consumption and contribution
- Developer onboarding
- Architecture understanding
2025-11-20 18:24:41 +00:00
juanatsap 025c10ac1f docs: Add comprehensive backend handler documentation
Create public-facing documentation explaining backend architecture:

New Documentation:
- doc/14-BACKEND-HANDLERS.md (900+ lines)
  * Handler architecture and file organization
  * Request/response type system with examples
  * Middleware pattern and preferences handling
  * Comprehensive testing strategy
  * Data flow diagrams and best practices
  * Code examples for all major patterns

Updated:
- doc/README.md
  * Add Backend Handlers to technical implementation section
  * Update total active docs count (13 → 14)
  * Add quick navigation links

Content Coverage:
- Handler responsibilities (pages, PDF, HTMX)
- Type-safe request handling with validation
- Middleware architecture and context usage
- Test coverage across all handler types
- Request processing flow diagrams
- Best practices with do/don't examples

Audience:
- Backend developers
- API consumers
- New contributors
- Technical documentation readers

Complements:
- Educational docs in _go-learning/refactorings/
- Internal architecture documentation
- API reference guide
2025-11-20 17:35:58 +00:00
juanatsap 68da6607ad docs: Add Phase 10 UI polish documentation and improve PDF modal spacing
- Document PDF loading modal with animated spinner and time estimates
- Document soft shadow optimization process (3 iterations to 0.06 opacity)
- Document border removal strategy for clean, modern design
- Document enhanced server startup logs with emoji icons
- Improve PDF modal estimate text spacing (1.5rem top margin)
- Update technique count from 10+ to 16+ major optimizations
- Mark Phase 10 as complete (November 2025)
2025-11-20 17:05:27 +00:00
juanatsap 9c5f0b20d8 docs: Add comprehensive toast notification test and documentation
Test Addition:
- Created tests/mjs/29-pdf-toast-notifications.test.mjs (22 assertions)
- Validates toast elements, JavaScript API, animations
- Tests both PDF download scenarios (modal stays open vs. closes early)
- Verifies toast lifecycle: prepare → progress → success → dismiss
- Tests icon/title/message updates and progress bar animation

Test Coverage:
 Toast DOM elements exist
 JavaScript functions available (showPDFToast, hidePDFToast)
 Manual toast trigger and auto-hide
 PDF modal integration - Scenario A (stay in modal)
 PDF modal integration - Scenario B (close modal, toast appears)
 Toast content updates (📥)
 Progress bar animation
 CSS animations defined (toastSlideIn, toastLifecycle, progressShrink)

Documentation Addition:
- Created doc/13-TOAST-NOTIFICATIONS.md (comprehensive guide)
- Architecture and component structure
- User experience flows (2 scenarios documented)
- JavaScript API reference (showPDFToast, hidePDFToast, showError)
- CSS structure and animations
- Template structure with ARIA accessibility
- PDF download integration details
- Accessibility features and testing guide
- Customization guide and troubleshooting

Documentation Updates:
- Updated doc/README.md (added entry #13, total: 12 → 13 docs)
- Updated tests/README.md (test count: 27 → 28)
- Updated tests/TEST-SUMMARY.md (added toast notifications coverage)
- Updated tests/mjs/README.md (added test 29 description)

Test Count: 28 active tests
Doc Count: 13 core documents
Coverage: Complete UX feedback system with dual-mode operation
2025-11-20 13:05:46 +00:00
juanatsap 16194328b6 docs+tests: Document and test references section shortcut URLs
## Documentation Updates (doc/11-PDF-EXPORT.md)
Added "References Section Integration" section with:
- Template code examples for shortcut URL usage
- Data configuration structure
- Key features and use cases
- Security attributes documentation
- Test command reference

## Test Updates (tests/mjs/28-references-pdf-download.test.mjs)
Completely rewrote test to match new direct link behavior:
-  OLD: Tested modal opening, onclick handlers
-  NEW: Tests direct shortcut URLs

New test coverage (5 tests):
1. English direct shortcut URL validation
2. Spanish direct shortcut URL validation
3. HTTP 301 redirect verification
4. Year validation (404 for invalid years)
5. Works without JavaScript (PDF export context)

Verifies:
- Correct href: /cv-jamr-{year}-{lang}.pdf
- No onclick handlers (pure HTML link)
- Security attributes (target="_blank", rel="noopener noreferrer")
- Year-aware dynamic URLs
- Language-aware (es/en)
- Backend 301 redirects working
- 404 for past/future years

## Benefits
- Comprehensive test coverage for new behavior
- Complete documentation with examples
- Easy to maintain and understand
- Validates entire shortcut URL feature end-to-end
2025-11-20 12:43:29 +00:00
juanatsap 1569a81eed docs: Archive obsolete documentation and update README index
## Archived Documentation
- Removed BEFORE-AFTER-COMPARISON.md (skeleton loader redesign - feature complete)
- Removed BROWSER-TESTING-GUIDE.md (HTMX indicators testing - feature complete)

## Updated Documentation Index
- Added CSS Architecture (doc 12) to technical implementation section
- Added PDF Export (doc 11) to user & operations section
- Updated last modified date: 2025-11-18 → 2025-11-20
- Updated total active docs count: 11
2025-11-20 12:36:27 +00:00
juanatsap 1258d61d05 refactor: Modularize CSS into ITCSS architecture + update documentation
CSS Refactoring:
- Split 2,287-line monolith into 6 focused modules
- New structure: Navigation, Scroll, Buttons, Modals, Zoom, Breakpoints
- Organized by ITCSS layers (Interactive + Responsive)
- 245 lines saved through better organization
- Site verified working at localhost:1999

New CSS Files:
- 04-interactive/_navigation.css (357 lines, 8.2KB)
- 04-interactive/_scroll-behavior.css (200 lines, 5.0KB)
- 04-interactive/_buttons.css (184 lines, 4.7KB)
- 04-interactive/_modals.css (487 lines, 16KB)
- 04-interactive/_zoom-control.css (253 lines, 6.3KB)
- 05-responsive/_breakpoints.css (561 lines, 14KB)

Documentation Updates:
- Added doc/12-CSS-ARCHITECTURE.md (comprehensive CSS guide)
- Updated doc/README.md (new entry + correct numbering)
- Updated tests/README.md (test count 8 → 27)
- Updated tests/TEST-SUMMARY.md (coverage expansion)
- Rewrote tests/mjs/README.md (complete test listing)

Removed:
- static/css/04-interactive/_remaining.css (replaced by modules)
2025-11-20 12:34:42 +00:00
juanatsap d93e37ddc9 docs: Merge LONG-PDF-GENERATION.md into comprehensive PDF documentation
## Merged Content
- Merged LONG-PDF-GENERATION.md technical details into doc/11-PDF-EXPORT.md
- Removed duplicate documentation file
- Single source of truth for all PDF export documentation

## Added Technical Details
- PDF generation flow diagram
- 2-column vs 3-column layout architecture decision
- Sidebar width configuration guide (18%-30% analysis)
- Detailed CSS injection strategy with code examples
- HTML structure examples for page layouts
- Expanded compact sidebar fonts implementation details
- Font size breakdown table (2-6% reduction)

## Result
- Comprehensive PDF documentation: 966 lines (was 793)
- Added 173 lines of technical implementation details
- Removed 411-line duplicate file
- Better organized, single reference for developers and users

Benefits:
- Single source of truth for PDF features
- No duplication between docs
- Easier maintenance
- Complete technical and user-facing documentation in one place
2025-11-20 12:31:28 +00:00
juanatsap 9f3b8853a3 docs: Cleanup and consolidate PDF documentation
## Documentation Cleanup
- Moved PDF-EXPORT-FEATURE.md → doc/11-PDF-EXPORT.md
- Added shortcut URL documentation section
- Updated changelog to v2.1.0 with shortcut URL feature
- Removed ephemeral reports (validation, shortcut implementation)

## Removed Backup Files
- Deleted static/css/main.css.backup
- Deleted static/js/main.js.backup

## Consolidated PDF Documentation
The comprehensive PDF export documentation now includes:
- Year-aware shortcut URLs (/cv-jamr-{year}-{lang}.pdf)
- Automatic year validation and updates
- Default CV modal integration
- All PDF export options and features
- Complete API reference

Benefits:
- Single source of truth for PDF feature documentation
- Removed temporary/ephemeral documentation files
- Cleaner repository structure
- Updated versioning to 2.1.0
2025-11-20 12:25:41 +00:00
juanatsap b44f9b9a99 refactor: Rename 'extended' → 'long' + add compact sidebar fonts
BREAKING CHANGE: API parameter renamed from 'extended' to 'long'

## Breaking Change: Terminology Standardization

Renamed 'extended' to 'long' across entire codebase for consistency:

**Backend (Go):**
- internal/handlers/cv.go (7 locations)
  - Migration logic to auto-convert 'extended' → 'long' cookies
  - API validation now rejects 'extended', requires 'long'
  - Toggle state logic updated
- internal/handlers/pdf_test.go (17 occurrences)
  - Test function renamed: TestExportPDF_ExtendedWithSkills → TestExportPDF_LongWithSkills
  - All test cases, parameters, and expected filenames updated
- internal/pdf/generator.go (2 comment updates)

**Frontend:**
- PDF-EXPORT-FEATURE.md (3 occurrences)
- doc/3-API.md (parameter documentation)
- doc/7-CUSTOMIZATION.md (examples updated)
- templates/partials/modals/pdf-modal.html (button text, URLs)
- static/js/main.js (migration logic)
- static/hyperscript/toggles._hs (toggle logic)
- tests/mjs/24-pdf-download-params.test.mjs (test expectations)
- tests/mjs/test-preference-migration.test.mjs (NEW)
- tests/mjs/verify-migration.test.mjs (NEW)

**PDFs Renamed:**
- cv-extended-with_skills-jamr-2025-en.pdf → cv-long-with_skills-jamr-2025-en.pdf
- cv-extended-with_skills-jamr-2025-es.pdf → cv-long-with_skills-jamr-2025-es.pdf

**Migration:** Automatic cookie migration from 'extended' → 'long' for seamless UX

## New Feature: Compact Sidebar Fonts

Reduces page count for short CV with skills from 6 → 5 pages:

**Implementation:**
- Location: internal/pdf/generator.go (lines 154-215)
- Cookie detection: `cookies["cv-length"] == "short"`
- Font reduction: 2-6% (0.94-0.98em) - very subtle
- Only activates for: `length=short` + `version=with_skills`
- Long version: Always uses full-size fonts

**Impact:**
- Page count: 6 pages → 5 pages (16.7% reduction)
- Readability: Maintained - fonts remain professional
- Design philosophy: Subtle, natural content flow

**Testing:**
- New test: TestPDFGenerator_CompactSidebarFonts
- Comprehensive coverage of cookie detection and PDF generation
- Manual verification: 5-page PDF with compact but readable fonts

**Documentation:**
- doc/LONG-PDF-GENERATION.md (NEW, 13 KB)
  - Complete feature documentation
  - Implementation details with code examples
  - Font size breakdown table
  - Testing and troubleshooting guides
  - Compact sidebar fonts section (comprehensive)

**Files Changed:**
- 11 modified (backend + frontend + docs)
- 5 new files (2 PDFs, 1 doc, 2 tests)
- 2 files renamed (PDFs)

**Tests:** All Go tests passing, API validation verified, PDF generation tested
2025-11-20 11:21:43 +00:00
juanatsap 925a95c1b4 refactor: externalize navigation handlers and fix hyperscript syntax errors
- Created keyboard._hs as reference documentation (inline handler in body tag)
- Externalized 9 hamburger menu navigation links to scrollToSection()
- Added scrollToSection() as JavaScript function (CSP-safe, no eval needed)
- Restored original keyboard handler format in body tag (working correctly)
- Removed problematic navigation._hs (had syntax/CSP issues)
- Added Rule 4 to HYPERSCRIPT-RULES.md on event handler externalization
- Updated PROJECT-MEMORY.md with externalization guidelines

Key learnings:
- Complex event handlers that inspect event properties must stay inline
- JavaScript functions avoid CSP unsafe-eval restrictions
- Navigation successfully externalized: 9 links → 1 function (91% reduction)
2025-11-20 09:46:06 +00:00
juanatsap f8948413bc docs: add comprehensive user-oriented PDF export guide
Add detailed, user-friendly documentation for PDF export feature in
CUSTOMIZATION.md to help template users understand and customize
PDF generation.

New Documentation:
- Clear explanation of how PDF export works
- All 4 parameters (lang, length, icons, version) with examples
- Filename convention and patterns
- Frontend integration examples (HTML, HTMX)
- Tips for best PDF results
- Troubleshooting common issues
- Advanced customization guidance

Audience:
- Template users who want to customize their own CV
- Non-technical users who need to understand PDF options
- Developers who want to extend PDF functionality

Examples include:
- Complete URL patterns for all parameter combinations
- Code snippets for frontend buttons
- CSS customizations for print appearance
- Common troubleshooting solutions
2025-11-19 10:56:01 +00:00
juanatsap 12bd9c7cd8 feat: enhance PDF export with 4 customizable parameters
Add comprehensive parameter support to /export/pdf endpoint:
- lang: Language selection (en/es)
- length: CV length (short/long)
- icons: Icon visibility (show/hide)
- version: Theme variant (extended/clean)

Backend Changes:
- Enhanced PDF generator with cookie injection for user preferences
- Cookies set before chromedp navigation to apply all preferences
- Updated filename pattern: CV-{Name}-{lang}-{length}-{version}.pdf
- Comprehensive parameter validation with descriptive error messages
- All parameters optional with sensible defaults (en, short, show, extended)

Testing:
- Added pdf_test.go with parameter validation tests
- Tests cover all valid/invalid parameter combinations
- Tests verify default parameter application

Documentation:
- Updated API documentation (doc/3-API.md)
- Added detailed parameter descriptions and examples
- Updated quick reference with all parameter options
- Added process flow diagram showing cookie injection
- Documented error responses for each invalid parameter

Implementation Details:
- Cookie domain set to "localhost" for chromedp context
- Cookies: cv-language, cv-length, cv-icons, cv-theme
- PDF generation leverages existing @media print CSS
- No changes to frontend CSS or templates

Tested:
- Parameter validation ( All invalid params rejected correctly)
- Default parameters ( Applied when params omitted)
- PDF generation with all parameter combinations ( Working)
2025-11-19 10:43:19 +00:00
juanatsap 2ca13a218e feat: Extend skeleton loaders to all 13 CV sections with structural fidelity
Implemented comprehensive skeleton loaders for the entire CV curriculum,
providing smooth loading animations during language transitions across
all sections.

**Sections Implemented (13 total):**
- Header (title-badges + personal info)
- Education
- Skills Summary
- Experience (with company logos, descriptions, responsibilities)
- Awards (with logos, issuers, descriptions)
- Projects (with icons, descriptions, tech stacks)
- Courses (with icons, institutions, dates)
- Languages
- References
- Other Information
- Skills Sidebars (left and right)
- Footer

**Key Features:**
- Structural fidelity: Skeletons mirror exact HTML structure of actual content
- Each section has realistic placeholders (e.g., 3 experience items, 2 projects)
- Smooth CSS transitions with shimmer animations
- Zero layout shift
- Component-level architecture allows independent loading states

**Technical Implementation:**
- Modified all section templates in templates/partials/sections/
- Added .component-wrapper with .actual-content + .skeleton-content structure
- Extended skeleton.css with structural skeleton classes
- JavaScript event handlers in main.js already handle all sections via CSS cascade

**Testing:**
- Manual Playwright test: 13/13 component wrappers verified
- Automated test: 7/7 tests passing
- All skeleton loaders show during language switches
- No stuck loading states

**Documentation:**
- Updated tests/TEST-SUMMARY.md with all 13 sections
- Updated doc/2-MODERN-WEB-TECHNIQUES.md with comprehensive details
- Added structural fidelity table showing skeleton elements for each section

Files modified: 14 templates + CSS + 2 docs
2025-11-18 20:18:28 +00:00
juanatsap 1f6f8e417e docs: Update skeleton loader implementation from hyperscript to JavaScript
MIGRATION SUMMARY:
- Moved skeleton loader logic from hyperscript to JavaScript (main.js)
- Changed from htmx:oobAfterSwap to htmx:afterSettle event
- Changed OOB swap from innerHTML to outerHTML for proper element replacement
- Added languageSwitching flag for state tracking
- Added 100ms delay after afterSettle for final render completion

DOCUMENTATION UPDATES:
- 2-MODERN-WEB-TECHNIQUES.md: Updated skeleton loader section with
2025-11-18 19:32:28 +00:00
juanatsap 65eb91b00b docs: Rename 0-README.md to README.md (standard convention)
Keep README.md as the standard filename for better GitHub integration
and platform recognition. All other docs remain numbered (1-10).
2025-11-18 19:28:40 +00:00
juanatsap 3fa5d1e5ca docs: Rename all documentation with numbered prefixes for clarity
RENAMING:
- README.md → 0-README.md (start here)
- ARCHITECTURE.md → 1-ARCHITECTURE.md (backend overview)
- MODERN-WEB-TECHNIQUES.md → 2-MODERN-WEB-TECHNIQUES.md (frontend architecture)
- API.md → 3-API.md (API reference)
- HYPERSCRIPT-RULES.md → 4-HYPERSCRIPT-RULES.md (conventions)
- ZOOM_IMPLEMENTATION.md → 5-ZOOM-IMPLEMENTATION.md (zoom feature)
- USER_GUIDE.md → 6-USER-GUIDE.md (user docs)
- CUSTOMIZATION.md → 7-CUSTOMIZATION.md (customization guide)
- DEPLOYMENT.md → 8-DEPLOYMENT.md (deployment)
- SECURITY.md → 9-SECURITY.md (security)
- PRIVACY.md → 10-PRIVACY.md (privacy policy)

CROSS-REFERENCE UPDATES:
- Updated all internal links in all documentation files
- Updated README navigation with numbered references
- Added # column to documentation tables
- Made all links use numbered filenames

BENEFITS:
 Clear reading order (0-10)
 Logical progression (overview → technical → user → ops → compliance)
 Easy sorting and navigation
 Professional organization
 Zero broken links
2025-11-18 19:12:50 +00:00
juanatsap 81e8b3c25e docs: Clean up documentation directory - eliminate redundancy
CLEANUP SUMMARY:
- Moved to archive: 3 files (historical/debugging docs)
  - ZOOM-CONTROL-FIX-REPORT.md
  - ZOOM-FIXES-COMPLETE-SUMMARY.md
  - PROJECT_IMPROVEMENT_SUMMARY.md.ASPIRATIONAL → PROJECT_IMPROVEMENT_SUMMARY.md

- Deleted: 1 file (duplicate content)
  - COLOR-THEME-IMPLEMENTATION.md (content already in MODERN-WEB-TECHNIQUES.md)

- Created: 1 file (navigation index)
  - README.md with complete documentation navigation

RESULT:
- Before: 14 files (403 lines redundant)
- After: 11 files (clean, organized, zero redundancy)
- Archive: 20 files (properly categorized historical docs)

BENEFITS:
- Zero documentation duplication
- Clear navigation structure
- Canonical source for each topic
- Historical docs preserved in archive
2025-11-18 18:59:41 +00:00
juanatsap 8745a3661e docs: Phase 3 Complete - Strategic Documentation (ADRs, Budgets, Scalability, Debt, Migrations)
- Add 5 Architectural Decision Records (ADRs)
  - ADR-001: Hypermedia-Driven Architecture with HTMX
  - ADR-002: Hyperscript for Declarative Behaviors
  - ADR-003: CSS Custom Properties for Theming
  - ADR-004: Component-Level Skeleton Loaders
  - ADR-005: Modular File Organization Pattern

- Add Performance Budgets table (12 metrics)
  - Core Web Vitals targets (FCP <1.8s, LCP <2.5s, CLS <0.1)
  - Bundle size budgets (JS <30KB, CSS <50KB)
  - Monitoring and enforcement strategy

- Add Scalability Guidance
  - 4-level horizontal scaling strategy (single server → 1M users)
  - Caching layer architecture (browser → CDN → app → origin)
  - HTMX-specific scaling considerations

- Add Technical Debt Inventory
  - 8 prioritized debt items (High/Medium/Low)
  - 17 days total estimated effort
  - Categorized by impact and solutions

- Add Migration Paths (5 scenarios)
  - HTMX → Alpine.js → React (framework migration)
  - Adding build tooling (Vite/esbuild)
  - Static → Dynamic content (CMS integration)
  - Monolith → Microservices
  - Self-hosted → Serverless (Cloudflare Workers/Lambda)

Total: 468 lines of strategic planning documentation
Grade: Documentation now A- (95% accuracy)
2025-11-18 17:24:38 +00:00
juanatsap 1a6467a43a docs: Phase 2 Complete - HTMX Patterns Enhancement & Hover Sync
FINAL PHASE 2 ADDITIONS:

### HTMX Patterns Section Enhancement (lines 558-689)
Added advanced production patterns used in the project:

1. **Advanced Swap Timing**
   - swap:250ms settle:250ms modifiers
   - Coordinated fade-out/fade-in transitions
   - Use cases: language switching, skeleton loaders

2. **Out-of-Band Swaps (Multi-Target Updates)**
   - Problem statement and solution
   - Complete code examples (main + OOB targets)
   - Real example from language switching
   - Benefits: Single round-trip, atomic updates
   - Key Points: ID matching, DOM transaction atomicity

3. **History Management (hx-push-url)**
   - SPA-like navigation patterns
   - Shareable URLs for dynamic content
   - Back/forward button support
   - Real example: /?lang=es URLs

4. **Loading States Reference**
   - External indicator pattern
   - Cross-reference to Section 10
   - Opacity transitions instead of display toggle

LINES ADDED: 131 lines comprehensive HTMX patterns

### Hover Synchronization Pattern (lines 1164-1279)
JavaScript wrapper → Hyperscript call bridge pattern

**Complete Documentation:**
- Problem: Duplicate buttons (PDF/Print/Zoom) need sync hover
- Challenge: JavaScript events can't directly call hyperscript
- Solution: Wrapper function bridge pattern

**Architecture Layers:**
1. JavaScript layer (main.js)
   - mouseenter/mouseleave event listeners
   - Calls hyperscript functions as bridge

2. Hyperscript layer (hover-sync._hs)
   - syncPdfHover(show), syncPrintHover(show)
   - highlightZoomControl(show)
   - Class manipulation logic

3. CSS layer
   - .pdf-hover-sync, .print-hover-sync classes
   - Visual feedback with transforms

**Step-by-Step Flow:**
- 8-step detailed breakdown
- User action → JS event → Hyperscript logic → CSS transition
- Complete cycle from mouseenter to mouseleave

**Benefits:**
- Visual coherence across UI components
- No refresh needed (pure CSS)
- JavaScript-Hyperscript paradigm bridge
- Performance optimized (class toggling)

LINES ADDED: 115 lines comprehensive hover sync documentation

---

PHASE 2 SUMMARY:
- Section 11: Skeleton Loaders (127 lines)
- Section 12: Color Theme System (173 lines)
- HTMX Patterns Enhancement (131 lines)
- Hover Synchronization Pattern (115 lines)

TOTAL PHASE 2: 546 lines comprehensive documentation
QUALITY: Production-ready reference with real examples
TESTING: All patterns verified with automated tests

PHASE 2 STATUS: 100% COMPLETE 
2025-11-18 17:14:11 +00:00
juanatsap 0e33d7c886 docs: Phase 2 - Add Skeleton Loaders and Color Theme System sections
MAJOR FEATURES DOCUMENTED:

### Section 11: Skeleton Loaders (lines 1638-1764)
Component-level content placeholders for smooth loading transitions

KEY FEATURES:
- Pixel-perfect skeleton matching (header, photo, sections, experience)
- GPU-accelerated shimmer animation (1.8s ease-in-out infinite)
- Component-wrapper architecture (dual-state: actual + skeleton)
- HTMX event integration (beforeSwap → show, afterSettle → hide)
- Zero layout shift during transitions
- Accessibility: Respects prefers-reduced-motion
- Print-friendly: Skeletons hidden in @media print

IMPLEMENTATION:
- static/css/skeleton.css (341 lines)
- templates/partials/skeleton-loader.html
- HTMX event listeners in main.js
- tests/mjs/12-skeleton-language-transitions.test.mjs

BENEFITS:
- Professional UX like modern SPAs (LinkedIn, Facebook)
- Smooth 250ms fade transitions
- Reusable for any HTMX swap operation
- Independent component loading states

### Section 12: Color Theme System (lines 1767-1939)
Dynamic light/dark/auto theme switching with CSS custom properties

KEY FEATURES:
- Three theme modes: Auto (system), Light, Dark
- CSS custom properties for instant switching
- localStorage persistence across sessions
- System integration via prefers-color-scheme
- Dynamic button colors per theme mode:
  * Auto: Purple (#9b59b6)
  * Light: Orange/Yellow (#f39c12)
  * Dark: Blue (#3498db)
- Dual-theme architecture (Color + Layout independent)

IMPLEMENTATION:
- static/css/color-theme.css (258 lines)
- static/hyperscript/color-theme._hs (59 lines)
- setColorTheme(), initColorTheme() functions
- Fixed floating button with theme cycling
- tests/mjs/13-color-theme-switcher.test.mjs

BENEFITS:
- User comfort (choose preference or follow system)
- Instant switching (CSS custom properties, no reflow)
- Accessible (WCAG AA contrast compliance)
- Zero JavaScript for theme application
- Separation of concerns (color vs. layout)

DOCUMENTATION QUALITY:
- Complete before/after code examples
- Architecture pattern breakdowns
- Comprehensive benefits lists
- Testing information included
- Pixel-perfect matching tables (skeletons)
- CSS custom properties reference (theme)

IMPACT: +306 lines comprehensive documentation
TIME: ~90 minutes (partial Phase 2 complete)
REMAINING: HTMX patterns enhancement, hover sync documentation
2025-11-18 17:07:13 +00:00
juanatsap 6893716231 docs: Phase 1 - Fix critical documentation inaccuracies
CRITICAL FIXES:
1. JavaScript Line Counts (239 → 679)
   - Updated progress table to show current state: 679 lines
   - Recalculated reduction: 28.8% (not 74.9%)
   - Added explanation for increase since Phase 6:
     * color-theme.js: 97 lines (theme system)
     * main.js enhancements: 488 lines (zoom, skeletons)
     * cv-functions.js: 94 lines (toggle coordination)

2. Hyperscript File Structure (1 file → 4 files)
   - Fixed documentation showing single functions._hs
   - Updated to show actual modular architecture:
     * utils._hs: 133 lines (print, scroll)
     * toggles._hs: 73 lines (length, icons, theme)
     * hover-sync._hs: 57 lines (menu sync)
     * color-theme._hs: 59 lines (theme cycling)
   - Total: 322 lines organized hyperscript

3. Phase 8 Toggle Implementation (inline → external)
   - Fixed examples showing 18+ lines inline hyperscript
   - Updated to show actual external function calls:
     _="on change call toggleCVLength(my.checked)"
   - Documented modular architecture with DRY principles

IMPROVEMENTS:
- Added "Current State" row in progress metrics
- Clarified historical vs. current implementation
- Updated organization comparison table
- Enhanced benefits list with modularity advantages
- Updated architecture pattern description
- Corrected final stats section

IMPACT: Documentation now accurately reflects production codebase
TIME: ~65 minutes (Phase 1 complete)
GRADE: Moved from C+ to B+ accuracy
2025-11-18 17:00:47 +00:00
juanatsap 54e2684127 docs: add HTMX loading indicators as technique #10
Complete documentation of HTMX loading indicators implementation:

- Added comprehensive section matching style of other 9 techniques
- Documented external indicator pattern to avoid swap-target destruction
- Included root cause analysis of initial bug (indicators destroyed mid-animation)
- Detailed CSS implementation with GPU-accelerated animations
- Implementation locations: language selector, toggle controls, hamburger menu
- Benefits: zero JavaScript, automatic lifecycle, accessibility support
- Testing: automated tests in 4-htmx.test.mjs

Updated:
- Technique count: 8 → 10 major optimizations
- Final stats: now lists all 10 techniques
- Last updated date: 2025-11-18
2025-11-18 16:24:28 +00:00
juanatsap 52e85a5359 chore: remove redundant implementation documentation files
Deleted two obsolete documentation files that are no longer needed:
- COLOR-THEME-IMPLEMENTATION.md (204 lines) - Feature complete and documented in code
- prompts/003-implement-htmx-indicators.md (427 lines) - Implementation prompt no longer relevant

These files served their purpose during development but are now redundant with:
- Inline code documentation
- TEST-SUMMARY.md for test coverage
- README.md for user-facing features
- Git history for implementation
2025-11-18 15:53:37 +00:00
juanatsap 5d5b050029 feat: confirm no hyperscript def limit + update documentation
MAJOR FINDING: Latest hyperscript version has NO 3 def statement limit!

Test Results (tests/mjs/9-hyperscript-def-limit.test.mjs):
 1 def statement - PASS
 2 def statements - PASS
 3 def statements - PASS
 4 def statements - PASS (beyond historical limit)
 5 def statements - PASS (well beyond limit)

Changes:
1. Created comprehensive def limit test
   - tests/mjs/9-hyperscript-def-limit.test.mjs
   - Tests 1, 2, 3, 4, 5 def statements
   - Verifies both parsing and function execution
   - Provides detailed analysis and recommendations

2. Updated PROJECT-MEMORY.md
   - Section 2: Changed from "NEEDS RETESTING" to "REMOVED IN LATEST VERSION"
   - Documented test findings and historical context
   - Added migration plan for hyperscript file organization
   - Updated test count to 10 systematic tests

3. Updated doc/HYPERSCRIPT-RULES.md
   - Rule 2: Removed 3 def limit warning
   - Documented historical context (Hyperscript 0.9.12 had limit)
   - New best practice: Organize by category in separate files
   - Added recommended file structure

Impact:
- Can now use unlimited def statements in hyperscript
- Enables cleaner architecture with category-based organization
- Allows migration from cv-functions.js back to hyperscript
- Better alignment with hypermedia/server-driven pattern

Next Steps:
- Create organized hyperscript file structure
- Migrate toggle functions from JavaScript to hyperscript
- Migrate hover sync functions to hyperscript
- Test each migration thoroughly
2025-11-17 15:02:30 +00:00
juanatsap d97d3567a3 docs: move HYPERSCRIPT-RULES.md and MODERN-WEB-TECHNIQUES.md to doc/ folder 2025-11-17 14:23:13 +00:00
juanatsap ac0cf15eb9 added zoom in buttons 2025-11-16 12:48:12 +00:00
juanatsap 211fd05462 feat: simplify architecture by removing cache layer and centralizing routes
- Removed over-engineered cache system for static CV data that only changes on deployment
- Extracted all route configuration to internal/routes/routes.go for better organization
- Implemented rate limiting and cache control middleware for PDF endpoint protection
2025-11-12 17:53:24 +00:00
juanatsap 927d257f2c docs: add comprehensive zoom implementation technical documentation
- Document CSS zoom vs transform scale decision
- Explain inverse zoom technique for fixed elements
- Detail viewport expansion strategy
- Cover edge cases, constraints, and browser compatibility
- Include testing checklist and future considerations
2025-11-12 17:04:45 +00:00
juanatsap f211d40803 docs: consolidate and sanitize documentation for public release
**Changes Summary:**

**Files Deleted (6 files):**
- doc/HTMX-PRODUCTION-RECOMMENDATIONS.md (implementation notes)
- doc/SEO-OPTIMIZATION-COMPLETE.md (implementation artifact)
- doc/PROJECT-DOCUMENTATION-SUMMARY.md (meta-documentation)
- doc/PROJECT_STATUS.md (internal roadmap)
- doc/API-QUICK-REFERENCE.md (consolidated into API.md)
- doc/API-PROTECTION.md (consolidated into API.md and SECURITY.md)

**API Documentation Enhanced:**
- Added Quick Reference section to API.md (from API-QUICK-REFERENCE.md)
- Added Security & Protection section to API.md (from API-PROTECTION.md)
- Updated Rate Limiting section to reflect actual implementation
- Added Origin Checking documentation with examples

**SECURITY.md Enhanced:**
- Added comprehensive API Protection Features section
- Updated Rate Limiting section (was marked "Not implemented", now shows it IS implemented)
- Added Origin Checking configuration and examples
- Added Combined Protection flow documentation
- Added Testing Protection section with curl examples
- Added Production Deployment Checklist
- Added Troubleshooting section

**Private Information Removed:**
- README.md: Removed matomo.drolo.club and site ID references
- PRIVACY.md: Replaced specific Matomo server with generic template
- CUSTOMIZATION.md: Replaced Analytics Configuration with generic guide
- All Matomo-specific details replaced with placeholders

**Documentation Navigation:**
- README.md: Enhanced Documentation section with organized categories
  - Getting Started (README, DEPLOYMENT, CUSTOMIZATION)
  - Technical Reference (ARCHITECTURE, API)
  - Policies & Standards (SECURITY, PRIVACY, CODE_OF_CONDUCT, CONTRIBUTING)
  - License

**Broken Links Fixed:**
- Removed reference to non-existent CHANGELOG.md in API.md
- Fixed relative paths for cross-document references
- Verified all internal documentation links

**Result:**
- Documentation reduced from 16 files to 10 core files (37.5% reduction)
- No private information exposed (all Matomo details sanitized)
- No implementation artifacts remaining
- Clear, professional structure suitable for public instructive project
- Comprehensive API and security documentation
- All essential content preserved and enhanced

This documentation now represents a professional, instructive open-source project suitable for public consumption and learning purposes.
2025-11-12 16:04:43 +00:00
juanatsap 6eee66e3e2 refactor: simplify middleware chain and update documentation
- Remove unused rate limiting and security validation middleware
- Rename improvement summary to aspirational goals
- Add current project status documentation
2025-11-12 09:42:46 +00:00
juanatsap 92dffe8c60 feat: add comprehensive testing infrastructure and security hardening
- Enhanced CI/CD pipeline with coverage reporting, benchmarks, and artifact uploads
- Implemented rate limiter IP validation with proxy support and spoofing protection
- Added extensive Makefile test targets for coverage, benchmarks, and continuous testing
- Expanded middleware chain with request validation, size limits, and suspicious activity logging
2025-11-11 21:43:12 +00:00
juanatsap 0e52d625a1 refactor: remove API documentation files and add binary to gitignore
- Removed redundant API documentation (API.md and API-QUICK-REFERENCE.md)
- Added cv-app binary to gitignore to prevent committing build artifacts
2025-11-09 20:48:24 +00:00
juanatsap ea6ccf9cdd feat: add origin validation and rate limiting for PDF endpoint
Security enhancements:
- Implement origin/referer validation middleware
- Add rate limiting (3 requests/min per IP)
- Default to production domain (juan.andres.morenorub.io)
- Verify all protection mechanisms working correctly

Documentation updates:
- Update README to reflect personal portfolio nature
- Remove template encouragement from README
- Add verification status to API-PROTECTION.md
- Document ALLOWED_ORIGINS configuration in .env.example

Cleanup:
- Remove templates.backup/ folder
- Remove old test screenshots
2025-11-09 14:13:22 +00:00
juanatsap 24b2401519 feat: add origin validation and rate limiting for PDF endpoint
- Implemented origin checker middleware to prevent external sites from hotlinking the PDF generation endpoint
- Added rate limiter (3 requests per minute per IP) to protect resource-intensive PDF operations
- Configured allowed origins via ALLOWED_ORIGINS environment variable with localhost defaults for development
2025-11-09 14:00:10 +00:00
juanatsap 584cfe05b1 refactor: consolidate documentation into main README
- Removed redundant documentation files (ADDING-YOUR-PHOTO.md, ARCHITECTURE.md, DEPLOYMENT_SETUP.md)
- Moved essential information into the primary README for better discoverability
- Streamlined documentation structure to reduce maintenance overhead
2025-11-08 10:34:43 +00:00