You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A community bulletin board lets members post short updates, share opportunities, or celebrate milestones. Admins can pin important posts and moderate content. This is the backend for the FE-39 community feed.
Context
User entity: backend/src/users/entities/user.entity.ts
CommunityModule — may already exist for the directory endpoints (BE-11, BE-12); extend it here
Overview
A community bulletin board lets members post short updates, share opportunities, or celebrate milestones. Admins can pin important posts and moderate content. This is the backend for the FE-39 community feed.
Context
Userentity:backend/src/users/entities/user.entity.tsCommunityModule— may already exist for the directory endpoints (BE-11, BE-12); extend it hereTasks
CommunityPostentity:id,authorUserId(FK),body(text, max 1000 chars),isPinned(bool, default false),isDeleted(bool, default false),likeCount(int, default 0),createdAt,updatedAtCommunityPostLikeentity:id,postId(FK),userId(FK),createdAt; unique constraint on (postId,userId)POST /community/posts— any active authenticated member creates a post; validatebodymax lengthGET /community/posts— paginated feed; pinned posts always first, then newest first; author basic info includedDELETE /community/posts/:id— soft-delete own post (member) or any post (admin); setsisDeleted = truePOST /community/posts/:id/like— toggle like: if already liked, unlike; if not liked, like; updateslikeCountatomicallyPATCH /community/posts/:id/pin— toggle pin/unpin (admin only)Files to Modify / Create
backend/src/community/backend/src/community/community.controller.tsbackend/src/community/community.module.ts