Forums - Design #2

Open
opened 2022-08-22 05:07:39 +00:00 by kirsle · 0 comments

Model design for forums could be:

  • Board
    • ID (pkey)
    • Category (str)
    • Owner (user_id)
    • Fragment (str): URL fragment for the board, like a username.
    • Title (str)
    • Description (str)
    • Explicit (bool)
    • Privileged (bool): only admins or owner (moderators) can create posts.
    • PermitPhotos (bool): allow posts to attach pictures.
    • CreatedAt, UpdatedAt
  • Thread
    • ID (pkey)
    • Board ID (fkey Board)
    • User ID (fkey User) - author of post
    • Title (str)
    • Message (str)
    • Explicit (bool) - can have NSFW posts in otherwise SFW threads
    • NoReply (bool) - moderator feature to disable replies
    • CreatedAt, UpdatedAt
  • Comment
    • ID (pkey)
    • TableName (str) - threads, photos, comments, ...
    • TableID (uint64) - foreign key ID to TableName
    • UserID (fkey User)
    • Message (str)
    • CreatedAt, UpdatedAt

High level overview for initial integration:

  • Forum feature is "Reddit-like" - where Boards act like subreddits and have a URL fragment and possibility for user-created boards in the future.
  • Initially, Boards will be admin-only owners and purpose built for the website.
  • The "Forums" landing page would show Categories (labels) and a set of Boards under each one, e.g.:
    • Category: "Rules and Announcements"
      • Board: "Rules for posting in here" (/forum/b/rules)
      • Board: "Announcements" (/forum/b/announcements)
    • Category: "Nudists"
      • Board: "General Discussion"
      • Board: "The Mens Room"
      • Board: "The Ladies Room"
      • Board: "Sex and Sexuality"
    • Category: "Exhibitionists"
      • Board: ...
  • The "Forums" landing page would have a hard-coded (config.go) list of categories.

URL routes would include:

  • /forum: landing page showing hard-coded categories (fixed order) and boards of each (alphabetical)
  • /forum/b/$fragment: specific Board pages viewing their threads (paginated)
  • /forum/t/$fragment/$threadID: specific threads
  • /forum/admin: management page for boards (admin only, in future maybe any users)
    • Lists Boards that are owned by you (edit/delete buttons)
    • Button or form to create a new Board.

Future questions:

  • When custom Boards can be created by users later:
    • Will "Categories" be useful for user-created boards?
    • Will Privileged, PermitPhotos and NoReply features still be admin-only?
    • How will user boards be listed and discovered?
      • "Forums" landing page shows official, has links to view user boards?
  • Will "Categories" need to be translate able?
  • How will additional board moderators work?
    • Owner (if not admin) is moderator of their board
    • Admins are moderators for ALL boards automatically
    • New table later? BoardModerators many:many for UserID:BoardID
  • Private (invite-only) boards?
    • Maybe useful when Boards can be user-created.
    • Poor man's Groups.
    • New many:many table BoardMembers mapping UserID:BoardID with approved boolean, like friend requests.

Started in a663462e27

Still to do:

  • Pinned threads
  • Implement "Privileged" and "NoReply" controls
  • Get most recent post for forums landing page
  • Count of distinct users who participate in each forum for landing page
  • Explicit forums filter (users who don't opt-in won't see them)
  • Reporting posts
  • Date/time mouseover for UpdatedAt on board index page
  • Photo attachments to posts (can be longer term goal)
Model design for forums could be: * Board * ID (pkey) * Category (str) * Owner (user_id) * Fragment (str): URL fragment for the board, like a username. * Title (str) * Description (str) * Explicit (bool) * Privileged (bool): only admins or owner (moderators) can create posts. * PermitPhotos (bool): allow posts to attach pictures. * CreatedAt, UpdatedAt * Thread * ID (pkey) * Board ID (fkey Board) * User ID (fkey User) - author of post * Title (str) * Message (str) * Explicit (bool) - can have NSFW posts in otherwise SFW threads * NoReply (bool) - moderator feature to disable replies * CreatedAt, UpdatedAt * Comment * ID (pkey) * TableName (str) - threads, photos, comments, ... * TableID (uint64) - foreign key ID to TableName * UserID (fkey User) * Message (str) * CreatedAt, UpdatedAt High level overview for initial integration: * Forum feature is "Reddit-like" - where Boards act like subreddits and have a URL fragment and possibility for user-created boards in the future. * Initially, Boards will be admin-only owners and purpose built for the website. * The "Forums" landing page would show Categories (labels) and a set of Boards under each one, e.g.: * Category: "Rules and Announcements" * Board: "Rules for posting in here" (/forum/b/rules) * Board: "Announcements" (/forum/b/announcements) * Category: "Nudists" * Board: "General Discussion" * Board: "The Mens Room" * Board: "The Ladies Room" * Board: "Sex and Sexuality" * Category: "Exhibitionists" * Board: ... * The "Forums" landing page would have a hard-coded (config.go) list of categories. URL routes would include: * /forum: landing page showing hard-coded categories (fixed order) and boards of each (alphabetical) * /forum/b/$fragment: specific Board pages viewing their threads (paginated) * /forum/t/$fragment/$threadID: specific threads * /forum/admin: management page for boards (admin only, in future maybe any users) * Lists Boards that are owned by you (edit/delete buttons) * Button or form to create a new Board. Future questions: * When custom Boards can be created by users later: * Will "Categories" be useful for user-created boards? * Will Privileged, PermitPhotos and NoReply features still be admin-only? * How will user boards be listed and discovered? * "Forums" landing page shows official, has links to view user boards? * Will "Categories" need to be translate able? * How will additional board moderators work? * Owner (if not admin) is moderator of their board * Admins are moderators for ALL boards automatically * New table later? BoardModerators many:many for UserID:BoardID * Private (invite-only) boards? * Maybe useful when Boards can be user-created. * Poor man's Groups. * New many:many table BoardMembers mapping UserID:BoardID with approved boolean, like friend requests. --- Started in a663462e2744e04f7d2cab58894049e3579cb0c6 Still to do: * [x] Pinned threads * [x] Implement "Privileged" and "NoReply" controls * [x] Get most recent post for forums landing page * [x] Count of distinct users who participate in each forum for landing page * [x] Explicit forums filter (users who don't opt-in won't see them) * [x] Reporting posts * [x] Date/time mouseover for UpdatedAt on board index page * [ ] Photo attachments to posts (can be longer term goal)
kirsle added the
enhancement
label 2022-08-22 05:26:44 +00:00
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
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: apps/gosocial#2
There is no content yet.