Skip to content

☃️ filesystem-routed API framework with strongly-typed requests via zod, openapi generation and more. Built for edge, cf worker, node and bun runtimes

License

Notifications You must be signed in to change notification settings

tscircuit/winterspec

Repository files navigation

☃️ winterspec

Note

This project is a fork of the awesome work of the Seam team in the original edgespec module. Please check them out and use the Seam API!

WinterSpec is an opinionated HTTP framework for TypeScript. Out of the box, it:

  • Uses filepath-based routing
  • [Soon] generates ergonomic SDKs across multiple languages
  • [Soon] generates OpenAPI documentation
  • Provides end-to-end type safety for your middleware and endpoints
  • Can be built into a zero-dependency module and embedded into other applications

WinterSpec primarily targets the common minimum API described by WinterCG, but it can also target Node.js, Bun, and Deno. Currently, the two main "edge"/WinterCG-compatible platforms targeted are Cloudflare Workers and Vercel Edge Functions.

Regardless of your target, WinterSpec provides a consistent API and encourages emulation of the WinterCG runtime when developing.

Getting Started

To start a new project:

npm create winterspec@latest # [soon]

npm run dev

If you want to add WinterSpec to an existing project, check out this recipe

Usage

Alternatives

WinterSpec may not be the right choice for your project. This list is not exhaustive, but here are some alternatives:

  • If your backend and frontend are tightly coupled:
  • If you dislike filepath-based routing and need to run within a WinterCG-compatible environment:
  • If you enjoy dependency injection:
  • If your project is mainly frontend with a few API routes:

Acknowledgements

About

☃️ filesystem-routed API framework with strongly-typed requests via zod, openapi generation and more. Built for edge, cf worker, node and bun runtimes

Resources

License

Stars

Watchers

Forks

Packages

No packages published