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
Add this to your package's pubspec.yaml file:
dependencies: aqueduct: "^2.5.0"
You can install packages from the command line:
$ pub get
Alternatively, your editor might support 'pub get'. Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|2.5.0||Oct 12, 2017||Go to the documentation of aqueduct 2.5.0||Download aqueduct 2.5.0 archive|
|2.4.0||Aug 30, 2017||Go to the documentation of aqueduct 2.4.0||Download aqueduct 2.4.0 archive|
|2.3.2||Jul 22, 2017||Go to the documentation of aqueduct 2.3.2||Download aqueduct 2.3.2 archive|
|2.3.1||Jul 20, 2017||Go to the documentation of aqueduct 2.3.1||Download aqueduct 2.3.1 archive|
|2.3.0||Jun 29, 2017||Go to the documentation of aqueduct 2.3.0||Download aqueduct 2.3.0 archive|
|2.2.2||Jun 10, 2017||Go to the documentation of aqueduct 2.2.2||Download aqueduct 2.2.2 archive|
|2.2.1||Jun 2, 2017||Go to the documentation of aqueduct 2.2.1||Download aqueduct 2.2.1 archive|
|2.2.0||Jun 1, 2017||Go to the documentation of aqueduct 2.2.0||Download aqueduct 2.2.0 archive|
|2.1.1||Apr 28, 2017||Go to the documentation of aqueduct 2.1.1||Download aqueduct 2.1.1 archive|
|2.1.0||Apr 27, 2017||Go to the documentation of aqueduct 2.1.0||Download aqueduct 2.1.0 archive|