Skip to main content
Deno 2 is finally here šŸŽ‰ļø
Learn more

Cav

Cav is an experimental TypeScript web framework for Deno. It approaches web development with a declarative, backend-first mindset. It was written with developers and DX top-of-mind.

Hack this site. (plz)

Features

TODO: Elaborate and provide examples

  • Zero third-party dependencies
    • This wouldnā€™t be possible without Deno and its excellent standard library
  • Automatic bundling of TypeScript assets
    • Also thanks to Deno. If you havenā€™t used it yet, go use it! šŸ¦•
  • End-to-end type safety (inspired by trpc)
  • Compatibility with Zod data parsers
  • ā€œAny-bodyā€ data serialization (like superjson and friends, but with added support for Files and Blobs. See pack.ts for more info; look at the packBody and unpackBody functions.)
  • Declarative routing (stack.ts)
  • Declarative endpoint definitions (rpc.ts)
  • Unopinionated about project structure
  • Highly opinionated about behind-the-scenes HTTP procedures
  • Carefully chosen defaults
  • Easy-to-use web sockets
  • Zero-config (the code is the config)
  • Cookies (ofc)
  • Custom context support
  • TODO: thereā€™s more, Iā€™m just exhausted

Status

Alpha.

Although many months have been spent on this project, Cav is still just a baby. Thereā€™s a ton of work to do before v0.1 (Beta).

The only documentation so far is the documentation in the code itself, and fair warning, itā€™s a bit cluttered in some spots. Code quality is on the to-do list, but the focus is currently good documentation and good tests. Which, apparently, are super hard to write if you decided not to write them first. (Who knew?)

Also, on that note, only one of the modules is tested at this point. DO NOT use this in production. (Unless youā€™re me and the site is cav.bar, in which case ā€œrules are made to be broken.ā€)

If you want progress updates, you can follow me on GitHub or Twitter. Iā€™ll work on adding more ways to stay up-to-date after some decent docs/tests have made it out of my system.

Please come again soon. If youā€™re reading this, the journey has only just begun.

Dedication

Cav is dedicated to the bar it was named after.