relic
A lightweight and flexible web server inspired by Shelf for building APIs and backend services.
1.2.0
379K downloads/mo
#596 most downloaded on pub.dev
serverpod/relic
What this package is like to depend on
Last release 13 days ago
10 Aug 2026
Release timing varies
gaps range from 9 days to 4 months
Nearly every release is documented
notes for 24 of 24 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
26 releases · first in 2024
21 releases in the last 12 months
see the full history below
Release timeline
26 releases · Aug 2024 to Aug 2026Releases
latest 26-
2.0.0-beta.110 Aug 2026 pre-releaseRelease notes
Open source →- feat: Add
CacheControlHeader.parseStrictfor validating own values (#370)- Throws a
FormatExceptionfor an unrecognized directive or a malformed delta-seconds value instead of ignoring it - Intended for values under the sender's own control, such as server configuration;
parseremains lenient per RFC 9111 5.2
- Throws a
- feat: Add
-
2.0.0-beta.024 Jun 2026 pre-releaseRelease notes
Open source →Overhaul of typed HTTP headers for RFC compliance, landing in concert with serverpod 4.0. Parsing of received (request) headers is lenient (except security-sensitive ones), while construction and serialization are always strict. Many typed headers changed shape and/or semantics, so this is a breaking release.
- refactor!: Cookie and Set-Cookie headers (#361)
- BREAKING:
SetCookienow represents a single cookie, andSetCookieHeaderis aList<SetCookie>collection (oneSet-Cookieline per cookie, RFC 6265 4.1). The previous single-cookieSetCookieHeader(name:, value:, ...)API is replaced bySetCookie(...); augment a response withmh.setCookie = (mh.setCookie ?? const SetCookieHeader.empty()).add(cookie) - The request
Cookieheader is parsed leniently: a malformed cookie is skipped and the header is rejected only when no cookie in it is usable - Add
CookieHeader.getCookies(name)returning every cookie with that name in order; byte-identical duplicates are preserved (not collapsed) Set-Cookiedecode is strict (it is produced by the server): a malformed attribute rejects the cookieDomainis normalized per RFC 6265 5.2.3 — the full leading-dot run is stripped and the host is lower-cased; an all-dotsDomainis rejectedMax-Ageis parsed as a strict decimal integer per RFC 6265 5.2.2; non-decimal values such as0xFFare rejected- Nameless
=valuesegments are dropped when parsing the requestCookieheader
- BREAKING:
- feat!: RFC compliant typed headers (#360) — fixes #113, #142
- Many typed headers changed their Dart interface and/or their parse/serialize semantics
- Parsing is lenient on receive; construction and serialization are strict
- refactor!: Cookie and Set-Cookie headers (#361)
-
1.2.011 Mar 2026Release notes
Open source →- feat: Make
NormalizedPathinterning cache configurable (#343)- Introduce abstract
Cache<K, V>interface - Add
NoCacheimplementation for high-cardinality workloads LruCachenow implementsCacheNormalizedPath.internedcan be swapped to anyCacheimplementation
- Introduce abstract
- feat: Add
staticChangeCountand VM service extension toDeveloperTools(#341) - feat: Add
DeveloperToolsclass toRelicApp(#340)
- feat: Make
-
1.1.105 Mar 2026 -
1.1.023 Feb 2026 -
1.0.010 Feb 2026 -
0.15.104 Feb 2026Release notes
Open source →- fix: Downgrade meta dep to ^1.16.0 to match flutter 3.32.0 (serverpod lower bound) (#325)
-
0.15.003 Feb 2026Release notes
Open source →- feat: Add virtual host routing support (#322)
- Add
useHostWhenRoutingparameter torouteWith()middleware - Add
useHostWhenRoutingparameter toRelicApp - When enabled, routing uses
{host}{path}for route matching
- Add
- feat: Add
paths,toString(), andtoDot()to PathTrie for debugging (#320) - feat: Add
forceparameter to serverclose()method (#317) - refactor: Restructure into multi-package workspace with relic_core, relic_io, and relic packages
- feat: Add virtual host routing support (#322)
-
0.14.015 Dec 2025Release notes
Open source →- feat!: Add optional consume flag to attach (#309)
- BREAKING:
attachnow throwsArgumentErrorwhen called with a tail path (/**), unlessconsume: trueand the attached trie/router has a single value at the root (isSingle) - BREAKING:
groupnow throwsArgumentErrorwhen called with a tail path - Add
consumeflag toattachthat resets the attached trie's root after attachment - Add
isSingleproperty to check if a trie/router has only a single root value/route - Allow
attach(..., consume: true)at tail paths (/**) when the attached trie/routerisSingle - Update
injectAtto useattach(..., consume: true), still enabling injection at tail paths for simpleHandlerObjects (those adding a single handler at the root ('/'))
- BREAKING:
- feat!: Add optional consume flag to attach (#309)
-
0.13.109 Dec 2025 -
0.13.008 Dec 2025 -
0.12.003 Dec 2025Release notes
Open source → -
0.11.027 Nov 2025Release notes
Open source →- feat!: Add typed accessor for query and path parameters (#288)
- feat: Introduce ConnectionInfo (#273)
- feat: Add IPAddress class (independent of dart:io) (#272)
- refactor!: Simplify ContextProperty interface
- refactor!: Disallow url rewriting in Request.copyWith (#289)
- refactor!: Use named ctors on all header classes (#283)
- refactor!: Avoid repeating ctor name on parameter (#282)
- fix!: Remove stale arguments from Request and Response class (#274)
- fix: Don't overwrite Content-Length when set as header (#291)
-
0.10.005 Nov 2025Release notes
Open source →- refactor!: The Great Simplification (#264)
- Merged
RequestContextintoRequestby moving the token property HandledContextrenamed toResult- Merge
ResponseContextintoResponse(now implementsResult) - Removed
respond(),hijack(), andconnect()methods - handlers can construct and returnResults directly - Updated handler signatures:
Handler = FutureOr<Result> Function(Request req) - Consolidated context classes into single file using part files
- Updated all examples and tests
- Significant simplification of the class hierarchy by eliminating the:
Context,RequestContext,RespondableContext,HijackableContext,ConnectableContext, andResponseContextinterfaces- Renamed
ConnectionContexttoWebSocketUpgrade(now extendsResult) - Renamed
HijackedContexttoHijack(now extendsResult)
- Merged
- refactor!: The Great Simplification (#264)
-
0.9.203 Nov 2025 -
0.9.130 Oct 2025Release notes
Open source →- feat: Add async RelicServer.connectionsInfo() method (#255)
- Adds a
connectionsInfo()method toRelicServerthat returns the current number of active, closing, and idle connections. - A new
ConnectionsInfotypedef is introduced as a record type withactive,closing, andidlefields.
- Adds a
- feat: Add async RelicServer.connectionsInfo() method (#255)
-
0.9.029 Oct 2025Release notes
Open source →- refactor!: Context renaming (#251)
Renames core context types for improved clarity and consistency:
NewContext→RequestContextConnectContext→ConnectionContextHijackContext→HijackedContext- Base class
RequestContextrenamed toContext
- chore!: Upgrade sdk to ^3.7.0 (#239)
- feat: Introduce MultiIsolateRelicServer (#216)
Implements multi-isolate support for
RelicServerto enable concurrent request handling across multiple CPU cores. AddsnoOfIsolatesoptional named parameter toRelicServerconstructor, andRelicApp.run. - fix: Mask sensitive credentials in authorization header toString() methods (#238)
- refactor!: Context renaming (#251)
Renames core context types for improved clarity and consistency:
-
0.8.023 Oct 2025Release notes
Open source →- feat!: RelicApp now supports hot-reload (#226)
- feat: Introduce RelicApp (#212)
- feat: Introduce MiddlewareObject (#211)
- feat: Introduce HandlerObject (#210)
- feat(router): Add fallback property for unmatched routes (#196)
- feat(router): Add asHandler extension to use Router<Handler> as Handler (#209)
- feat: Adds support for cache busting (#192)
- feat: Support mime-type inference (#206)
- feat: Add NewContext.withRequest convenience method (#198)
- fix: Build platform correct path when serving files. (#207)
-
0.7.003 Oct 2025 -
0.6.029 Sep 2025Release notes
Open source →- feat!: Custom CacheControl header per file (#167)
- feat!: Distinguish between path and method miss in router lookups (#179)
- feat!: Remove automatic X-Powered-By header (#169)
- feat!: Remove unused strict flag (#181)
- feat(router): Router.group (#157)
- feat: Add operator== and hashCode on all header classes (#155)
- fix: HEAD request should match GET except for body, including Content-Length (#180)
- fix: Host header is not a Uri. Introduce an RFC3986 compliant HostHeader class (#142)
- fix: Rip out Router.staticCache (#172)
- fix: Set content length on body, not headers (#161)
-
0.5.001 Sep 2025 -
0.4.103 Jul 2025 -
0.4.030 Jun 2025Release notes
Open source →- fix: Missing convenience getters and setter for Headers.xForwardedFor (#108)
- refactor!: Get rid of old context map on Message (Request/Response) (#105)
- feat: X-Forwarded-For typed header (#107)
- feat: Add ContextProperty class (wraps Expando) (#94)
- feat: Typed forwarded header (#101)
- build(deps): Bump cli_tools from 0.5.1 to 0.6.0 (#100)
- refactor!: Replace DuplexStreamChannel with RelicWebSocket (#91)
- test: Add headers constants test and rename file (#89)
- build(deps): Bump lints from 5.1.1 to 6.0.0 (#92)
- fix: Fix request/response header sets (#90)
- docs: Update router docs (#88)
- docs: Update router entry comment (#87)
- feat: WebSocket support (#84)
- feat: Store benchmark results with git notes (#79)
- feat: The routeWith middleware builder function is now generic. (#78)
- feat(Handler)!: Signature changed (#76)
- feat: Add Router.isEmpty getter (#75)
- docs: Add CONTRIBUTING.md and CODE_OF_CONDUCT.md (#69)
- feat: PathTrie wildcard and tail matching support (#70)
- feat: Router middleware (#68)
- feat!: Router now supports verb directly (#65)
- docs: Add badges for codecov, etc. (#67)
- feat: Add addOrUpdate, update, and remove to PathTrie (#63)
- feat: Support Router.attach (#62)
- feat: Allow a trie to be attached as a subtrie to another (#61)
- feat: Router class (#52)
- refactor!: Decouple from dart:io and avoid using exceptions for control-flow (#48)
- chore: Add serverpod lints (#46)
- feat!: Replace HeaderDecode with HeaderCodec to allow customization on encoding as well (#43)
- fix: Ensure cache is updated immediately (#42)
- feat!: Support typed access to custom headers (#38)
- ci: Hoist continue-on-error to job (#37)
- ci: Add test coverage (#36)
- fix!: RelicServer cannot reliably know the Uri to use to hit it (#32)
- chore: Automate publishing to pub.dev when semver tag is created (#31)
- chore: Add pull request title validation. (#30)
- refactor!: Get rid of RelicAddress. (#29)
-
0.3.021 Jan 2025Release notes
Open source →- feat: Implements lazy loading when parsing headers to avoid unnecessary validation.
- feat: Makes address strongly typed and adds
RelicAddresstype. - fix: Resolves issue with
Content-Lengthheader conflicting withTransfer-Encoding: chunked.
-
0.2.017 Dec 2024 -
0.1.013 Aug 2024