Vyriy Preset - REST API
Calm cloud-ready REST API application built as a Yarn workspace.
The repository currently contains a single API workspace that serves a small HTTP API, publishes an OpenAPI document, and renders the document with Scalar. The root package owns shared tooling for TypeScript, ESLint, Prettier, Jest, Storybook, and workspace-level build scripts.
Create this example
npm create vyriy@latest
Choose the rest preset.
Requirements
- Node.js
>=24.0.0 - Yarn
4.16.0
Workspaces
| Workspace | Description |
|---|---|
@w/api | HTTP API server with OpenAPI and Scalar documentation. |
Local development
Install dependencies:
yarn install
Start all configured services:
yarn start
Start only the API:
yarn start:api
The API listens on PORT through @vyriy/server; when PORT is not set, the
default port is 3000.
After the API starts, open:
http://localhost:3000/for the Scalar API reference.http://localhost:3000/openapi.jsonfor the raw OpenAPI document.http://localhost:3000/api/testfor the test endpoint.
Documentation
Run Storybook:
yarn storybook
The root doc.mdx imports this README for project-level documentation.
workspaces/api/doc.mdx imports the API workspace README for API-specific
documentation.
Validation
Run all checks:
yarn check
Run checks separately:
yarn lint
yarn build
yarn test
Run the focused API test suite:
yarn jest workspaces/api --runInBand --coverage=false
Build
Build all configured outputs:
yarn build
Build only the API bundle:
yarn build:api
The API build writes a CommonJS server bundle to dist/api/index.js and copies
a runtime package.json into dist/api.
Project Guidance
These articles describe the development approach behind this preset and provide practical guidance for evolving a project on top of it:
- Calm Development Environment: Node.js, Corepack, Yarn and Static Preview - how to keep the local development environment predictable and easy to reproduce.
- Calm App Structure for the Vyriy Ecosystem - a practical project structure for Vyriy applications: shared configs, small packages, thin workspaces, Storybook docs, tests, and deployable entry points.
- One Handler, Many Runtimes - how @vyriy/handler, @vyriy/router, and @vyriy/server compose a calm Lambda-compatible API that can run locally, in Docker, Fargate-style HTTP runtimes, and AWS Lambda.
- Storybook as Project Documentation - how to use Storybook as living project documentation and a component playground.