feat(web): implement public profile page with Open Graph meta tags for /u/:username#345
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a public, unauthenticated “shareable profile” surface by introducing a backend endpoint, shared response types, and a simplified web profile page with Open Graph/SEO meta tags.
Changes:
- Added shared
PublicCardResponse/PublicCardLinktypes for the public card API. - Added backend route
GET /public/cards/:usernameto serve safe, public profile data. - Updated
/u/[username]page to render from the public API shape and emit OG/Twitter/canonical meta tags.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| packages/shared/src/types.ts | Introduces shared TS interfaces for the public card API response. |
| apps/web/src/routes/u/[username]/+page.svelte | Reworks the public profile page UI and adds OG/Twitter/canonical meta tags. |
| apps/backend/src/routes/publicCards.ts | Adds an unauthenticated public endpoint to fetch a user’s default card links. |
| apps/backend/src/app.ts | Registers the new publicCardRoutes route module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@ShantKhatri Hi! Could you please review this PR when you get a chance? |
|
@ShantKhatri @Harxhit Hi! Could you please review this PR when you get a chance? |
|
Hi @samarthsugandhi , we have moved from Svelt and have now migrated to React. It's recommended to open a PR with the new architecture. I'm happy to review your updated PR. Closing this for now. |
Summary
Implements the public-facing profile page at
/u/:usernamethat renders a user's DevCard with all platform links, and injects dynamic Open Graph meta tags so the URL generates a rich link preview when shared on Twitter/X, LinkedIn, WhatsApp, or Telegram.Closes #239
Changes Made
apps/web/src/routes/u/[username]/+page.svelte(modified)data.profileanddata.errorfrom the existing+page.server.tsload function (no changes needed there)apps/web/src/routes/u/[username]/+page.svelte— Open Graph tags addedog:title— user's display name or usernameog:description— user's bio, or a generated fallbackog:image— user's avatar URL, or the site default OG imageog:url— canonical URL for the profiletwitter:card— set tosummaryfor Twitter/X previews<link rel="canonical">— added for SEOpackages/shared/src/types.ts(modified)PublicProfileandPublicCardLinkinterfaces matching the shape returned by the backendHow to Test
pnpm devfrom the repo roothttp://localhost:5173/u/<any-seeded-username>http://localhost:5173/u/nonexistent— you should see the "Profile not found" error page<meta property="og:title">and other OG tags are present in the<head>Checklist
rel="noopener noreferrer"pnpm lintpasses with no errors+page.server.tsleft unchanged