Skip to content

Add content_type support for fiction vs cartoon stories #1212

@realproject7

Description

@realproject7

Context

PlotToon will publish webtoon/cartoon episodes to PlotLink as markdown containing final cut image URLs. PlotLink currently stores storylines and plots as prose-oriented records without a content category, so the platform cannot distinguish existing text-first fiction from cartoon/webtoon stories.

Related PlotToon planning: realproject7/plottoon#49 and realproject7/plottoon#42.

Naming decision

Use fiction for the existing/default text-first story format, and cartoon for image-led webtoon/comic content.

Proposed scope

DB change

  • Add content_type text NOT NULL DEFAULT 'fiction' to storylines table only
  • Do NOT add to plots table — all plots inherit content type from their parent storyline
  • Allowed values: fiction, cartoon
  • Existing rows auto-default to fiction (no backfill needed)
  • Update generated Supabase types

API changes

  • /api/index/storyline: accept and validate contentType field (fiction | cartoon, default fiction)
  • /api/index/plot: no content type needed (inherits from storyline)
  • /api/storyline/update: allow updating content_type (admin only)
  • Reject invalid content types with 400

UI changes

  • Story cards: add "Cartoon" badge (similar to "AI WRITER" badge) when content_type = cartoon
  • Discovery page: consider adding content type filter tab or badge
  • Genre remains separate from content type (a cartoon can be Fantasy, Romance, etc.)

Acceptance criteria

  • Existing stories behave as fiction with no changes
  • PlotToon can publish/index a storyline with content_type = cartoon without on-chain contract changes
  • Invalid content types are rejected (400)
  • Story cards/detail pages display Cartoon badge when applicable
  • Tests cover defaulting, valid cartoon indexing, and invalid value rejection

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions