Skip to content

Commit 4b9391b

Browse files
committed
feat(seo): add robots, sitemap, llms.txt and full metadata
Add title template, OG/Twitter tags, canonical, and WebApplication JSON-LD. robots.txt disallows the Spotify-auth-gated routes (dashboard, top-tracks, top-artists, profile, callback), which show no content without a session.
1 parent cea9617 commit 4b9391b

5 files changed

Lines changed: 150 additions & 3 deletions

File tree

app/layout.tsx

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,76 @@ import { ThemeProvider } from '@/components/ThemeProvider';
55

66
const inter = Inter({ subsets: ['latin'] });
77

8+
const siteUrl = 'https://spotify-stats-orcin.vercel.app';
9+
const siteDescription =
10+
'Discover your music taste with detailed Spotify statistics: top tracks and artists across time ranges, listening habit insights, and wallpapers generated from album covers.';
11+
812
export const metadata: Metadata = {
9-
title: 'SpotifyStats - Your Music Analytics Dashboard',
10-
description: 'Discover your music taste with detailed Spotify statistics, top tracks, artists, and personalized insights.',
11-
keywords: 'spotify, music, analytics, dashboard, statistics, top tracks, artists',
13+
metadataBase: new URL(siteUrl),
14+
title: {
15+
default: 'SpotifyStats - Your Music Analytics Dashboard',
16+
template: '%s | SpotifyStats',
17+
},
18+
description: siteDescription,
19+
keywords: [
20+
'spotify stats',
21+
'spotify analytics',
22+
'top tracks spotify',
23+
'top artists spotify',
24+
'spotify dashboard',
25+
'music analytics',
26+
'spotify wrapped alternative',
27+
'spotify listening habits',
28+
],
29+
authors: [{ name: 'Breno Alvim', url: 'https://github.com/obrenoalvim' }],
30+
creator: 'Breno Alvim',
31+
alternates: { canonical: '/' },
32+
openGraph: {
33+
type: 'website',
34+
locale: 'en_US',
35+
url: siteUrl,
36+
siteName: 'SpotifyStats',
37+
title: 'SpotifyStats - Your Music Analytics Dashboard',
38+
description: siteDescription,
39+
},
40+
twitter: {
41+
card: 'summary_large_image',
42+
title: 'SpotifyStats - Your Music Analytics Dashboard',
43+
description: siteDescription,
44+
creator: '@obrenoalvim',
45+
},
46+
robots: {
47+
index: true,
48+
follow: true,
49+
googleBot: { index: true, follow: true, 'max-snippet': -1 },
50+
},
51+
};
52+
53+
const jsonLd = {
54+
'@context': 'https://schema.org',
55+
'@type': 'WebApplication',
56+
name: 'SpotifyStats',
57+
url: siteUrl,
58+
applicationCategory: 'MultimediaApplication',
59+
operatingSystem: 'Web',
60+
browserRequirements: 'Requires a modern browser with JavaScript enabled',
61+
description: siteDescription,
62+
featureList: [
63+
'Top tracks and artists across time ranges',
64+
'Listening habit insights',
65+
'Wallpapers generated from album covers',
66+
'Spotify OAuth2 login',
67+
],
68+
offers: {
69+
'@type': 'Offer',
70+
price: '0',
71+
priceCurrency: 'USD',
72+
},
73+
author: {
74+
'@type': 'Person',
75+
name: 'Breno Alvim',
76+
url: 'https://github.com/obrenoalvim',
77+
},
1278
};
1379

1480
export default function RootLayout({
@@ -18,6 +84,12 @@ export default function RootLayout({
1884
}) {
1985
return (
2086
<html lang="en" suppressHydrationWarning>
87+
<head>
88+
<script
89+
type="application/ld+json"
90+
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
91+
/>
92+
</head>
2193
<body className={inter.className}>
2294
<ThemeProvider
2395
attribute="class"

public/humans.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* TEAM */
2+
Developer: Breno Alvim
3+
Site: https://github.com/obrenoalvim
4+
5+
/* SITE */
6+
Last update: 2026-07-04
7+
Language: English
8+
Doctype: HTML5
9+
Components: Next.js, TypeScript, Tailwind CSS, Radix UI, shadcn/ui

public/llms.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SpotifyStats
2+
3+
> Music analytics dashboard for Spotify — explore your top tracks and artists across time ranges, listening habit insights, and wallpapers generated from album covers.
4+
5+
## Features
6+
7+
- Top tracks and top artists across short/medium/long time ranges
8+
- Listening habit insights and stats
9+
- Wallpapers generated from album cover art
10+
- Spotify OAuth2 login (no password stored)
11+
12+
## Stack
13+
14+
Next.js, TypeScript, Tailwind CSS, Radix UI, shadcn/ui. Client-side only, talks directly to the Spotify Web API.
15+
16+
## Links
17+
18+
- Repository: https://github.com/obrenoalvim/spotifyStats
19+
- App: https://spotify-stats-orcin.vercel.app
20+
21+
## Notes for crawlers
22+
23+
`/dashboard`, `/top-tracks`, `/top-artists`, `/profile`, and `/callback` require an authenticated Spotify session and show no content without one — see `robots.txt`.

public/robots.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
User-agent: *
2+
Allow: /
3+
Disallow: /dashboard
4+
Disallow: /top-tracks
5+
Disallow: /top-artists
6+
Disallow: /profile
7+
Disallow: /callback
8+
9+
# AI search bots — allow crawling for citation and indexing
10+
User-agent: GPTBot
11+
Allow: /
12+
13+
User-agent: ChatGPT-User
14+
Allow: /
15+
16+
User-agent: PerplexityBot
17+
Allow: /
18+
19+
User-agent: ClaudeBot
20+
Allow: /
21+
22+
User-agent: anthropic-ai
23+
Allow: /
24+
25+
User-agent: Google-Extended
26+
Allow: /
27+
28+
User-agent: Bingbot
29+
Allow: /
30+
31+
# Block training-only crawlers
32+
User-agent: CCBot
33+
Disallow: /
34+
35+
Sitemap: https://spotify-stats-orcin.vercel.app/sitemap.xml

public/sitemap.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3+
<url>
4+
<loc>https://spotify-stats-orcin.vercel.app/</loc>
5+
<changefreq>monthly</changefreq>
6+
<priority>1.0</priority>
7+
</url>
8+
</urlset>

0 commit comments

Comments
 (0)