Build a service around one contract. Use it to validate incoming data, constrain outgoing data, and type the client that calls it.
npm install @skeld/coreStart here
Modules
-
@skeld/coreContracts, schemas, the server, the typed client and logging.
-
@skeld/authDecides who may call each route.
-
@skeld/openapiWrites an OpenAPI 3.1.2 document from a contract.
-
@skeld/dataQueries PostgreSQL and SQLite through tagged SQL.
The model
Mermaid equivalent
flowchart TD
Contract["Contract<br/>Routes and schemas"] -->|Defines| Client["Client<br/>Typed calls<br/>Validate replies"]
Contract -->|Defines| Server["Server<br/>Validate input<br/>Serialize output"]
Client -->|HTTP<br/>request| Server
Server -->|HTTP<br/>response| ClientThe contract supplies both sides. HTTP still crosses a trust boundary: server validation protects the handler, and client validation checks responses for declared statuses. Sharing TypeScript types alone would establish neither property.
Guides
- Clients and errorsNarrow responses by status and separate HTTP outcomes from failed calls.
- Plugins and lifecycleGive a feature its own routes, hooks, state, and cleanup.
- Classify dataKeep secret and personal values out of schema-aware logs and control response exposure.
- Connect a browserConfigure CORS, cross-site checks, cookies, and redirects together.
- Run a serviceSet the public origin, proxy trust, timeouts, logging, and shutdown behavior.
- TroubleshootDiagnose startup failures, refused requests, missing logs, and invalid responses.
Look up a detail
- API overviewSignatures and rules generated from the public source documentation.
- Logging overviewOptions, delivery behavior, and limits.
- Request lifecycleWhen each stage of a request runs.