Skip to content

StoryService Business Rules #53

@ArchILLtect

Description

@ArchILLtect

Summary

Implement StoryService with create, recentFeed, myStories, and delete enforcing validation and ownership.

Motivation / Problem

Centralize Stories logic per LAYER_RULE with SECURITY_BASELINE validation and least privilege.

Acceptance Criteria

  • create(authorId, content) validates length 1..1000 and persists.
  • recentFeed(limit, before) clamps limit to [1..50], default 20; filters by before if present; returns newest first.
  • myStories(authorId) returns newest first for that author.
  • delete(authorId, storyId) deletes only if owner; otherwise throws AccessDeniedException; throws ResourceNotFoundException if missing.
  • No controller accesses repositories directly.

Target Release

v0.1.2

Notes / Links

docs/weekly-plan/week-5/week-5-plan-backend.md
docs/weekly-plan/week-5/week-5-plan-issues.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:storiesIssues/PRs related to the Stories domain (entity, repository, service, controller, feed, deletion)backendWork related to APIs, services, or controllers.javaPull requests that update java coderoadmapPlanned feature or strategic goal from the project roadmap.type:featureNew feature related to backend types, DTOs, or models.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions