Search & discovery
Sitemap Page
Generated from docs/plan/core/sitemap-page/PLAN.md in the AstroBaaS repository. Nothing described below is implemented — it is the written plan for it.
Sitemap Page is a core feature that auto-generates a user-facing sitemap page (/sitemap, /pages/sitemap). It lists all products, categories, pages, and blog posts organized by type.
The problem
Customers and search engines get lost navigating large sites; there’s no way to find pages.
What it does
- Auto-generate HTML sitemap page with all products, categories, pages, blogs organized by type
- Clickable links to each product/category/page/blog with search bar on sitemap
- Pagination: 50 items per page, navigate with next/prev
- XML sitemap link at top of HTML sitemap
- Mobile-responsive layout with SEO-friendly HTML structure
- Admin setting: enable/disable sitemap page, auto-link from footer
What it deliberately does NOT do
Each boundary carries its reason. A boundary without a reason gets crossed by the next person who reads this.
- Does NOT show internal site statistics (reason: analytics feature)
- Does NOT support custom sitemap grouping (reason: standard type-based)
- Does NOT include comments or UGC (reason: not discoverable)
Data model
No new tables (derived from existing products, categories, pages, blogs). New field: settings.sitemap_page_enabled (bool, default: true).
API
- GET /api/sitemap-page
- GET /api/sitemap-page?search=shirt&type=products
Every route added here must also appear in src/pages/openapi.json.ts — a test
fails the build if it does not.
Admin
Settings (enable/disable, grouping); preview showing sitemap page render; auto-link button adding to footer menu.
The seam — why this is core
Core owns: sitemap page generation, API, admin UI. Frontend owns: HTML rendering, styling, search handling.
Core owns the interface + honest sitemap generator; navigation pages are infrastructure, not a per-country obligation or credential.
Dependencies
- Assumes product, category, page, blog_post APIs exist
Acceptance checks
Each of these must be able to fail. Before claiming this is done, break the code deliberately and watch each one go red.
- Sitemap page lists 50+ products on first load (paginated)
- Products organized by category or type
- Sitemap includes search bar to filter products
- Pagination shows next/prev buttons
- All links clickable and point to correct product/page/blog
- Mobile-responsive
- XML sitemap link present at top
- Can be disabled via admin setting
- All storage drivers generate identical sitemaps
Risks
Performance: 100k+ products causes slow rendering. Search scope confusing (products only, not full-text). Schema migration: sitemap API expensive to compute.
Commercial context
| Suggested price | free (core) |
| Rival anchor | Shopify: included; Magento: included |
The anchor is what the nearest equivalent charges on Shopify or Magento today. It is context for a pricing decision, not the decision.
Generated from the commerce plan. See docs/COMMERCE-PLAN.md for the full
catalogue and ../../AI-GUIDE.md for how to work on this repository.