Skip to content

feat: add club membership system with roles and policies#662

Open
SinhSinhAn wants to merge 4 commits intodevelopfrom
feature/618-club-membership
Open

feat: add club membership system with roles and policies#662
SinhSinhAn wants to merge 4 commits intodevelopfrom
feature/618-club-membership

Conversation

@SinhSinhAn
Copy link
Copy Markdown
Contributor

Summary

Closes #618

Adds a proper membership system to clubs. Previously, "Member" was the only non-officer role and it functioned as "following." Now clubs have three tiers of non-officer engagement: Follower, Member, and Requested.

Schema and migration:

  • New membership_policy enum on the club table (open, request, closed)
  • Added Follower and Requested values to member_type enum
  • Migration converts all existing Member rows to Follower

JoinButton behavior:

  • Not connected: "Follow" button (creates Follower)
  • Follower: Split button showing "Join" or "Request to Join" (based on club policy), with "Unfollow" in the dropdown
  • Member: "Leave" button (goes back to Follower)
  • Requested: "Remove Request" button (goes back to Follower)
  • Officer/President: "Manage" button (unchanged)

Admin/manage page:

  • New "Member Settings" card where officers can set the membership policy via a MUI Select
  • "Followers" button renamed to "Members & Followers"
  • "Show Only Members" toggle button in the data grid toolbar
  • Approve (check) and Deny (X) action buttons on Requested rows in the members table

New API mutations:

  • follow, unfollow, join, leave, requestJoin, cancelRequest
  • updateMemberStatus (for admins to approve/deny requests)
  • updateMembershipPolicy (for admins to change the club setting)

Updated references:

  • All inArray checks for ['Member', 'Officer', 'President'] now include Follower where appropriate
  • Officer demotion now sets role to Follower instead of Member
  • isUserOfficer in clubEdit now explicitly checks for Officer/President instead of !== 'Member'
  • MemberRoleChip displays all five roles with distinct colors and icons

Add a membership policy setting (open/request/closed) to each club and
expand the member role system with Follower, Member, and Requested roles.

Schema changes:
- Add membershipPolicy enum and column to club table
- Add Follower and Requested values to clubRoleEnum
- Migration converts all existing Member rows to Follower

JoinButton now has multi-state behavior:
- Not connected: Follow button
- Follower: Split button with Join/Request + Unfollow dropdown
- Member: Leave button
- Requested: Remove Request button

New API mutations: follow, unfollow, join, leave, requestJoin,
cancelRequest, updateMemberStatus, updateMembershipPolicy

Admin/manage updates:
- Member Settings card with MUI Select for membership policy
- Members & Followers button and page header
- Show Only Members filter toggle in toolbar
- Approve/deny buttons for Requested users in the data grid
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clubs Ready Ready Preview, Comment Apr 1, 2026 5:17pm

Request Review

- Replace anchorRef with state-based anchorEl for Popper in JoinButton
- Remove render-phase ref assignment in MemberList, use mutation onSuccess callback instead
- Fix prettier formatting in 4 files
Broken merge conflict resolution nested clubSizeEnum inside
membershipPolicyEnum's array brackets, causing ESLint parse failure.
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.

Club membership

1 participant