Skip to content

Conversation

@ahaasco
Copy link

@ahaasco ahaasco commented Feb 1, 2026

Summary

A comprehensive redirect management plugin for SonicJS with admin UI, analytics tracking, and Cloudflare Bulk Redirects integration.

Features

  • Full CRUD operations for URL redirects with admin interface
  • Multiple match types: Exact, Wildcard, and Regex patterns
  • Status codes: 301, 302, 307, 308, and 410 (Gone)
  • Analytics tracking: Hit counts and last-hit timestamps per redirect
  • Audit trail: Tracks who created/updated redirects
  • CSV import/export: Bulk operations with validation
  • Cloudflare Bulk Redirects integration: Auto-sync eligible redirects to edge
  • Soft deletes: Preserves deleted redirects with timestamp
  • LRU caching: High-performance redirect lookups with cache warming
  • External plugin support: Other plugins can register redirects via sourcePlugin field

Cloudflare Integration

When configured with CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID:

  • Eligible redirects (EXACT/WILDCARD with 301/302/307/308) sync to Cloudflare edge
  • Offloads redirect processing for improved performance
  • Toggle via plugin settings: "Auto-Sync to Cloudflare"

New Files

  • my-sonicjs-app/src/plugins/redirect-management/ - Complete plugin implementation
  • my-sonicjs-app/migrations/032-038 - Database schema for redirects, analytics, Cloudflare settings, soft delete

Test Plan

  • Create/edit/delete redirects via admin UI
  • Verify redirect middleware intercepts matching URLs
  • Test CSV import/export with various match types
  • Confirm hit count tracking works
  • Test Cloudflare sync (if credentials configured)
  • Verify soft delete preserves records with timestamp

🤖 Generated with Claude Code

A comprehensive redirect management plugin for SonicJS featuring:

- Full CRUD operations with admin interface
- Multiple match types: Exact, Wildcard, and Regex patterns
- Status codes: 301, 302, 307, 308, and 410 (Gone)
- Analytics tracking: Hit counts and last-hit timestamps
- Audit trail: Tracks who created/updated redirects
- CSV import/export with validation
- Cloudflare Bulk Redirects integration for edge processing
- Soft deletes with timestamp preservation
- LRU caching with cache warming
- External plugin support via sourcePlugin field

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant