On this page
  1. Install
  2. Serve pre-generated documents
  3. Stream inline documents
  4. Error behavior
  5. Boundary
  6. API entry points and requirements
  7. Peer dependencies

@playstack/feeds-next

Next.js App Router request handlers for Playstack feeds using Web platform primitives.

Pro. Covered by the Playstack Pro License. Registry access is required; check preview availability before installing. See package access.

@playstack/feeds-next exposes generated or inline feed documents through Next.js App Router-compatible handlers using only Web Request, Response, and stream APIs.

Install

After confirming preview access, install the package at your application's shared Playstack version:

sh
npm install --save-exact @playstack/feeds-next@0.1.0-beta.1

Check the peer requirements below before choosing a runtime or provider.

Serve pre-generated documents

ts
import { createGeneratedDocumentRoute } from '@playstack/feeds-next'

const route = createGeneratedDocumentRoute({
  storage: feedsStorage,
  namespace: 'marketing',
  path: 'sitemap.xml',
  mode: 'auto',
  onError: (error) => errors.captureError(error),
})

export { route as GET, route as HEAD }
Generated route propertyPurpose
storage, namespace, pathSelects a committed generated document.
modeauto, proxy, or redirect.
redirectAboveBytesOverrides the core 5 MiB auto threshold.
onErrorIsolated storage/stream observer.

path may be a resolver. pathFromParam(name, { prefix?, suffix? }) supports both direct and promised dynamic params used across Next versions while retaining core path validation.

Stream inline documents

ts
import { createInlineFeedRoute } from '@playstack/feeds-next'

export const GET = createInlineFeedRoute({
  format: 'rss',
  definition: (request) => feedForHost(request.headers.get('host')),
  entries: () => streamPublishedPosts(),
  content: 'full',
  cacheControl: 'public, max-age=60',
  onError: reportStreamFailure,
})

Inline feed options accept format, static or request-scoped definition, async entry source, full/excerpt mode, structured extensions, cache control, and error observer. createInlineSitemapRoute accepts the entry source, cache control, URL/byte ceilings, and observer. HEAD returns normal headers without invoking the entry source.

Error behavior

Traversal-like or missing dynamic paths return 400; missing manifests/documents return 404; retryable storage failures return 503 with Retry-After: 60; unsupported methods return 405; other pre-response failures return 500. After streaming begins, failures reject the body stream and reach onError because status and headers can no longer change.

Boundary

There is deliberately no next runtime or peer dependency. The application supplies generation, entries, storage, cache policy, and route placement; @playstack/feeds owns validation and serving semantics.

API entry points and requirements

Reference snapshot: @playstack/feeds-next@0.1.0-beta.1. Import only the entry point your runtime needs. Paths below are relative to the installed package; use Go to Definition in your editor to inspect exact parameters, return types and overloads. Do not import the declaration-file paths directly.

Public entry pointDeclaration file
@playstack/feeds-next./dist/index.d.ts
@playstack/feeds-next/package.jsonNo TypeScript declaration (asset or metadata export).

Node.js engine requirement: >=20. This is not a claim that every entry point works in browsers or Workers.

Peer dependencies

Keep existing framework versions that satisfy these ranges. Install optional peers only when using the corresponding adapter. The package manager resolves ordinary dependencies separately.

PeerCompatible rangeWhen needed
@playstack/feeds0.1.0-beta.1Required by the package.

For a complete first program, start with Getting started. For API lookup and partial-example conventions, see Reading the reference. Provider failures, lifecycle requirements and application responsibilities remain described in the guide above; types alone do not establish production safety.

Go

Playstack Pro tag
OriginsPricingBlogNewsletterChangelogStatusRoadmap
ContributorsCommunityIn Use ShowcaseCase StudiesPartnersSponsors
FAQsSupportContact

© 2026 Playstack. All rights reserved.

With OSS
Terms of ServicePrivacy PolicyCookie PolicyImprint

By

Commune Software