Skip to content

feat(social): M13 Social Features - #9

Open
Tardisyuan wants to merge 1 commit into
mainfrom
feat/m13-social-features
Open

Tardisyuan wants to merge 1 commit into
mainfrom
feat/m13-social-features

Conversation

@Tardisyuan

Copy link
Copy Markdown
Owner

M13 Social Features — Complete Implementation

Features Added

  • Social Feed: Create posts with visibility controls (Public/Tenant/Followers/Private)
  • Post Detail: View posts with threaded comments and reactions
  • User Profiles: View profiles with bio, avatar, follower/following/post counts
  • Follow System: Follow/unfollow users, view following/followers lists
  • Reactions: 5 reaction types (👍❤️🙏🕊️✨) with toggle behavior
  • Comments: Threaded comments with nested replies

Routes Added

Route Description
/social Feed with post creation, Feed/All tabs
/social/[id] Post detail with threaded comments
/social/profile/[id] User profile with posts
/social/follows Following/Followers lists

API Endpoints

Endpoint Method Description
/api/v1/social/posts/ GET/POST List/Create posts
/api/v1/social/posts/{id}/ GET/PATCH/DELETE Post detail
/api/v1/social/posts/feed/ GET Feed from followed users
/api/v1/social/comments/ GET/POST List/Create comments
/api/v1/social/reactions/ GET/POST List/Create reactions
/api/v1/social/follows/ GET/POST List/Create follows
/api/v1/social/follows/toggle/ POST Toggle follow
/api/v1/social/follows/following/ GET Users I follow
/api/v1/social/follows/followers/ GET Users who follow me
/api/v1/social/profiles/{id}/ GET/PATCH User profile
/api/v1/social/profiles/me/ GET Current user profile

Database Migrations

  • 0007_add_social_menu: Adds Social menu entry to sidebar navigation

Test Results

  • Backend: 133 new tests (Post, Comment, Reaction, Follow, UserProfile)
  • Frontend: 225 existing tests pass
  • Full suite: 863 passed, 16 skipped

Sidebar Navigation

  • Social menu (icon: Users, order: 50, visible to all roles)
  • Follows child menu (icon: UserCheck)

Rollback Plan

  1. git revert <commit>
  2. python manage.py migrate menus 0006

Risk Level

LOW — Additive feature, no existing code modified

Follow-up Tasks

  • i18n translation files for social strings
  • Social MenuButton permissions (create/delete post)
  • Profile editing UI
  • Delete post/comment UI
  • Hook usage cleanup (unused exports)

…ollows, profiles

Backend:
- 133 new tests for social domain (Post, Comment, Reaction, Follow, UserProfile)
- Data migration: Social menu entry in sidebar navigation
- Auto-fixed 9 ruff import ordering violations

Frontend:
- Social API module with typed endpoints (social.ts)
- TanStack Query hooks with cache invalidation (useSocial.ts)
- 5 UI components: PostCard, CommentThread, ReactionBar, FollowButton, ProfileCard
- 4 pages: Feed, Post Detail, Profile, Follows
- Query keys for social domain (socialKeys)

Routes:
- /social — Feed with post creation, Feed/All tabs
- /social/[id] — Post detail with threaded comments
- /social/profile/[id] — User profile with posts
- /social/follows — Following/Followers lists

Sidebar:
- Social menu entry (icon: Users, order: 50, visible to all roles)
- Follows child menu entry

Risk: LOW — additive feature, no existing code modified
Rollback: git revert <commit> + python manage.py migrate menus 0006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant