Sitemaps (SEO) — Technical Reference
Server-generated data that powers the public XML sitemaps and robots.txt for search-engine indexing of profiles, posts, and hashtag pages. There's no user-facing UI — this is infrastructure consumed by Next.js at build/request time.
Where this lives
Backend
apps/backend/graphql/types/sitemap.type.js—SitemapCounts,SitemapProfileEntry,SitemapPostEntry,SitemapHashtagEntry; queriessitemapCounts/sitemapProfiles/sitemapPosts/sitemapHashtags.apps/backend/graphql/resolvers/sitemap.resolver.js
Frontend
apps/frontend-nextjs/src/app/sitemap.ts— Next.jsgenerateSitemaps()usessitemapCountsto decide how many sitemap shards to emit (Google caps a single sitemap file at 50,000 URLs), then pulls each shard's URLs via the paginated queries.apps/frontend-nextjs/src/app/robots.ts—robots.txt.
GraphQL
type SitemapCounts { profiles: Int! posts: Int! hashtags: Int! }
type SitemapProfileEntry { username: String! updatedAt: DateTime! }
type SitemapPostEntry { id: ID! updatedAt: DateTime! }
type SitemapHashtagEntry { name: String! updatedAt: DateTime! }
type Query {
"Totals per section — used to compute how many 50k-URL sitemap shards to generate."
sitemapCounts: SitemapCounts!
sitemapProfiles(limit: Int, offset: Int): [SitemapProfileEntry!]!
sitemapPosts(limit: Int, offset: Int): [SitemapPostEntry!]!
sitemapHashtags(limit: Int, offset: Int): [SitemapHashtagEntry!]!
}
Each entry carries an updatedAt so the emitted <url><lastmod> reflects real content freshness. Pagination (limit/offset) lets the frontend page through large sets one shard at a time.