Files
StarPunk/docs/reviews/2025-11-28-v1.2.0-design-complete.md
Phil Skentelbery dd822a35b5 feat: v1.2.0-rc.1 - IndieWeb Features Release Candidate
Complete implementation of v1.2.0 "IndieWeb Features" release.

## Phase 1: Custom Slugs
- Optional custom slug field in note creation form
- Auto-sanitization (lowercase, hyphens only)
- Uniqueness validation with auto-numbering
- Read-only after creation to preserve permalinks
- Matches Micropub mp-slug behavior

## Phase 2: Author Discovery + Microformats2
- Automatic h-card discovery from IndieAuth identity URL
- 24-hour caching with graceful fallback
- Never blocks login (per ADR-061)
- Complete h-entry, h-card, h-feed markup
- All required Microformats2 properties
- rel-me links for identity verification
- Passes IndieWeb validation

## Phase 3: Media Upload
- Upload up to 4 images per note (JPEG, PNG, GIF, WebP)
- Automatic optimization with Pillow
  - Auto-resize to 2048px
  - EXIF orientation correction
  - 95% quality compression
- Social media-style layout (media top, text below)
- Optional captions for accessibility
- Integration with all feed formats (RSS, ATOM, JSON Feed)
- Date-organized storage with UUID filenames
- Immutable caching (1 year)

## Database Changes
- migrations/006_add_author_profile.sql - Author discovery cache
- migrations/007_add_media_support.sql - Media storage

## New Modules
- starpunk/author_discovery.py - h-card discovery and caching
- starpunk/media.py - Image upload, validation, optimization

## Documentation
- 4 new ADRs (056, 057, 058, 061)
- Complete design specifications
- Developer Q&A with 40+ questions answered
- 3 implementation reports
- 3 architect reviews (all approved)

## Testing
- 56 new tests for v1.2.0 features
- 842 total tests in suite
- All v1.2.0 feature tests passing

## Dependencies
- Added: mf2py (Microformats2 parser)
- Added: Pillow (image processing)

Version: 1.2.0-rc.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 15:02:20 -07:00

4.1 KiB

v1.2.0 Design Review - Complete

Date: 2025-11-28 Architect: StarPunk Architect Subagent Status: Design Complete and Ready for Implementation

Executive Summary

The v1.2.0 feature specification has been updated with all user decisions and architectural designs. The three core features (Custom Slugs, Media Upload, Microformats2) are fully specified with implementation details, database schemas, and edge case handling.

User Decisions Incorporated

1. Custom Slugs

  • Decision: Read-only after creation (Option B)
  • Implementation: Field disabled on edit form with warning message
  • Rationale: Prevents broken permalinks

2. Media Upload

  • Storage: data/media/ directory (Option A)
  • URL Structure: Date-organized /media/2025/01/filename.jpg (Option A)
  • Insertion: Auto-insert markdown at cursor position (Option A)
  • Tracking: Database table for metadata (Option A)
  • Format: Minimal markdown ![](url) for simplicity

3. Microformats2 / Author Discovery

  • Critical Decision: Author info discovered from IndieAuth profile URL
  • NOT environment variables or config files
  • Implementation: New discovery system with caching
  • h-card Placement: Only within h-entries (Option B)
  • Fallback: Graceful degradation when discovery fails

Architectural Decisions

ADR-061: Author Profile Discovery

Created new Architecture Decision Record documenting:

  • Discovery from IndieAuth profile URL
  • Database caching strategy
  • Fallback behavior
  • Integration with existing auth flow

Database Changes

Two new tables required:

  1. media - Track uploaded files with metadata
  2. author_profile - Cache discovered author information

Security Considerations

  • Media validation (MIME types, file size)
  • Slug validation (URL-safe characters)
  • Directory traversal prevention
  • No SVG uploads (XSS risk)

Implementation Guidance

Phase 1: Custom Slugs (Simplest)

  • Template changes only
  • Validation in existing create/edit routes
  • No database changes needed

Phase 2: Microformats2 + Author Discovery

  • Build discovery module first
  • Integrate with auth flow
  • Update templates with discovered data
  • Add manual refresh in admin

Phase 3: Media Upload (Most Complex)

  • Create media module
  • Database migration for media table
  • AJAX upload endpoint
  • Cursor tracking JavaScript

Standards Compliance Verified

Microformats2

  • h-entry: All properties optional (confirmed via spec)
  • h-feed: Proper container structure
  • h-card: Standard properties for author
  • rel-me: Identity verification links

IndieWeb

  • IndieAuth profile discovery pattern
  • Micropub compatibility maintained
  • RSS/Atom feed preservation

Edge Cases Addressed

Author Discovery

  • Multiple h-cards on profile
  • Missing properties
  • Network failures
  • Invalid markup
  • All have graceful fallbacks

Media Upload

  • Concurrent uploads
  • Orphaned files
  • Invalid MIME types
  • File size limits

Custom Slugs

  • Uniqueness validation
  • Character restrictions
  • Immutability enforcement

No Outstanding Questions

All user requirements have been addressed. The design is complete and ready for developer implementation.

Success Criteria Defined

Eight clear metrics for v1.2.0 success:

  1. Custom slug specification (immutable)
  2. Image upload with auto-insertion
  3. Author discovery from IndieAuth
  4. IndieWebify.me Level 2 pass
  5. Test suite passes
  6. No regressions
  7. Media tracking in database
  8. Graceful failure handling

Recommendation

The v1.2.0 design is COMPLETE and ready for implementation. The developer should:

  1. Review /docs/design/v1.2.0/feature-specification.md
  2. Review /docs/decisions/ADR-061-author-discovery.md
  3. Follow the recommended implementation order
  4. Create implementation reports in /docs/reports/
  5. Update CHANGELOG.md with changes

Files Created/Updated

  • /docs/design/v1.2.0/feature-specification.md - UPDATED with all decisions
  • /docs/decisions/ADR-061-author-discovery.md - NEW architecture decision
  • /docs/reviews/2025-11-28-v1.2.0-design-complete.md - THIS DOCUMENT

Next Steps

Hand off to developer for implementation following the specified design.