- 0.6.2Latest
- 0.6.0
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.2.0-alpha.15
- 0.2.0-alpha.14
- 0.2.0-alpha.13
- 0.2.0-alpha.12
- 0.2.0-alpha.11
- 0.2.0-alpha.10
- 0.2.0-alpha.9
- 0.2.0.alpha-9
- 0.2.0-alpha.8
- 0.2.0-alpha.7
- 0.2.0-alpha.6
- 0.2.0-alpha.5
- 0.2.0-alpha.4
- 0.2.0-alpha.3
- 0.2.0-alpha.2
- 0.2.0-alpha.1
- 0.2.0-alpha
- 0.1.0
- 0.0.24
- 0.0.23
- 0.0.22
- 0.0.21
- 0.0.20
- 0.0.19
- 0.0.18
- 0.0.17
- 0.0.16
- 0.0.15
- 0.0.14
- 0.0.13
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- 0.0.0
Cav
TODO: This is a placeholder readme until I’m done writing docs
Cav is an experimental TypeScript web framework built on Deno. It provides a declarative and functional approach for writing full-stack web applications.
A quick demo of the framework in action can be seen at cav.bar. The demo runs on Deno Deploy. It’ll be replaced by the docs website soon.
Cav is inspired by many modern web development patterns, techniques, and modules. Here’s a few of those modules:
Usage
- On the server:
deno.land/x/cav/mod.ts
- In the browser:
deno.land/x/cav/browser/mod.ts
Features
- Zero third-party dependencies
- This wouldn’t be possible without Deno and its excellent standard library
- Built-in bundling of TypeScript assets
- Also thanks to Deno. Note
that this feature requires the
--unstable
flag
- Also thanks to Deno. Note
that this feature requires the
- Compatibility with any frontend framework/module (e.g. Preact and React)
- Compatibility with Zod-style data parsers
- End-to-end type safety (inspired by trpc)
- “Any-body” data serialization 1
- Declarative routing (
stack.ts
) - Declarative endpoint definitions (
rpc.ts
) - Unopinionated project structures
- Opinionated HTTP procedures
- Carefully chosen defaults
- Easy-to-use web sockets
- Zero-config
- Signed and unsigned cookies
- Custom context support
- …
JavaScript data types into JSON and back again while maintaining references. Cav
does this and also adds support for Files and Blobs, meaning the client can send
arbitrary JavaScript objects that contain Files and Blobs anywhere on the
object, and the sent object will still come out on the other end in the same
shape, with the same data.
It works by separating the Files and Blobs
from the JSON-only data during serialization and then packing the files and the
JSON into a multipart form with a unique shape. When the form is received, it’ll
be deserialized back into the original object, with the attached files being
placed into their original locations on the output object. See
pack.ts
for more info; look at the packBody
and unpackBody
functions to see where Files and Blobs come into play.
Status
Pre-alpha. Documentation and tests are in the works.
Dedication
Cav is dedicated to the bar it was named after.
Footnotes
-
This is like superjson and similar libraries that let you serialize most ↩