Aqueduct is a server-side framework for building and deploying multi-threaded REST applications. It is written in Dart and targets the Dart VM. Its goal is to provide an integrated, consistently styled API. If this is your first time viewing Aqueduct, check out the tour.
The framework contains behavior for routing, OAuth 2.0, a PostgreSQL ORM, testing, and more.
aqueduct command-line tool serves applications, manages database schemas and OAuth 2.0 clients, and generates OpenAPI specifications.
In-depth documentation is available here.
pub global activate aqueduct
Create a new project.
aqueduct create my_project
Step-by-step tutorials for beginners are available here.
You can find in-depth and conceptual guides here.
An ever-expanding repository of Aqueduct examples is here.
aqueduct db schemato print an application's data model.
aqueduct document servethat serves the API documentation for an application.
aqueducttool to only emit machine-readable output.
MockHTTPServer. Defaults to null for no delay.
MockHTTPServer. Defaults to a 503 response instead of a 200.
HTTPRequestBody.maxSizeto limit HTTP request body sizes. Defaults to 10MB.
ManagedTableAttributesto configure underlying database table to use multiple columns to test for uniqueness.
Request.addResponseModifierto allow middleware to modify responses.
Response.bufferOutputto control whether the HTTP response bytes are buffered.
whereNotto apply an inverse to other
Request.acceptsContentTypefor convenient usage of Accept header.
AuthStorage.allowedScopesForAuthenticatableto provide user attribute-based scoping, e.g. roles.
ManagedObjectController.forEntityto dynamically instantiate these types, i.e. use runtime values to build the query.
PersistentStore.newQuery- allows a
PersistentStoreimplementation to provide its own implementation of
Queryspecific to its underlying database.
Query.reduceto perform aggregate functions on database tables, e.g. sum, average, maximum, etc.
enums may be used as persistent properties in
ManagedObject<T>. The underlying database will store them a strings.
ApplicationMessageHubto send cross-isolate messages.
HTTPCodecRepository.addto use specify default charset for Content-Type if a request does not specify one.
aqueduct createis now mostly empty. Available templates can be listed with
aqueduct create list-templatesand selected with the command-line option
aqueduct authwould fail to insert new Client IDs.
joinOneare deprecated, use
Streams may now be
HTTPCachePolicyto control cache headers for a
Request.bodyhas significantly improved behavior and has been optimized.
Transfer-Encoding: chunkedwhen the size of the response body can be determined efficiently.
ResourceRegistry: tracks port-consuming resources like database connections to ensure they are closed when an application shuts down during testing.
ManagedObjects now have callbacks
willInsertto modify their values before updating and inserting.
aqueduct serveon Windows.
aqueduct documentfor routes using
TestClientto execute requests with public OAuth2 client
aqueduct db generate.
aqueduct servedefault port to 8081 so can develop in parallel to Angular2 apps that default to 8080
ApplicationConfiguration. SSL configured via new
ssl-certificate-path, or overriding
RequestController.letUncaughtExceptionsEscapefor better debugging during tests.
ManagedObjects can now have superclasses.
ManagedRelationships now have a
.deferred()constructor. This allows
ManagedObjects to have relationships to
ManagedObjects in other packages.
RequestSink.initializeApplicationmethod to do one-time startup tasks that were previously done in a start script.
RequestSinkconstructor now takes
ApplicationConfiguration, instead of
Responseobjects so that other parts of an application can accurately read their values during processing.
HTTPBodyobject to represent HTTP request bodies in
Request. Decoders are now added to this type.
Query's, instead, added
joinMany which create subqueries that can be configured further.
Query.where to reference properties in related objects without including related objects in results, i.e. can fetch
Parent objects and filter them by values in their
ORM: Joins can now be applied to belongsTo relationship properties.
ORM: Matchers such as
whereNotNull can be applied to a relationship property in
ORM: Added matchers for case-insensitive string matching, and added case-insensitive option to
aqueduct/managed_auth library. Implements storage of OAuth 2.0 tokens using
ManagedObjects. See API reference for more details.
Auth: Improved error and response messaging to better align with the OAuth 2.0 spec, especially with regards to the authorization code flow.
Auth: Added distinction between public and confidential clients, as defined by OAuth 2.0 spec.
Auth: Improved class and property naming.
aqueduct auth tool to create client ID and secrets and add them to a database for applications using the
Tooling: Added more user-friendly configuration options for
aqueduct db tool.
aqueduct setup --heroku for setting up projects to be deployed to Heroku.
aqueduct serve command for running Aqueduct applications without having to write a start script.
aqueduct document command to generate OpenAPI specification for Aqueduct applications, instead of relying on a script that came with the template.
Response.contentTypeproperty. Adding "Content-Type" to the headers of a
Responseno longer has any effect; use this property instead.
ManagedDataModels now scan all libraries for
ManagedObject<T>subclasses to generate a data model. Use
ManagedDataModel.fromCurrentMirrorSystemto create instances of
ManagedContextnow becomes the
ManagedContext.defaultContext; prior to this change, it was the first instantiated context. Added
ManagedContext.standaloneto opt out of setting the default context.
Process.runSyncthat allow Windows user to use
You can install the package from the command line:
$ pub global activate aqueduct
The package has the following executables:
Add this to your package's pubspec.yaml file:
dependencies: aqueduct: ^2.5.0+1
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|3.2.1||Apr 19, 2019|
|3.2.0+1||Apr 5, 2019|
|3.2.0||Mar 7, 2019|
|3.1.0+1||Dec 18, 2018|
|3.1.0||Dec 17, 2018|
|3.0.2||Sep 27, 2018|
|3.0.1||Aug 31, 2018|
|3.0.0||Aug 6, 2018|
|2.5.0+1||Dec 1, 2017|
|2.5.0||Oct 12, 2017|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.
Support Dart 2 in
The SDK constraint in
pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.
dartdoc successfully runs on your package's source files. (-10 points)
Dependencies were not resolved.
|Dart SDK||>=1.20.0 <2.0.0|