Cav
Cav is a collection of powerful primitives for building full-stack web apps with Deno.
Status: Ready to play with, but not ready for production. The tests are currently outdated as of 0.2.0-alpha.*. Most will probably fail.
Guiding principles
- Least Astonishment
- Modular, maintainable server definitions
- No-fuss data serialization
- Automatic end-to-end typesafety
- Developer freedom
- Use The Platform
Docs
- Getting started
- Routers
- Endpoints
- Request parsing
- Response resolution
- Context
- Error handling
- Client fetch
- Assets
- Bundles
- Web sockets
- API
Examples
- Chat: Ephemeral real-time chat server
Goals
- It should come with everything a modern web server might need, without relying
on third-party services (minus the database)
- Routing
- Static asset serving
- Signed cookies and JWTs
- Web sockets
- Form and JSON parsing / validation
- De/serialization of most data types, including Files, Dates, Maps, etc.
- Runtime bundling for browser-side TypeScript
- Works with frontend frameworks like Preact
- “Hello world” should be as easy as
deno run
ning a tinyserver.ts
- Zero config
- Zero CLI commands
- The client-side API should use types imported from the server to fully type
requests and responses
- End-to-end typesafety
- Compatible with Zod data parsers
- Its syntax should be functional and declarative, for maximal organization
flexibility
- Immutable, schema-like Router and Endpoint definitions
- No hidden context
- No middleware
- Production deployments should be a simple git-commit-push
- Deno Deploy without a build step
- It should minimize the threat of supply chain attacks
- Zero third-party dependencies
Inspirations
Cav’s description on GitHub is inspired by the Weird Wide Webring 🤙