Repository navigation
Conversation
ts-rest has been unmaintained since June 2025. The reference product and
the template now define their REST API as an oRPC contract served by
oRPC's handler inside Express, so auth, webhooks and MCP are unchanged.
- @codelitdev/platform/rest keeps error bodies and the generated
OpenAPI in the platform { code, message, details? } shape, and adds
helpers for listing operation ids and writing or checking the
OpenAPI file. It has no runtime dependency on oRPC.
- Every product commits apps/api/openapi.json, generated from the
contract alone. generate:openapi writes it and check:openapi fails
CI when it is stale; the release version step regenerates it.
- platform-conformance fails a product whose committed document no
longer matches its contract (committedDocumentCurrent).
- The preset pins @orpc/* 1.16.1. ts-rest, the @anatine/zod-openapi
patch and the ts-deepmerge override are removed.
See ADR 0017.
The template's API and contract packages now both depend on @codelitdev/platform. doctor kept whichever manifest it read last, and directory read order differs by filesystem, so a vulnerable pin could be hidden and the minimumSecure test failed in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ts-rest hasn't had a release since June 2025. Hosted FrontLit serves each product's committed
apps/api/openapi.jsonat<product-website>/openapi.json, so that file has to be generated and committed as part of every release. ADR 0017 records the decision, and a survey of SendLit, FrontLit, CourseLit and MediaLit backs it up.What changes
@orpc/contract. It is served by oRPC's handler running as Express middleware. Requests the contract doesn't match fall through to the rest of the app, so auth, webhooks and MCP don't change. We keep Express and Zod 3.@codelitdev/platform/rest(new):platformErrors,encodePlatformErrorBodyandplatformErrorResponseBodySchemakeep both the runtime error body and the documented one as{ code, message, details? }. A route can also declare its own error body, as readiness does for its 503.listOperationIds,normalizeOpenApiDocument, andwriteOpenApiDocument/runOpenApiScript, used by the products' OpenAPI scripts.generate:openapibuildsapps/api/openapi.jsonfrom the contract alone, without starting the server.check:openapifails CI when the file is stale. It runs incheck:driftand in the template'scode-quality.yml.version-packagesregenerates the file, so release PRs commit it.openapi.json, so formatting doesn't make it stale.platform-conformancefails a product whose committed document no longer matches its contract.@orpc/*at 1.16.1. ts-rest, the@anatine/zod-openapipatch and thets-deepmergeoverride are removed.Breaking (minor before 1.0):
platform-conformanceadapters must now returncommittedDocumentCurrentfromopenapiDocument().Testing
bun run verifypasses: lint, preset check, typecheck, drift checks includingcheck:openapi, all package tests, build, and the packed-package checks.bun run template:smokepasses.check:openapi,check:drift, lint, typecheck, build, and the 17 tests.unauthenticated, 400credential_ambiguousandvalidation_failed, 201 / 200 / 204 with an empty body, 404not_found, and unmatched routes falling through.check:openapifailed untilgenerate:openapiwas run.Follow-ups
DATABASE_URLis set. Check that CI's smoke step actually gets it.