Skip to content

feat(educators): add public educator storefront pages - #149

Merged
zeemscript merged 1 commit into
Deen-Bridge:devfrom
BountySpaghetti:feature/public-educator-storefront
Jul 26, 2026
Merged

feat(educators): add public educator storefront pages#149
zeemscript merged 1 commit into
Deen-Bridge:devfrom
BountySpaghetti:feature/public-educator-storefront

Conversation

@BountySpaghetti

Copy link
Copy Markdown
Contributor

Summary

Create shareable, logged-out-viewable educator profile pages with courses, books, spaces, follower counts, and auth-aware CTAs. Educators can now share a URL in bios, flyers, or khutbah slides.

Closes #116

What's Changed

New: /educators/[profileid] route

  • Fully public — accessible without authentication, no redirect to login
  • Server-side metadata — generateMetadata provides SEO title, description, and OpenGraph tags
  • Landing page chrome — uses Navbar/Footer from the landing page, not the dashboard sidebar
  • Tabbed content — Courses, Books, and Spaces tabs with counts
  • Privacy guard — shows designed not-found state for missing/private educator IDs

New: EducatorProfileHeader component

  • Banner + avatar, name, role, bio, joined date
  • Follower count, courses/books/spaces counts, aggregate rating
  • Share button — Web Share API on mobile, clipboard fallback on desktop
  • Follow button — auth-aware: logged-in users get real follow toggle; logged-out users redirect to /login?next=/educators/[id]
  • "Edit Profile" shown for own profile

New: Public card variants

  • PublicCourseCard — no bookmark hook, shows rating + price, links to course
  • PublicBookCard — no bookmark hook, shows rating + readers + price
  • PublicSpaceCard — no auth dependencies, shows host + duration + status
  • All cards are lightweight with zero auth dependencies

Rewired instructor links

  • courseCard.jsx — instructor avatar links to /educators/[id] instead of /account/profile/[id]
  • libraryCard.jsx — author links to /educators/[id]
  • spaceCard.jsx — host name links to /educators/[id] (new link)

Authenticated profile page update

  • /account/profile/[profileid] now shows a "View public page" link with external link icon

Acceptance Criteria

  • Logged-out visitors can view /educators/<id> — no redirect to login
  • Follow from public page bounces through login and returns to the same page
  • Instructor attribution on cards links to public page
  • Old gated /account/profile/[id] remains functional for logged-in users
  • No private fields (email, wallet, settings) appear in rendered page
  • Unknown/private educator IDs show designed not-found states
  • Page is responsive and keyboard-navigable
  • Share button copies working URL (Web Share API on mobile)
  • npm run lint and npm run build pass; CI green

- Add /educators/[profileid] public route accessible without authentication
- Add EducatorProfileHeader with avatar, bio, role, stats, follower count
- Add PublicCourseCard, PublicBookCard, PublicSpaceCard (no auth dependencies)
- Add tabbed navigation for courses, books, and spaces
- Add share button with Web Share API and clipboard fallback
- Add auth-aware follow: logged-out users redirect to /login?next=...
- Add privacy guard: shows not-found for missing/private profiles
- Rewire instructor links on courseCard, libraryCard, spaceCard to /educators/[id]
- Add 'View public page' link on authenticated profile page
- Add generateMetadata for SEO (title, description, OpenGraph)

Closes Deen-Bridge#116
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

@BountySpaghetti is attempting to deploy a commit to the Deen Bridge Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@BountySpaghetti, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 68197cfd-27cc-462f-a41e-6156065195ec

📥 Commits

Reviewing files that changed from the base of the PR and between c332319 and 7394082.

📒 Files selected for processing (10)
  • app/(pages)/educators/[profileid]/EducatorPageClient.jsx
  • app/(pages)/educators/[profileid]/page.jsx
  • app/account/profile/[profileid]/page.jsx
  • components/molecules/dashboard/cards/courseCard.jsx
  • components/molecules/dashboard/cards/educators/PublicBookCard.jsx
  • components/molecules/dashboard/cards/educators/PublicCourseCard.jsx
  • components/molecules/dashboard/cards/educators/PublicSpaceCard.jsx
  • components/molecules/dashboard/cards/libraryCard.jsx
  • components/molecules/dashboard/cards/spaceCard.jsx
  • components/organisms/educators/EducatorProfileHeader.jsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@zeemscript
zeemscript merged commit 9caf45f into Deen-Bridge:dev Jul 26, 2026
2 of 3 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