chase 0.1.2
chase: ^0.1.2 copied to clipboard
A fast, lightweight web framework for Dart. Features trie-based routing, 18+ middleware, WebSocket/SSE support, and schema validation.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.2 - 2026-01-06 #
Fixed #
- Timeout Middleware - Fixed response handling pattern for proper middleware chain integration
- RateLimit Middleware - Fixed response handling pattern for proper middleware chain integration
- BodyLimit Middleware - Fixed response handling pattern for proper middleware chain integration
- ExceptionHandler Middleware - Fixed response handling pattern for proper middleware chain integration
Added #
- Testing Utilities - Added
runMiddlewarehelper function for testing middleware that returnsResponseobjects - Integration Tests - Added tests for middleware behavior in
path()route groups
0.1.1 - 2026-01-05 #
0.1.0 - 2025-12-30 #
Added #
Core
- Chase - Main application class with routing and middleware support
- Context - Request/response context with store for data sharing
- Router - Trie-based router for optimal performance, regex-based router for flexibility
- Middleware - Flexible middleware system (global, group, route-level)
- Plugin - Plugin system for extending functionality
- Route Groups - Nested route groups with
path()androutes()
Request/Response
- JSON, text, HTML response helpers
- JSON, form data, multipart request parsing
- Cookie management (set, get, delete)
- Header manipulation
- Redirect support
- Query parameter parsing
- Route parameter extraction
Real-time
- WebSocket - Full WebSocket support with upgrade handling
- SSE - Server-Sent Events for real-time updates
- Streaming - Text and binary streaming responses
Middleware (18+)
- Authentication
BasicAuth- HTTP Basic authenticationBearerAuth- Bearer token authenticationJwtAuth- JWT authentication with claims validation
- Security
Cors- Cross-Origin Resource SharingCsrf- CSRF protection with token validationSecureHeaders- Security headers (CSP, HSTS, X-Frame-Options, etc.)RateLimit- Request rate limiting with configurable windowsBodyLimit- Request body size limiting
- Performance
Compress- Gzip/Deflate compressionCacheControl- Cache-Control header managementETag- Entity tag support for cachingTimeout- Request timeout handling
- Utilities
Logger- Request/response logging with levelsRequestId- Unique request ID generationExceptionHandler- Centralized error handlingSession- Session management with pluggable storesI18n- Internationalization supportValidator- Schema-based request validationProxy- HTTP proxy middlewareStaticFileHandler- Static file serving
Validation
- Schema - Define validation schemas for structured data
- V (Validator Builder) - Fluent API for building validators
- Type validators:
isString(),isInt(),isDouble(),isBool(),list(),map(),any() - String rules:
required(),min(),max(),length(),email(),url(),pattern(),oneOf() - Number rules:
min(),max() - List rules:
min(),max()items - Custom validation:
custom() - Default values:
defaultValue()
- Type validators:
- Validate body, query, and route parameters
- Automatic type transformation (string to int, bool, etc.)
- Detailed error messages with field paths
Internationalization (i18n)
- I18nTranslations - Load translations from maps or YAML files
- I18n middleware - Automatic locale detection
- Locale detection from query params and Accept-Language header
- Variable interpolation in translations
- Fallback to default locale
Testing
- TestClient - HTTP client for integration testing
- TestContext - Mock context for unit testing
- TestResponse - Response wrapper with helper methods
- Custom Matchers
- Status:
isOkResponse,isRedirectResponse,isClientErrorResponse,isServerErrorResponse,hasStatus() - Headers:
hasHeader(),hasContentType() - JSON:
hasJsonPath()with nested path support - Cookies:
hasCookie()
- Status:
- Extensions
getWithAuth()- GET with Bearer tokenpostJson()- POST with JSON body
Static Files
staticFiles()- Convenience method for serving static filesStaticFileHandler- Middleware for static file servingStaticOptions- Configuration for caching, ETags, index files
Changed #
- N/A (initial release)
Deprecated #
- N/A (initial release)
Removed #
- N/A (initial release)
Fixed #
- N/A (initial release)
Security #
- N/A (initial release)
[Unreleased] #
Planned #
- OpenAPI/Swagger documentation generation
- GraphQL adapter
- HTML templating support
- CLI tools for scaffolding
- Additional session stores (Redis, etc.)