Remove legacy frontend assets and update gallery routes
This commit is contained in:
168
docs/legacy-routes-inventory.md
Normal file
168
docs/legacy-routes-inventory.md
Normal file
@@ -0,0 +1,168 @@
|
||||
# Legacy Routes Inventory
|
||||
|
||||
Source analyzed: routes/legacy.php
|
||||
Date: 2026-03-12
|
||||
|
||||
This list includes active (non-commented) routes still defined in the legacy compatibility layer.
|
||||
|
||||
Companion execution guide: [docs/legacy-routes-removal-checklist.md](docs/legacy-routes-removal-checklist.md)
|
||||
|
||||
## Avatar and Artwork
|
||||
|
||||
| Method | Path | Route Name | Handler / Target |
|
||||
|---|---|---|---|
|
||||
| GET | /avatar/{id}/{name?} | legacy.avatar | LegacyAvatarController@show |
|
||||
| GET, POST | /art/{id}/comment | - | ArtController@show |
|
||||
|
||||
## Categories and Browse
|
||||
|
||||
| Method | Path | Route Name | Handler / Target |
|
||||
|---|---|---|---|
|
||||
| GET | /categories | legacy.categories | CategoryController@index |
|
||||
| GET | /sections | sections | SectionsController@index |
|
||||
| GET | /browse-categories | browse.categories | BrowseCategoriesController@index |
|
||||
| GET | /category/{group}/{slug?}/{id?} | legacy.category | BrowseGalleryController@legacyCategory |
|
||||
| GET | /browse | legacy.browse | BrowseGalleryController@browse |
|
||||
| GET | /browse-redirect | legacy.browse.redirect | 301 -> /explore |
|
||||
| GET | /wallpapers-redirect | legacy.wallpapers.redirect | 301 -> /explore/wallpapers |
|
||||
| GET | /featured | legacy.featured | FeaturedArtworksController@index |
|
||||
| GET | /featured-artworks | legacy.featured_artworks | FeaturedArtworksController@index |
|
||||
| GET | /daily-uploads | legacy.daily_uploads | DailyUploadsController@index |
|
||||
|
||||
## Community and Listings
|
||||
|
||||
| Method | Path | Route Name | Handler / Target |
|
||||
|---|---|---|---|
|
||||
| GET | /chat | legacy.chat | ChatController@index |
|
||||
| POST | /chat_post | legacy.chat.post | ChatController@post |
|
||||
| GET | /uploads/latest | uploads.latest | LatestController@index |
|
||||
| GET | /uploads/daily | uploads.daily | DailyUploadsController@index |
|
||||
| GET | /members/photos | members.photos | MembersController@photos |
|
||||
| GET | /authors/top | authors.top | TopAuthorsController@index |
|
||||
| GET | /comments/latest | comments.latest | LatestCommentsController@index |
|
||||
| GET | /comments/monthly | comments.monthly | MonthlyCommentatorsController@index |
|
||||
| GET | /downloads/today | downloads.today | TodayDownloadsController@index |
|
||||
| GET | /latest | legacy.latest | LatestController@index |
|
||||
| GET | /latest-comments | legacy.latest_comments | LatestCommentsController@index |
|
||||
| GET | /today-in-history | legacy.today_in_history | TodayInHistoryController@index |
|
||||
| GET | /today-downloads | legacy.today_downloads | TodayDownloadsController@index |
|
||||
| GET | /monthly-commentators | legacy.monthly_commentators | MonthlyCommentatorsController@index |
|
||||
| GET | /members | legacy.members | MembersController@index |
|
||||
| GET | /top-favourites | legacy.top_favourites | TopFavouritesController@index |
|
||||
|
||||
## Legacy Redirect Endpoints
|
||||
|
||||
| Method | Path | Route Name | Handler / Target |
|
||||
|---|---|---|---|
|
||||
| GET | /top-authors | legacy.top_authors | 301 -> /creators/top |
|
||||
| GET | /interviews | legacy.interviews | 301 -> /stories |
|
||||
| GET | /apply | legacy.apply.redirect | 301 -> /contact |
|
||||
| GET, POST | /bug-report | bug-report.redirect | 301 -> /contact |
|
||||
|
||||
## Auth-Only Legacy Routes
|
||||
|
||||
| Method | Path | Route Name | Handler / Target |
|
||||
|---|---|---|---|
|
||||
| GET | /mybuddies.php | legacy.mybuddies.php | MyBuddiesController@index |
|
||||
| GET | /mybuddies | legacy.mybuddies | MyBuddiesController@index |
|
||||
| DELETE | /mybuddies/{id} | legacy.mybuddies.delete | MyBuddiesController@destroy |
|
||||
| GET | /buddies.php | legacy.buddies.php | BuddiesController@index |
|
||||
| GET | /buddies | legacy.buddies | BuddiesController@index |
|
||||
| GET | /statistics | legacy.statistics | StatisticsController@index |
|
||||
| GET, POST | /user | legacy.user.redirect | 301 -> dashboard.profile |
|
||||
|
||||
## Favourites, Gallery, and Profile Legacy URLs
|
||||
|
||||
| Method | Path | Route Name | Handler / Target |
|
||||
|---|---|---|---|
|
||||
| GET | /favourites/{id?}/{username?} | legacy.favourites | FavouritesController@index |
|
||||
| POST | /favourites/{userId}/delete/{artworkId} | legacy.favourites.delete | FavouritesController@destroy |
|
||||
| GET | /gallery/{id}/{username?} | legacy.gallery | GalleryController@show (ensure.onboarding.complete) |
|
||||
| GET | /user/{username} | legacy.user.profile | ProfileController@legacyByUsername |
|
||||
| GET | /profile/{id}/{username?} | legacy.profile.id | ProfileController@legacyById |
|
||||
| GET | /profile/{username} | legacy.profile | ProfileController@legacyByUsername |
|
||||
|
||||
## Legacy RSS Feed URLs
|
||||
|
||||
| Method | Path | Route Name | Handler / Target |
|
||||
|---|---|---|---|
|
||||
| GET | /rss/latest-uploads.xml | rss.uploads | RssFeedController@latestUploads |
|
||||
| GET | /rss/latest-skins.xml | rss.skins | RssFeedController@latestSkins |
|
||||
| GET | /rss/latest-wallpapers.xml | rss.wallpapers | RssFeedController@latestWallpapers |
|
||||
| GET | /rss/latest-photos.xml | rss.photos | RssFeedController@latestPhotos |
|
||||
|
||||
## Notes
|
||||
|
||||
- Commented-out legacy blocks (manage pages, received-comments, forum.php redirect) are excluded from this active inventory.
|
||||
- Several routes are already transitional redirects; these are good early candidates for removal once logs show no meaningful traffic.
|
||||
|
||||
## Deprecation Priority
|
||||
|
||||
### Phase 1: Safe To Remove First (redirect-only)
|
||||
|
||||
These routes already do permanent redirects and typically carry the lowest removal risk once access logs confirm near-zero traffic.
|
||||
|
||||
- /top-authors
|
||||
- /interviews
|
||||
- /apply
|
||||
- /bug-report
|
||||
- /browse-redirect
|
||||
- /wallpapers-redirect
|
||||
|
||||
### Phase 2: Low-Risk Alias Pairs (keep canonical, remove duplicates)
|
||||
|
||||
For each pair, keep the cleaner canonical URL and remove the older alias after monitoring.
|
||||
|
||||
- Keep /featured-artworks, remove /featured (or vice versa; pick one canonical)
|
||||
- Keep /uploads/latest, remove /latest
|
||||
- Keep /comments/latest, remove /latest-comments
|
||||
- Keep /downloads/today, remove /today-downloads
|
||||
- Keep /comments/monthly, remove /monthly-commentators
|
||||
|
||||
### Phase 3: Needs Migration Plan (controller-backed legacy behavior)
|
||||
|
||||
These endpoints are not simple redirects and may have old templates, old query semantics, or SEO dependencies.
|
||||
|
||||
- /browse
|
||||
- /category/{group}/{slug?}/{id?}
|
||||
- /browse-categories
|
||||
- /daily-uploads
|
||||
- /members
|
||||
- /members/photos
|
||||
- /authors/top
|
||||
- /top-favourites
|
||||
- /today-in-history
|
||||
- /chat
|
||||
- /chat_post
|
||||
- /favourites/{id?}/{username?}
|
||||
- /favourites/{userId}/delete/{artworkId}
|
||||
- /gallery/{id}/{username?}
|
||||
|
||||
### Phase 4: Legacy Profile URL Surface (requires 301 mapping checks)
|
||||
|
||||
These should eventually collapse to canonical @username/profile routes, but require careful redirect and username-edge-case validation.
|
||||
|
||||
- /user/{username}
|
||||
- /profile/{id}/{username?}
|
||||
- /profile/{username}
|
||||
- /user
|
||||
|
||||
### Phase 5: Keep For Compatibility (unless external consumers are migrated)
|
||||
|
||||
These are frequently consumed by feed readers or old clients and should be retired only with explicit migration communication.
|
||||
|
||||
- /rss/latest-uploads.xml
|
||||
- /rss/latest-skins.xml
|
||||
- /rss/latest-wallpapers.xml
|
||||
- /rss/latest-photos.xml
|
||||
|
||||
### Special Case: Auth-only legacy utility pages
|
||||
|
||||
Evaluate usage with auth logs before deprecating. They are likely niche but can still be bookmarked by long-time users.
|
||||
|
||||
- /mybuddies.php
|
||||
- /mybuddies
|
||||
- /mybuddies/{id}
|
||||
- /buddies.php
|
||||
- /buddies
|
||||
- /statistics
|
||||
137
docs/legacy-routes-removal-checklist.md
Normal file
137
docs/legacy-routes-removal-checklist.md
Normal file
@@ -0,0 +1,137 @@
|
||||
# Legacy Routes Removal Checklist
|
||||
|
||||
Date: 2026-03-12
|
||||
Scope: staged retirement of routes listed in docs/legacy-routes-inventory.md
|
||||
|
||||
## Global Preflight (run before each phase)
|
||||
|
||||
- Confirm canonical replacement routes exist and are healthy.
|
||||
- Snapshot current route map:
|
||||
- `php artisan route:list --path=legacy`
|
||||
- `php artisan route:list --json > storage/logs/routes-before-phase.json`
|
||||
- Capture 14-30 day usage for each candidate route from access logs / analytics.
|
||||
- Define rollback rule: restore removed routes immediately if a business-critical endpoint drops or 404 volume spikes.
|
||||
|
||||
## Standard PR Steps (for every phase)
|
||||
|
||||
1. Remove targeted route entries from routes/legacy.php.
|
||||
2. If needed, add explicit 301 redirects to canonical paths in routes/web.php.
|
||||
3. Update route-based tests (e2e fixtures and auth guard lists).
|
||||
4. Run cache clear and verify registration:
|
||||
- `php artisan optimize:clear`
|
||||
- `php artisan route:list --json`
|
||||
5. Add release note entry with removed paths and replacements.
|
||||
|
||||
## SEO Safety Checklist
|
||||
|
||||
- Ensure removed indexed URLs either:
|
||||
- return 301 to final canonical URL, or
|
||||
- return 410 only when intentional and approved.
|
||||
- Keep canonical tags correct on destination pages.
|
||||
- Re-submit updated sitemap if route removals change indexed URLs.
|
||||
- Monitor Search Console coverage and soft-404 reports for 2-4 weeks.
|
||||
|
||||
## Monitoring Checklist (post-deploy)
|
||||
|
||||
- Track 404 count by path prefix for removed routes.
|
||||
- Track 301 volume for newly redirected legacy paths.
|
||||
- Watch top entry pages for traffic drops.
|
||||
- Verify no auth redirect loops were introduced on legacy auth-only pages.
|
||||
|
||||
## Phase-by-Phase Execution
|
||||
|
||||
### Phase 1: Redirect-only endpoints (lowest risk)
|
||||
|
||||
Targets:
|
||||
- /top-authors
|
||||
- /interviews
|
||||
- /apply
|
||||
- /bug-report
|
||||
- /browse-redirect
|
||||
- /wallpapers-redirect
|
||||
|
||||
Phase checks:
|
||||
- Confirm each path still has a valid replacement target.
|
||||
- Validate 301 status and location header for each route.
|
||||
|
||||
### Phase 2: Alias pair cleanup
|
||||
|
||||
Targets:
|
||||
- /featured vs /featured-artworks
|
||||
- /uploads/latest vs /latest
|
||||
- /comments/latest vs /latest-comments
|
||||
- /downloads/today vs /today-downloads
|
||||
- /comments/monthly vs /monthly-commentators
|
||||
|
||||
Phase checks:
|
||||
- Pick one canonical URL per pair.
|
||||
- Keep redirects from removed alias to chosen canonical.
|
||||
- Update internal links to canonical only.
|
||||
|
||||
### Phase 3: Controller-backed legacy pages
|
||||
|
||||
Targets:
|
||||
- /browse
|
||||
- /category/{group}/{slug?}/{id?}
|
||||
- /browse-categories
|
||||
- /daily-uploads
|
||||
- /members
|
||||
- /members/photos
|
||||
- /authors/top
|
||||
- /top-favourites
|
||||
- /today-in-history
|
||||
- /chat
|
||||
- /chat_post
|
||||
- /favourites/{id?}/{username?}
|
||||
- /favourites/{userId}/delete/{artworkId}
|
||||
- /gallery/{id}/{username?}
|
||||
|
||||
Phase checks:
|
||||
- Confirm parity exists in modern endpoints before removal.
|
||||
- Add temporary 301 map for any high-traffic paths.
|
||||
- Validate auth and CSRF behavior for migrated POST endpoints.
|
||||
|
||||
### Phase 4: Profile URL legacy surface
|
||||
|
||||
Targets:
|
||||
- /user/{username}
|
||||
- /profile/{id}/{username?}
|
||||
- /profile/{username}
|
||||
- /user
|
||||
|
||||
Phase checks:
|
||||
- Validate deterministic mapping to /@username.
|
||||
- Handle missing username and renamed accounts gracefully.
|
||||
- Verify no duplicate-content issues remain after redirects.
|
||||
|
||||
### Phase 5: RSS compatibility endpoints (communication required)
|
||||
|
||||
Targets:
|
||||
- /rss/latest-uploads.xml
|
||||
- /rss/latest-skins.xml
|
||||
- /rss/latest-wallpapers.xml
|
||||
- /rss/latest-photos.xml
|
||||
|
||||
Phase checks:
|
||||
- Identify external consumers (feed readers, partner integrations).
|
||||
- Publish migration notice before retirement.
|
||||
- Keep stable replacement feed URLs live before cutover.
|
||||
|
||||
## Fast QA Matrix
|
||||
|
||||
Test each removed or redirected route for:
|
||||
- Anonymous user request
|
||||
- Authenticated user request
|
||||
- Expected status code (301/200/404/410)
|
||||
- Correct final destination URL
|
||||
- No infinite redirect chain
|
||||
|
||||
Suggested command:
|
||||
- `php artisan test --filter=routes`
|
||||
|
||||
## Rollback Playbook
|
||||
|
||||
- Reintroduce removed route definitions from git history.
|
||||
- Clear caches: `php artisan optimize:clear`.
|
||||
- Redeploy hotfix.
|
||||
- Re-run route smoke tests and check access logs.
|
||||
Reference in New Issue
Block a user