Repository navigation
Description
Summary
docs/embedding.md is the host-facing contract, and it never says what a host should put in its
<head>. Since sydevs/SahajCloud#769 merged, GET /api/atlas/seo answers every route the
widget can mount with — the atlas root included — so the rule is finally writable: a page's
metadata describes the atlas route the widget mounted with, and that endpoint supplies it.
The blocker is cleared. What is left is documentation in this repo. No widget code changes.
What shipped upstream (verified against the SahajCloud checkout at 4847641)
sydevs/SahajCloud#739, closed 2026-09-12 by sydevs/SahajCloud#769:
- The root answers.
parseAtlasRoutereturns{ kind: 'root' }when the segment list is
empty once reserved words are dropped —src/endpoints/atlas/seo/atlasRoute.ts:121-123. - Eleven reserved segments, not the five this ticket named.
search,calendar,filters,
register,share,online,preview, plus the legacy prefixesevents,areas,regions,
venues(atlasRoute.ts:31-42). So/events/areasresolves to the root too. The doc must state
the rule, not a list of five. - The root document:
type: 'root',id: null,route: '/', emptybreadcrumbs, aWebSite
JSON-LD node and noBreadcrumbList(seoDocument.ts:458-493). - The copy is operator-written, on a new
seogroup ofsy-atlas-translations.titleis
seo.root_title, then that same locale'scommon.chrome.widget_label, then English, then
the constantFree Meditation Classes.descriptionnever falls back — a locale without one
getsnull(rootStrings.ts). - ⚠ Nobody has written that copy yet, and it is now somebody's job: no seed carries a
seo
group (seeds/sy-atlas-translations/data.*.json), so today every locale's root title is its own
common.chrome.widget_label—Kostenlose Meditationskursein German — anddescriptionis
nulleverywhere. Filed as feat(translations): seed atlas landing-page SEO copy in ten locales SahajCloud#778. The doc must therefore state the rule, not
today's snapshot — see Approach 3. - The root's
canonicalis the caller's own verified mount page, read off itsclients
record, falling through to the We Meditate surface when the caller can publish none
(index.ts:140-163). It is therefore per-API-key: two hosts asking for/get different
canonicals, by design. - The response is edge-cacheable, and cheap for a host to cache too.
publicReadCacheHeaders(req, ['events', 'regions'])(index.ts:469) emits
Cache-Control: public, max-age=300, s-maxage=300,Vary: Authorizationand
Cache-Tag: events,regions— 300s because a custom endpoint inherits the lowest TTL of the
collections it reads, andeventsis 300 (src/plugins/cache/policy.ts). - 400 vs two 404s. An empty or over-512-character
routeis a 400 from the query schema
(index.ts:100). A route carrying?,#or whitespace, or over twelve segments, is
404 "That is not a valid atlas route."(index.ts:456). A well-formed route naming no row is
404 "That route does not name a region or an event." - Auth is
requireActiveClient— a publishedclientsAPI key, sent as
Authorization: clients API-Key <key>, the same header the widget itself sends
(src/config/api/client.ts:42).
Approach
Prose only. Nothing under src/ changes, and no test is added.
- A new section in
docs/embedding.md, between## The URL(docs/embedding.md:497) and
## Content-Security-Policy(:538), with an entry in the Contents list (:109-124).
State the rule first — your page's metadata describes the atlas route the widget mounted
with: theatlasparameter on the script URL (:143), or the pathname underrouting=path
(:230). Then three worked examples, each copied from a real response:- a region route —
?route=/gb/london - the root —
?route=/, the ordinary "here is our class finder" page - a bare view route —
?route=/search, which answers with the root's document and a
normalizedroute: '/'
- a region route —
- Say how to call it, and say to cache it. The URL, the API key header,
locale, and that
jsonLdarrives already serialized and escaped — emit it verbatim, do not re-escape. Name the
400/404 split so a host can tell "you sent nonsense" from "no such city". Then the caching
advice, decided by @Ardnived on 2026-09-13:- Fetch it on your server, at render time, behind your own cache —
<head>metadata has to
be in the HTML a crawler receives, so a browser fetch is not an option. - Cache for up to 300 seconds, keyed by route and locale. That is the endpoint's own
max-age. Vary: Authorizationcosts you nothing. The key is your site's own published client key,
not a visitor's credential, so it never varies between your visitors — one cached variant per
site, not one per user. Say this explicitly: the header otherwise reads as "do not cache".
- Fetch it on your server, at render time, behind your own cache —
- Say what a host that ignores it writes instead, and state the
descriptionrule rather
than today's snapshot: a locale with no operator copy returnsdescription: null, and a host
that getsnullsupplies its own one-line description in its own language, plus a
self-referencing<link rel="canonical">on the mounted URL. Tie this to the canonical embed
record the doc already describes (:244-245,:286). ⚠ Do not write "every locale is
nulltoday" — feat(translations): seed atlas landing-page SEO copy in ten locales SahajCloud#778 fills that copy, and the sentence would be stale on the
day it merges. The rule is true before and after. - The CSP table does not change — say so. A host fetches this from its own server, so no
directive covers it, andcloud.sydevelopers.comis already inconnect-src(:543-551) for
the widget's own reads. This settles the "update the CSP table" item this ticket used to carry. CHANGELOG.mdgets an### Addedentry under## [Unreleased](CHANGELOG.md:19), per
the repo rule that it anddocs/embedding.mdmove together.
Acceptance criteria
-
docs/embedding.mdstates that page metadata describes the mounted route, with worked
examples for a region route, the root, and a bare view route. - It names
GET /api/atlas/seo, its auth header, itslocaleparameter, and thatjsonLdis
emitted verbatim. - It states the rule for which routes answer as the root, covering all eleven reserved
segments rather than the five #739 named. - It says to fetch server-side and cache for up to 300s per route and locale, and explains
thatVary: Authorizationmeans one variant per site, not one per visitor. - It says the root's
canonicalis the caller's own verified mount page, and what a caller
owning none receives. - It says
descriptionisnullin a locale with no copy, and what the host writes instead —
stated as a rule, with no claim about how many locales are empty right now. - It distinguishes the 400 from the two 404s.
- It states that the CSP table is unchanged, and why.
-
CHANGELOG.mdcarries a host-visible entry under## [Unreleased]. - The Contents list carries the new section.
- No file under
src/changes.
Verification checklist
-
grep -n "atlas/seo" docs/embedding.md CHANGELOG.md— both files hit. -
grep -n "max-age=300\|Vary" docs/embedding.md— the caching advice is present. - The new
##heading appears in the Contents list atdocs/embedding.md:109-124, spelled
identically to the heading. -
git diff --name-only mainlists onlydocs/embedding.mdandCHANGELOG.md. -
pnpm lint && pnpm typecheck && pnpm test:run— the lean gate, green. - With a published client key against SahajCloud:
curl -i -H "Authorization: clients API-Key $KEY" "https://cloud.sydevelopers.com/api/atlas/seo?route=/&locale=en"
returns 200 with"type":"root","id":null,"route":"/", and response headers
Cache-Control: public, max-age=300, s-maxage=300andVary: Authorization. - The same call with
route=/searchreturns the same document,routestill/. - The same call with
locale=dereturns a Germantitle; note whetherdescriptionis
nullat the time of writing, but do not put that count in the doc. -
route=returns 400;route=/gb/london?x=1returns 404"That is not a valid atlas route.";
route=/no-such-cityreturns 404"That route does not name a region or an event." - Every worked example in the doc is pasted from one of those responses, not written by hand.
Open questions
- Serve the root metadata, or document what each host must write? — serve it, decided by
@Ardnived on 2026-09-08 and shipped in feat(api):/api/atlas/seoanswers the atlas root and bare view routes SahajCloud#769. - Where the ten translations live —
sy-atlas-translations, notsy-atlas-config, as the
seogroup. - Does the CSP table change? — no. The host fetches this from its own server.
- Who writes
seo.root_titleandseo.root_description, in ten locales? — a SahajCloud
PR fills the seed data, decided by @Ardnived on 2026-09-14. Filed as
feat(translations): seed atlas landing-page SEO copy in ten locales SahajCloud#778. It does not block this ticket: the doc states thenullrule, which
holds before and after that copy lands. - Per-render fetch, or cached? — cached, decided by @Ardnived on 2026-09-13. A
client'sAuthorizationis its own key and never varies per end user, soVarysplits the
cache per site, not per visitor. Written up in Approach 2.
Downstream impact
- feat(translations): seed atlas landing-page SEO copy in ten locales SahajCloud#778 — fills the root copy the seeds are missing. Independent of this
ticket in both directions. - feat(seo): supply the atlas root view's metadata by default, with an opt-out SahajAtlasWordpress#16 — the plugin supplies this by default, with an opt-out.
feat(api):/api/atlas/seoanswers the atlas root and bare view routes SahajCloud#769 records thatincludes/seo.phpreturns early for/today, so the root
view keeps the host's own metadata until that plugin adopts therootvariant.
⚠ Not verified here: this session's GitHub access does not reach that repository. - Nothing changes in the widget, so no host changes its embed snippet.
Notes
Blocked by: sydevs/SahajCloud#739 — cleared. Closed 2026-09-12 by
sydevs/SahajCloud#769. Kept as the record of what this waited on.
- ⚠ The endpoint's docblock contradicts itself about the title fallback:
src/endpoints/atlas/seo/index.ts:421-424still says the title "falls back to English and then
to a constant", whilerootStrings.tsand SahajClouddocs/architecture.md:56say it exhausts
the locale first. The shipped code matches the second. Write this repo's doc from the code — the
docblock is worth a one-line SahajCloud fix, now carried by feat(translations): seed atlas landing-page SEO copy in ten locales SahajCloud#778. - Why this was worth fixing rather than leaving to each host. The root view is the most
linkable URL of the set: it is the page a host links from its own nav, and it is where this
document already sends people — the compact card's new-tab fallback is documented as going to
wemeditate.com/map(docs/embedding.md:493). A destination the docs name should not be the one
destination with no metadata guidance. - Observed on feat(map): server-rendered atlas routes under /map, plus sitemap and robots (C4) WeMeditateWeb#62 (C4), which mounts
/mapwithatlas=/: the page
inherits the global site title and description and emits no canonical, so/mappresents to a
crawler as a duplicate of the site's homepage. Every region and class page under it is correctly
described; only the entry point is not. C5, the WordPress plugin behind 13 of 29 client domains,
hits the same thing with far less room to work around it. - The deciding constraint was translation. Whoever writes the root metadata writes it in ten
languages — the same constraint that made feat(api): serve SEO metadata for an atlas route (C3) SahajCloud#646 returndescription: nullfor
regions rather than invent an English sentence. - Verified in this repo:
grep -rn "atlas/seo" src/ docs/ CHANGELOG.mdreturns nothing, and every
existing mention of "canonical" indocs/embedding.mdis about the client record's canonical
embed or the widget's share links — never the page's own metadata. - Related: feat(api): serve SEO metadata for an atlas route (C3) — blocks the WordPress plugin and WeMeditateWeb SSR SahajCloud#645 / #646 (the C3 endpoint and the 404-on-root decision #739
reversed); feat(map): let map mode be contained by an element, not only the viewport #170 (contained map mode, which makes an in-layout root view ordinary for a host).
🤖 Written by the sydevs autonomous loop — see what this is
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsDone
Activity
Ardnived commentedon Sep 6, 2026
The metadata for all route URLs should be supplied by the SahajCloud server via
GET /api/atlas/seo. Client sites are free to ignore this and embed their own metadata, butSahajAtlasWordpressshould supply it by default (maybe with a configuration option to disable it).@sydevs-bot Clarify this ticket and create appropriate tickets to provide the needed functionality from
SahajCloudand an appropriate follow-up ticket inSahajAtlasWordpress. Use thedraft-ticketskill.sydevs-bot commentedon Sep 8, 2026
Both tickets filed; the decision is in the body. #173 keeps the
docs/embedding.mdwork only, blocked on the endpoint so the prose describes real behaviour./api/atlas/seoanswers the atlas root and bare view routes SahajCloud#739 — the endpoint answers/and the bare view routes.parseAtlasRoutereturnsnullon an empty segment list (atlasRoute.ts:104) andindex.ts:391makes that the 404.RESERVED_SEGMENTSstripssearch/calendar, so a bare view route 404s identically.Both
Proposed, unassigned.⚠ Two calls are yours.
rootSeogroup onsy-atlas-config, orsy-atlas-translations, which #706 is rewriting now. I lean the config global. On #739.⚠ Native
Blocked byrelationships are unset — a routine reaches no tool that writes them.🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
feat(api): `/api/atlas/seo` answers the atlas root and bare view rout…
Ardnived commentedon Sep 13, 2026
@sydevs-bot Revise this ticket based on recent updates to the code in
SahajCloud#769and possibly in other tickets11 remaining items
sydevs-bot commentedon Sep 14, 2026
Both answers are now in the body.
Authorizationis your site's own key, soVary: Authorizationsplits the cache per site, not per visitor. Approach 2.seogroup in the ten locale seeds. Comment@sydevs-bot implementthere to start the PR you asked for. This handler writes prose only.One criterion changed as a result: the doc states the
description: nullrule, not "every locale is empty today" — sydevs/SahajCloud#778 makes that sentence false the day it merges.Verified this run: the response carries
Cache-Control: public, max-age=300, s-maxage=300andVary: Authorization(seo/index.ts:469,plugins/cache/policy.ts).Title, type and Effort (Easy) unchanged. Comment
@sydevs-bot implementto start this ticket.🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
sydevs-bot commentedon Sep 14, 2026
@Ardnived unblocked: every blocker is closed. Say
@sydevs-bot implementto start.🤖 sydevs dispatcher
Ardnived commentedon Sep 14, 2026
@sydevs-bot implement
docs(embedding): document the head metadata a host writes per atlas r…