Skip to content

[meta-vite] Productionize the Presentation stack across runtime adapters #828

Description

@kang-heewon

Summary

Presentation layer를 다음 버전에서 실제 배포 가능한 surface로 승급한다.

@croco/meta-vite는 Croco의 SSR engine으로 문서화되어 있고 SSR, SSG, ISR, RSC, server actions, API co-location, runtime adapters를 제공한다. 동시에 README에는 React-only, Vite 6+, non-durable default ISR, Cloudflare streaming/cache caveat, RSC dev reload 등의 제한도 명시되어 있다. 이번 이슈의 목표는 이 제한들을 production readiness checklist와 adapter smoke로 전환하는 것이다.

Evidence

  • packages/meta-vite/README.md:1-4 describes @croco/meta-vite as Croco's SSR engine.
  • packages/meta-vite/README.md:11-17 documents Vite 6+/React 19+ and optional Redis ISR.
  • packages/meta-vite/README.md:19-28 lists SSR, RSC, SSG, ISR, API co-location, server actions, provider adapters, and Vite plugin features.
  • packages/meta-vite/README.md:123-136 documents route modes and adapters.
  • packages/meta-vite/README.md:138-144 documents current limitations.
  • packages/meta-vite/src/libs/isr/createIsrHandler.ts:3-7 states the current ISR handler is v1 exact-key TTL-only with no pattern invalidation or durable storage.
  • packages/meta-vite/src/libs/isr/types.ts:3-23 defines the exact-key TTL-only cache adapter contract and in-memory caveat.
  • packages/meta-vite/src/tests/route-registry.spec.ts:13-70 covers SSR/SSG/ISR/RSC route registration.
  • packages/meta-vite/src/tests/server-action.spec.ts:22-80 covers server action dispatch/validation.
  • README.md:422-426 shows Presentation package maturity levels: frontend-react alpha, meta-vite beta, frontend-cloudflare alpha, frontend-vite alpha, presentation-preset beta.

Tasks

  • Define a supported deployment matrix.
    • Cover Node, Lambda, and Cloudflare Workers.
    • For each runtime, state support level for SSR, SSG, ISR, RSC, server actions, API routes, streaming, and cache persistence.
  • Harden ISR behavior.
    • Either add tag/pattern invalidation or explicitly keep v1 as exact-key TTL-only and document the migration path.
    • Add durable cache tests/docs for Redis or the supported durable adapter.
  • Production-pass the Cloudflare adapter.
    • Verify streaming behavior, isolate-safe cache configuration, env/service binding access, and API route dispatch.
  • Production-pass the Lambda adapter.
    • Verify buffered response limitations, telemetry/flush constraints, and request context propagation.
  • Add generated fullstack smoke coverage.
    • Generated meta-vite app should build and run at least one page route, one API route, one server action, and one ISR route in supported runtime profiles.
  • Add build output contract validation.
    • Use presentation-preset or a dedicated verifier to assert generated output shape.
  • Decide maturity promotions.
    • Define exact criteria for moving frontend-react, frontend-cloudflare, and frontend-vite from alpha to beta.

Acceptance Criteria

  • Runtime support matrix is explicit and reflected in docs/package catalog.
  • ISR limitations are either fixed or documented as a stable v1 contract with tests.
  • Cloudflare and Lambda adapter smoke tests cover the runtime-specific behavior they claim to support.
  • Generated app smoke catches broken page/API/server-action/ISR integration.
  • No presentation package is promoted without passing documented criteria.

Suggested Validation

  • pnpm test --filter=@croco/meta-vite
  • pnpm test --filter=@croco/frontend-cloudflare
  • pnpm test --filter=@croco/frontend-vite
  • pnpm test --filter=@croco/presentation-preset
  • pnpm test --filter=create-croco-app
  • pnpm typecheck

Non-goals

  • Do not add a second SSR engine.
  • Do not claim full RSC/runtime support where adapter tests do not prove it.
  • Do not make in-memory ISR appear durable in production docs.

Metadata

Metadata

Assignees

Labels

P1Priority 1 issuearchitectureArchitecture and module boundary issuesenhancementNew feature or requestfeatureProduct feature or roadmap capability

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions