# dart-lang/shelf

Web server middleware for Dart

Repository: https://github.com/dart-lang/shelf
Canonical: https://ross.abutalabs.com/products/shelf
Homepage: https://pub.dev/packages/shelf
Language: Dart
License: BSD-3-Clause
License Family: permissive
Topics: http, server, dart
Last push: 2026-09-01T12:29:27+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 78, longevity 100
- inputs: {"age_days": 4275, "days_push": 1, "days_rel": 69, "gap_med": 62, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1005, forks 139 (observed 2026-09-03T02:15:11.085760+00:00)

## What it is
Shelf is Dart's official model for web server middleware, mapping server logic to simple Request-in/Response-out handler functions that can be composed via pipelines. It includes an ecosystem of packages for routing, static file serving, proxying, and testing.

## Use cases
- build a web server in dart
- compose http middleware in dart
- serve static files with dart
- create a rest api backend in dart
- proxy http requests in dart
- add logging or auth middleware to a dart server

## When to choose
- you're writing a Dart or Flutter backend and want a composable, minimal HTTP server model
- you need reusable middleware like logging, auth, or routing in Dart
- you want a Rack/Connect-style server abstraction with a rich package ecosystem

## When to avoid
- you need a batteries-included full-stack framework with ORM and templating out of the box
- you're not using Dart/Flutter
- you need extreme raw performance from a lower-level server

## Facets
- artifact type: framework
- maturity: stable
- function: web-framework, http-server, middleware, routing, http-client
- domain: web-development, backend, apis, developer-tools
- platform: cross-platform, cli
- tags: dart, middleware, http-server, rack-inspired, pub-package, flutter-backend, web-server

## Member repositories
- dart-lang/shelf (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:11.085760+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:13:09.106283+00:00, confidence not recorded.
  - readme: https://github.com/dart-lang/shelf (fetched 2026-09-03T02:15:11.085760+00:00, sha 80aee942ddee)
  - homepage: https://pub.dev/packages/shelf (fetched 2026-08-29T13:13:07.127479+00:00, sha c8a9b30fced9)
  - site_page: https://pub.dev/packages/shelf/install (fetched 2026-08-29T13:13:07.139631+00:00, sha e346541f1417)
  - site_page: https://pub.dev/documentation/shelf/latest/shelf/Handler.html (fetched 2026-08-29T13:13:07.141949+00:00, sha 472548712061)
  - site_page: https://pub.dev/documentation/shelf/latest/shelf/Request-class.html (fetched 2026-08-29T13:13:07.143743+00:00, sha 4f75019b1153)
  - site_page: https://pub.dev/documentation/shelf/latest/shelf/Response-class.html (fetched 2026-08-29T13:13:07.145406+00:00, sha 42d7c2983296)
  - site_page: https://pub.dev/documentation/shelf/latest/shelf/Middleware.html (fetched 2026-08-29T13:13:07.147140+00:00, sha 7f2e120d527f)
  - site_page: https://pub.dev/documentation/shelf/latest/shelf/Pipeline-class.html (fetched 2026-08-29T13:13:07.148650+00:00, sha 90783139d4f1)
  - site_page: https://pub.dev/documentation/shelf/latest/shelf/Request/handlerPath.html (fetched 2026-08-29T13:13:07.150143+00:00, sha 39cbfe9992e4)
  - site_page: https://pub.dev/packages/shelf/changelog (fetched 2026-08-29T13:13:07.136737+00:00, sha 426cd6d9410f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
