Built for Productivity

Aqueduct is an open-source, server-side web framework written in Google’s Dart language. Aqueduct promises faster development, experimentation and testing – without sacrificing power. This allows for faster feedback cycles and greater stability over time.

ABOUT AQUEDUCT

Features

Full user guide and API documentation

GO TO THE TUTORIALS

HTTP Request Routing and Request Pipelines

```
router
.route("/users/[:id]")
.next(authenticationServer.authenticator())
.next(() => new UserController());
```

Built-in OAuth 2.0 Authentication

void addRoutes() {
router.route("/auth/token")
.next(authServer.authenticator(strategy: AuthenticationStrategy.Client))
.next(() => new AuthController());
}

Project template generation

pub global activate -s git https://github.com/stablekernel/wildfire.git
pub global run wildfire:ignite MyProject

ORM interface that supports multiple databases

Currently ships with PostgreSQL implementation

@httpGet getUsers() async {
var query = new Query();
var users = await query.fetch();
return new Response.ok(users);
}

ORM query-building using Hamcrest matcher style

@httpGet getProgrammersAndTestersNamedBob() async {
var query = new UserQuery()
..name = whereContains("Bob")
..job = whereIn(["programmer", "tester"]);
var users = await query.fetch();
return new Response.ok(users);
}

ORM Multi-level joins in simple syntax

@httpGet getTeamInfo() async {
var query = new TeamQuery()
..manager = whereAnyMatch
..players.single.position = whereIn(["quarterback", "running back"])
..players.single.endorsements.single.dollarValue = whereGreaterThan(1000000);
var teams = await query.fetch();
return new Response.ok(teams);
}

Painless multi-threading support

await application.start(numberOfIsolates: 5);

CORS support

class Controller extends HTTPController {
Controller() {
policy.allowedOrigins = ["somewhereoutthere.com"];
policy.allowedRequestHeaders.add("x-special");
}
}

A powerful, yet simple testing framework

var response = await client.request("/questions").get();
expect(response, hasResponse(200, everyElement({
"id" : greaterThanOrEqualTo(0),
"description" : endsWith("?"),
"answer" : partial({
"description" : isString
})
})));

Database schema generation and migration tools

class Team {
@primaryKey
int id;
@Attributes(indexed: true, unique: true)
String name;
@Relationship.hasMany("team")
List players;
@Relationship.hasOne("team")
Manager manager;
@Relationship.belongsTo("teams", deleteRule: RelationshipDeleteRule.cascade, required: true)
League league;
}

Future-based API to avoid callback hell in asynchronous code

@httpPost createThing() async {
var hasAccess = await isAccessible(permission);
if (!hasAccess) {
return new Response.unauthorized();
}
var someThings = await fetchSomeThings();
if (someThings.isEmpty) {
return new Response.notFound();
}
var createdThings = await createSomeThingsWithSomeThings(someThings);
return new Response.ok(createdThings);

Why Aqueduct for Dart

  • Rapid development
  • Easy testing and CI integration
  • Supported by Google
  • Easy improvement and maintenance
Aqueduct

Aqueduct in Action

Materiall Case Study | Aqueduct
Econet Case Study | Aqueduct

Getting Started

Start with our tutorials. They take you on a step-by-step journey through the fundamentals of using Aqueduct to build web servers. You can also check out the Github repo, view the API documentation and access our template generator, Wildfire.

GO TO THE TUTORIALS
GO TO GITHUB
API DOCUMENTATION
CHECK OUT WILDFIRE

Get Aqueduct News

GET AQUEDUCT NEWS