Skip to content

Port blog authoring and comments from the Django site to learn (Workers + D1) #1293

Backlog

Description

@ayesha1145

learn/MIGRATION.md lists "Blog authoring and comments" as still open. The Django site has BlogPost and BlogComment (draft/published/archived posts, tags, reading time, threaded comments that start unapproved). learn/ only shows legacy blog records read-only. This issue proposes porting it natively to the Cloudflare Python Worker and D1 in four small PRs, the same way as #1286.

Plan

  1. Posts API: tables, migration, and endpoints to create, list, read, update and delete. Authors manage their own posts; drafts are private; published posts are public.
  2. Comments API: comments and one level of replies. New comments start unapproved; the post's author or an admin approves them.
  3. Pages: blog index, post page with comments, and a write/edit form.
  4. Tags and reading time: filter by tag and show reading time.

Rules for every PR

  • The user comes from the JWT, never the request body.
  • Text is bounded and shown escaped (plain text with line breaks; Markdown rendering can come later).
  • Ownership checks return the same 404 for missing and foreign posts.
  • Writes that must succeed together use one batch.
  • Tests, README endpoint table, schema.sql, migration and _DDL stay in sync.
  • Each PR is stacked and says which commit to review.

Legacy blog records stay as a read-only archive. I am happy to take this and will open step 1 first. I would also welcome changes to the scope.

Activity

  1. ayesha1145 commented on Nov 26, 2026

    @ayesha1145
    ContributorAuthor

    I'd like to take this. I'll open step 1 (posts API) soon.

  2. added
    2026-11
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2026-11good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions