Rebuild user blogs in Laravel #53

Closed
opened 2024-01-14 14:49:14 -06:00 by jimmyb · 1 comment
Owner

The Blogs feature needs to be rebuilt in Laravel so users can create, edit, delete, browse, and comment on blog entries.

The current app has profile/header links to user blogs and Recent Gamer Updates support for future blog activity, but the checkout does not yet include blog routes, controllers, models, views, or migrations. This issue tracks building the full user blog surface and verifying it with feature tests.

Scope

  • Authenticated blog entry creation, editing, and deletion.
  • Public user blog index pages, such as /blog/{username}, with pagination.
  • Public single-entry pages, such as /blog/{username}/{blogEntry}.
  • Blog entry comments/commenting.
  • Profile stats and links for blog entries and blog views.
  • Recent Gamer Updates integration when a blog entry is published.
  • Authorization, visibility, empty states, and safe rendering for blog content/comments.

Acceptance Criteria

  • Authenticated users can create blog entries with a title and body.
  • Blog authors can edit and delete their own entries.
  • Users cannot edit or delete another user’s blog entries unless an explicit admin/moderator policy is added.
  • /blog/{username} renders that active user’s published blog entries newest-first and paginated.
  • /blog/{username}/{blogEntry} renders a single public blog entry.
  • Banned, deleted, soft-deleted, or missing users do not expose public blog pages.
  • Deleted/unpublished blog entries do not appear on public indexes or single-entry pages.
  • Blog body content is rendered safely and supports the chosen formatting convention.
  • Authenticated users can comment on blog entries.
  • Guests can view public blog entries but cannot comment.
  • Blog comments validate content, render safely, show newest-first or clearly documented order, and handle deleted/banned commenters cleanly.
  • Profile blog entry count and blog view count are accurate where displayed.
  • Publishing a blog entry records a blog_entry_published gamer update with a working blog URL.
  • User-facing UI supports light/dark mode and follows the existing Laravel/Tailwind site layout patterns.

Test Coverage Required

  • Feature tests for creating, editing, deleting, authorization, validation, and public visibility of blog entries.
  • Feature tests for user blog index pagination, empty states, missing users, banned/deleted users, and deleted/unpublished entries.
  • Feature tests for single blog entry rendering, safe body rendering, and blog view count behavior.
  • Feature tests for blog comments: guest restrictions, authenticated posting, validation, ordering, safe rendering, and deleted/banned commenters.
  • Regression tests for profile blog links/stats and Recent Gamer Updates blog_entry_published output.
  • Tests should use Pest and focused feature coverage.
  • Run the focused affected tests, then run vendor/bin/pint --dirty before closing the issue.

Progress Checklist

  • Profile/header links to user blogs exist
  • Profile stats reserve blog entry and blog view fields
  • Recent Gamer Updates presenter supports blog_entry_published
  • Add blog persistence tables/models
  • Add routes and controllers/actions for blog indexes, single entries, create, edit, update, and delete
  • Build public blog index and single-entry pages
  • Build authenticated blog create/edit/delete UI
  • Add blog comments/commenting
  • Wire profile blog counts and blog view counts
  • Record blog publish events in Recent Gamer Updates
  • Add tests for CRUD, visibility, comments, stats, activity updates, and authorization
  • Confirm the blogs feature matches expected data coverage
The Blogs feature needs to be rebuilt in Laravel so users can create, edit, delete, browse, and comment on blog entries. The current app has profile/header links to user blogs and Recent Gamer Updates support for future blog activity, but the checkout does not yet include blog routes, controllers, models, views, or migrations. This issue tracks building the full user blog surface and verifying it with feature tests. ## Scope - Authenticated blog entry creation, editing, and deletion. - Public user blog index pages, such as `/blog/{username}`, with pagination. - Public single-entry pages, such as `/blog/{username}/{blogEntry}`. - Blog entry comments/commenting. - Profile stats and links for blog entries and blog views. - Recent Gamer Updates integration when a blog entry is published. - Authorization, visibility, empty states, and safe rendering for blog content/comments. ## Acceptance Criteria - Authenticated users can create blog entries with a title and body. - Blog authors can edit and delete their own entries. - Users cannot edit or delete another user’s blog entries unless an explicit admin/moderator policy is added. - `/blog/{username}` renders that active user’s published blog entries newest-first and paginated. - `/blog/{username}/{blogEntry}` renders a single public blog entry. - Banned, deleted, soft-deleted, or missing users do not expose public blog pages. - Deleted/unpublished blog entries do not appear on public indexes or single-entry pages. - Blog body content is rendered safely and supports the chosen formatting convention. - Authenticated users can comment on blog entries. - Guests can view public blog entries but cannot comment. - Blog comments validate content, render safely, show newest-first or clearly documented order, and handle deleted/banned commenters cleanly. - Profile blog entry count and blog view count are accurate where displayed. - Publishing a blog entry records a `blog_entry_published` gamer update with a working blog URL. - User-facing UI supports light/dark mode and follows the existing Laravel/Tailwind site layout patterns. ## Test Coverage Required - Feature tests for creating, editing, deleting, authorization, validation, and public visibility of blog entries. - Feature tests for user blog index pagination, empty states, missing users, banned/deleted users, and deleted/unpublished entries. - Feature tests for single blog entry rendering, safe body rendering, and blog view count behavior. - Feature tests for blog comments: guest restrictions, authenticated posting, validation, ordering, safe rendering, and deleted/banned commenters. - Regression tests for profile blog links/stats and Recent Gamer Updates `blog_entry_published` output. - Tests should use Pest and focused feature coverage. - Run the focused affected tests, then run `vendor/bin/pint --dirty` before closing the issue. ## Progress Checklist - [x] Profile/header links to user blogs exist - [x] Profile stats reserve blog entry and blog view fields - [x] Recent Gamer Updates presenter supports `blog_entry_published` - [x] Add blog persistence tables/models - [x] Add routes and controllers/actions for blog indexes, single entries, create, edit, update, and delete - [x] Build public blog index and single-entry pages - [x] Build authenticated blog create/edit/delete UI - [x] Add blog comments/commenting - [x] Wire profile blog counts and blog view counts - [x] Record blog publish events in Recent Gamer Updates - [x] Add tests for CRUD, visibility, comments, stats, activity updates, and authorization - [x] Confirm the blogs feature matches expected data coverage
Codex changed title from Rebuild Blogs Component in Laravel to Rebuild user blogs in Laravel 2026-05-25 21:46:43 -05:00
jimmyb self-assigned this 2026-05-29 15:42:45 -05:00
Author
Owner

Work completed!

Work completed!
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MyVideoGameList/myvideogamelist.com#53
No description provided.