Verani Documentation
Complete documentation for Verani, a realtime framework for Cloudflare Workers.
Getting Started
- Installation - Prerequisites and installation
- Quick Start Guide - Build your first Verani application
- Troubleshooting - Common issues and solutions
API Reference
- Server API - Server-side API documentation
- Per-Connection Architecture (recommended):
createConnectionHandler,createRoomHandler - Legacy Architecture:
defineRoom,createActorHandler
- Per-Connection Architecture (recommended):
- Client API - Client-side API documentation
- Typed API - Type-safe contracts (tRPC-like)
- Types - Type definitions
- Utilities - Utility functions
Guides
- Configuration - Wrangler configuration and setup
- Deployment - Deploying to Cloudflare
- Monitoring - Logs and metrics
- Scaling - Performance and scaling strategies
- RPC - Remote Procedure Calls
Examples
- Basic Chat - Simple chat room
- Socket.io-like API - Event handlers and emit API
- Channels - Custom paths and multiple channels
- Presence - User presence tracking
- Authentication - JWT authentication
- Rate Limiting - Prevent spam
- RPC - Remote Procedure Calls
See Examples Index for all examples.
Concepts
- Architecture - System architecture and design (per-connection vs legacy)
- Typed Contracts - Understanding serverEvents vs clientEvents
- Actors and Channels - Core concepts
- Emits and Channels - Emit patterns and targeting
- Hibernation - Hibernation behavior (automatic state restoration)
- State Management - State types
- RPC - Remote Procedure Calls (DO-to-DO communication)
- Isolation - Isolation strategies
- Lifecycle - Connection lifecycle
Security
- Authentication - Verifying user identity
- Authorization - What users can do
- Input Validation - Validating user input
- Rate Limiting - Preventing abuse
- Vulnerabilities - Common security issues
- Security Checklist - Production checklist
Support
- GitHub Issues: Report bugs
- Discussions: Ask questions
- Discord: Join community (coming soon)