motir.co serves /explore and /explore/topic/[slug] — the project square against /api/public/explore + /api/public/categories
Opened by Zhu Yue ·
Type: code · Executor: coding_agent · Repo: motir-marketing · ONE PR.
Render the project square on motir.co — the surface that moved out of motir-core (Story 8.4) — against the public read API, not a second database reader.
What it consumes
/api/public/explore and /api/public/categories — motir-core's anonymous contract. Both make ZERO getSession() calls (explore/route.ts's own comment: "NOT session-gated: a logged-out visitor / crawler reads it … deliberately no getSession() call"). They are exactly the contract this story consumes. Read motir-core/app/(public)/explore/ for BEHAVIOUR, do not port its data layer.
Scope
/explore— the square: its ranked tabs, the project cards, matching the shipped behaviour./explore/topic/[slug]— the topic landing pages, reachable from the crawl links.- The empty state (no public projects) and the error state (API unreachable) — the API is now a network hop, so failure is a real state, not a theoretical one; both are asserted.
- The crawl surface:
robots.txtandsitemap.xmlentries for these surfaces, canonicals, and the entity JSON-LD whose SearchAction targets a search THIS host serves. - Internalise the Explore nav item and footer link —
EXPLOREinlib/destinations.tsbecomes/explore(same-origin,next/link), matching MOTIR-3880's chrome and the pattern MOTIR-4009 set forLEGAL_*.
Boundary
- It composes MOTIR-3880's chrome; it redraws none of it.
- It does not touch
/p/*(MOTIR-3877's). - It reads no database and adds no Prisma client / connection string (asserted, the standing repo rule).
Acceptance criteria
/exploreand/explore/topic/[slug]render onmotir.counder one chrome, matchingdesign/public-site/(MOTIR-3880) — layout, states and the primitives it names.- Every read of project data goes through
/api/public/*. No database client, no Prisma import and no connection string appears in this repository — asserted by a test. - The empty, loading and error states are implemented for every API-backed surface, and the error state is asserted.
EXPLOREinlib/destinations.tsis same-origin;tests/destinations.test.tsasserts it.robots.txt/sitemap.xml/ canonicals / JSON-LD list these surfaces and nothing that lives elsewhere.pnpm lint · format:check · typecheck · build · testpass; AA contrast holds in both themes.
Discussion
No comments yet.
Adding to this discussion signs you in on app.motir.co and brings you back to this request.