Skip to content

feat(members): build member profile page [ISSUE-037] - #108

Open
CYNTHia-com wants to merge 2 commits into
mainfrom
cynthia/feat/issue-37
Open

feat(members): build member profile page [ISSUE-037]#108
CYNTHia-com wants to merge 2 commits into
mainfrom
cynthia/feat/issue-37

Conversation

@CYNTHia-com

Copy link
Copy Markdown

feat(members): implement full member profile page — Feature #37
Summary
Replaces the founding scaffold stub at app/(public)/members/[username]/page.tsx with a fully working member profile page, pulling real data from the database across all required sections.

What Changed
File modified: app/(public)/members/[username]/page.tsx

✅ Real Contributions List
Derives contributions from the user's published articles and forum posts — no seeded or hardcoded strings.
Both types are merged, sorted by most recent, each tagged with a badge (PUBLICATION or DISCUSSION) and a direct link.
✅ Forum Activity
Combines the user's forum threads and forum replies into one compact activity list.
Sorted by most recent, capped at 5 entries. Each item shows category badge, timestamp, thread title, and reply excerpt.
✅ Bookmarks
Displays total bookmark count in the sidebar via _count.bookmarks.
Shows the most recent 5 bookmarked articles with title, category, and link.
✅ Events
Registered events — from eventRegistrations relation.
Authored/Organized events — from events relation (EventAuthor).
Both shown side-by-side in a two-column grid.
✅ Social Links Sidebar
GitHub, Twitter, LinkedIn links rendered conditionally — only when a URL exists on the profile.
✅ 404 Handling
Calls notFound() immediately when no user matches the username param.
✅ Redis Cache
Profile data cached for 5 minutes via getCachedOrFetch.
Gracefully skips caching when Upstash env vars are absent (local dev).
Database Queries
All data fetched in a single Prisma query — no N+1 queries:

publications (PUBLISHED only, ordered by createdAt desc)
forumPosts (last 5)
forumReplies (last 5, with nested post info)
bookmarks (last 5, with nested publication info)
events (authored, ordered by date desc)
eventRegistrations (with nested event info)
_count { bookmarks } (total count)
Acceptance Criteria
Real contributions list — derived from publications + forumPosts
Bookmark count + most recent 5 bookmarks shown
Forum activity compact thread list (last 5, threads + replies combined)
Events: registered + authored
404 if username doesn't exist
Testing
pnpm run lint — ✅ 0 errors, 0 warnings
Profile renders correctly for existing usernames
/members/unknown-user correctly returns the 404 page
Related
Closes ISSUE-037
Spec: project-description.md — Feature #37
Schema: prisma/schema.prisma

@CYNTHia-com CYNTHia-com self-assigned this Jun 18, 2026
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
rjscommunity Ready Ready Preview, Comment Jun 18, 2026 10:14am

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