Community
Groups with their feed, challenges counted from what members record, events, discussions and the leaderboard, and how staff run them.
For the Full Stack package
The community page
/en/dashboard/community gathers the gym's members:
- Groups a member joins or leaves, each with a page (
/en/dashboard/community/groups/<slug>) holding its feed, pinned post, rules, admins, trending topics, members and its own challenge. - Challenges a member joins. Progress is counted from what they record, never typed: each day since joining whose figure (workouts, steps, active minutes, distance, water or protein) cleared the daily target counts toward the goal.
- Events a member attends, until the event is full.
- Discussions with replies, the top contributors, the leaderboard by points with each member's change of rank, and trending topics.
- A profile per member (
/en/dashboard/community/members/<username>): rank, workouts, posts, challenges won, groups, badges, 28 days of activity and recent posts.
Posting
- A member writes a post in a group they belong to: a title up to 120 characters and a body up to 2,000.
- Posts take likes and comments; comments and discussion replies hold up to 280 characters.
- Posts, comments and discussion titles are the members' own words, stored as written. Groups, challenges, events and topics are content in English and Arabic.
Running the community
Staff with fitness.manage edit the community under Content, then Community & awards:
| Screen | What it holds |
|---|---|
| Groups | Name, description, about and rules, picture and cover, icon, public or private, founding date. Deleting a group deletes its memberships, posts, likes and comments; its challenge stays, without a group. |
| Events | Name, place, picture, start, capacity. Deleting one deletes its attendees. |
| Challenges | Name, description, goal and unit, start and end, the metric and daily target, an optional group. The end cannot come before the start. |
| Achievements, Badges | Name and text in both languages. One that any account has earned cannot be deleted or have its key renamed. |
The seed ships four groups, six running challenges, upcoming and past events, discussions and a leaderboard, with eight named members leading it.
The community routes
Reads need fitness.view and writes fitness.edit; each write answers with the refreshed page. The catalogue routes need fitness.manage.
| Routes | What they do |
|---|---|
GET /api/fitness/community | The community page |
POST /api/fitness/community/groups/:slug/join, …/challenges/:slug/join, …/events/:slug/attend | Join or leave, attend or not (400 event_full at capacity) |
GET /api/fitness/community/groups/:slug, …/members/:username, …/discussions/:slug | A group, a member's profile, a discussion |
POST …/groups/:slug/posts, …/posts/:postKey/like, …/posts/:postKey/comments | A post (403 not_a_member outside the group), a like, a comment |
POST …/discussions/:slug/replies | A reply |
/api/fitness/manage/groups, /events, /challenges, /achievements, /badges | List, read, create, change and delete |