Skip to content

feat: Add page metadata (title + description) to all public routes for SEO #60

Description

@JamesVictor-O

Problem

Only 2 out of 10+ pages have proper SEO metadata:

  • `app/layout.tsx` — root metadata (used as fallback)
  • `app/explore/page.tsx` — has custom `title` and `description`

Every other page inherits the generic root title "AdsBazaar | Creator campaigns on Stellar". This means:

  • Google search results show the same title for every page
  • Social media link previews (Open Graph) show generic text
  • Browser tabs all say the same thing — users can't distinguish between tabs

Pages Missing Metadata

Route Current Title Suggested Title
`/marketplace` (root fallback) "Marketplace — AdsBazaar"
`/marketplace/[id]` (root fallback) "{Campaign Name} — AdsBazaar Marketplace"
`/dashboard/creator` (root fallback) "Creator Dashboard — AdsBazaar"
`/dashboard/creator/campaigns` (root fallback) "My Campaigns — AdsBazaar Creator"
`/dashboard/creator/analytics` (root fallback) "Analytics — AdsBazaar Creator"
`/dashboard/creator/inventory` (root fallback) "Inventory — AdsBazaar Creator"
`/dashboard/creator/payouts` (root fallback) "Payouts — AdsBazaar Creator"
`/dashboard/creator/settings` (root fallback) "Settings — AdsBazaar Creator"
`/dashboard/business` (root fallback) "Business Dashboard — AdsBazaar"
`/dashboard/business/campaigns` (root fallback) "Campaigns — AdsBazaar Business"
`/dashboard/business/analytics` (root fallback) "Analytics — AdsBazaar Business"
`/dashboard/business/payouts` (root fallback) "Payouts — AdsBazaar Business"
`/dashboard/business/settings` (root fallback) "Settings — AdsBazaar Business"

How to Add

For Server Components (most pages), add a `metadata` export:

```tsx
import type { Metadata } from "next";

export const metadata: Metadata = {
title: "Marketplace — AdsBazaar",
description: "Browse globally funded marketing campaigns secured by smart-escrow on Stellar.",
};
```

For Client Components (pages with `"use client"`), metadata exports are not supported. Instead, use the Next.js `template` pattern in the parent layout:

```tsx
// app/dashboard/creator/layout.tsx
export const metadata: Metadata = {
title: { template: "%s — AdsBazaar Creator", default: "Creator Dashboard — AdsBazaar" },
};
```

This way, any child page that exports `title: "Analytics"` will render as "Analytics — AdsBazaar Creator" in the browser tab.


Acceptance Criteria

  • Every public page (`/marketplace`, `/explore`) has unique title + description
  • Dashboard layout files use the `template` pattern for child pages
  • Each dashboard page has a meaningful title visible in the browser tab
  • No two pages share the exact same title
  • `pnpm --filter frontend build` succeeds (metadata must be in Server Components or layouts)
  • Verify by opening 3+ pages in tabs and confirming each tab has a distinct title

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignenhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions