Skip to content

karmaniverous/smoz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

530 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMOZ is a small, pragmatic toolkit for authoring AWS Lambda handlers with [Middy] and [Zod], then aggregating Serverless functions and hand‑crafted OpenAPI 3.1 paths from a single, schema‑first application definition.

  • Keep prod code testable and framework‑agnostic
  • HTTP middleware with validation, shaping, errors, CORS, negotiation, and HEAD
  • Non‑HTTP flows stay lean (no middleware overhead)

Quick start (from zero)

From an empty directory:

npx @karmaniverous/smoz init -i
npx smoz dev -p 3000
  • The first command scaffolds a new app and installs dependencies (including a local smoz bin).
  • The second command starts the inline local backend and keeps registers + OpenAPI fresh.
  • Open http://localhost:3000/openapi in your browser.

Prefer serverless‑offline?

npx smoz dev -l offline -p 3000

Add your first endpoint (avoid clashing with the template’s hello):

npx smoz add rest/foo/get

Quick links

Install

npm i @karmaniverous/smoz zod zod-openapi

Dev tooling (recommended):

npm i -D typescript typescript-eslint eslint prettier typedoc

Docs and reference