Skip to content

Sprint 7 · M4: followers/following lists, projects on profiles, real profile data (D6) - #66

Merged
Urvish2007 merged 1 commit into
mainfrom
sprint7-m4-profile-connections
Nov 20, 2026
Merged

Urvish2007 merged 1 commit into
mainfrom
sprint7-m4-profile-connections

Conversation

@Divy1386

@Divy1386 Divy1386 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

Sprint 7 · M4: followers / following lists on profiles, a user's projects on their profile, and D6 (real "About" and "Contribution snapshot" on My profile instead of fixed text and numbers).

User stories / requirements: Sprint 7 M4, D6 (FR-19, FR-26 follow-up)

Changes

  • Followers / following lists on My profile and on /people/:username: two tabs with real counts, 20 per page ("Show more"), each person links to their profile, refreshes after Follow / Unfollow. The profile API now also returns followingCount.
  • Projects on a profile: Public projects, plus Private ones only when the viewer is also a member. Members open /project/:id, everyone else opens the public page /discover/:id. Private projects are filtered twice (MongoDB query + rules check).
  • D6 on My profile: About now shows the user's own Focused on / Exploring / Open to (editable in Edit profile). Contribution snapshot shows real tasks done (+ this week), messages, decisions, collaborators and completed projects. Real "Joined "; the fixed "Ahmedabad, India" and "devorbit.community" were removed.
  • New endpoints (login required, Cache-Control: no-store):
    • GET /api/profile/users/:username/followers?page=
    • GET /api/profile/users/:username/following?page=
    • GET /api/profile/users/:username/projects
    • GET /api/profile/me/snapshot
  • Files other members should know about: backend/src/routes/profile.js, frontend/src/api.js (profileApi), ProfilePage.jsx, UserProfilePage.jsx, styles.css (appended at the end only).
  • No new environment variables and no database changes, so nothing to change on Render or Atlas.

How to test it

Demo data (npm run seed, password DevOrbit@2026): CampusConnect is Private (Riya + Aarav), Orbit dashboard is Public.

  1. Log in as jai@seed.devorbit.test, open /people/riya_seed → Projects shows Orbit dashboard only (CampusConnect hidden).
  2. Log in as aarav@seed.devorbit.test, open /people/riya_seed → shows Orbit dashboard and CampusConnect (Private).
  3. As Jai, click Follow on Riya → Followers tab lists Jai Shah right away and the count goes up. Jai's own Following tab lists Riya.
  4. As Jai, open My profile → Contribution snapshot shows real numbers (no 18 / 24 / 12 / 86%), "Joined ", Followers / Following counts.
  5. Edit profile → fill Focused on / Exploring / Open to → Save → About shows the text.
  6. After merge, repeat 1, 3 and 4 on the deployed site.

Checklist

  • Branched from the latest main and merged main again just before opening this PR
  • npm test passes in backend/ (1006 passed, 0 failed) and frontend/ (76 files, 636 tests passed)
  • npm run build passes in frontend/ (checked by CI on this PR)
  • npm run lint shows no errors (1 existing warning in e2e/tests/sprint5-profile-discovery.spec.js, not part of this PR)
  • Files I created or rewrote are formatted
  • New or changed behaviour has tests (10 backend API + 8 backend rules + 18 frontend tests)
  • README updated if an API, setting or command changed
  • No secrets, .env files, node_modules or dist in the diff
  • Only my part of the sprint plan is in this PR (nothing extra)

Screenshots (UI changes)

To be added after testing.

…ofile data (D6)

Followers and following lists on own and other profiles (20 per page, newest first). User projects on profiles: Public, plus Private only when the viewer is a member, linking to /project/:id or /discover/:id. D6: real About (focus/exploring/openTo) and real Contribution snapshot via GET /api/profile/me/snapshot. Backend and frontend tests added.
@vercel

vercel Bot commented Nov 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
devorbit Ready Ready Preview Nov 20, 2026 2:09pm UTC

@Urvish2007 Urvish2007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@Urvish2007
Urvish2007 merged commit 1639907 into main Nov 20, 2026
6 checks passed
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.

2 participants