Stu Mason
Stu Mason

Activity

StuMason/progress
stumason.dev
TypeScript
Pull Request Merged

PR #18 merged: Add analytics tracking and automated digest generation

Summary

  • Social post tracking - New SocialPost model tracks when activities are shared to Twitter/LinkedIn with timestamps and post IDs
  • UTM parameters - Shared links now include UTM tracking for Umami analytics (utm_source, utm_medium, utm_campaign)
  • Automated digest generation - Daily and weekly digest articles generated automatically via digests:generate command
  • Cover image generation - Spotify Wrapped-style cover images generated with Browsershot (blocky colors, big stats)
  • Article cover images - Cover images displayed full-width on article pages, editable in article edit form
  • Activity linking - Digests include collapsible index with links to individual activities for LLM context
  • Private repo protection - GitHub links only shown for public repos

New Files

  • app/Console/Commands/GenerateDigests.php - Artisan command with --daily, --weekly, --date, --user options
  • app/Services/DigestService.php - Core digest generation logic with stats aggregation
  • app/Services/SocialPostService.php - Tracks social sharing with UTM parameters
  • app/Models/SocialPost.php - Eloquent model for social post tracking
  • app/Enums/SocialPlatform.php - Enum for Twitter/LinkedIn platforms
  • resources/views/digest-card.blade.php - Blade template for cover image generation
  • tests/Feature/DigestServiceTest.php - 11 tests covering digest generation

Scheduling

  • Daily digests: 1am daily
  • Weekly digests: 2am Sundays

Test plan

  • All 11 DigestService tests pass
  • Generate a weekly digest manually and verify content
  • Check cover image renders correctly
  • Verify activity links work
  • Test social sharing tracks UTM parameters

šŸ¤– Generated with Claude Code

+1854
additions
-78
deletions
17
files changed