Build powerful APIs with Dart
Revali reads the annotations on your classes and methods and generates the server, the client, and the OpenAPI document. You write the business logic.
@Controller('users')
class UserController {
const UserController(this.users);
final UserService users;
@Get()
Future<List<User>> all() => users.all();
@Post()
Future<User> create(@Body() UserInput input) {
return users.create(input);
}
}
Install the framework, configure your app, and run the CLI.
- Getting Started
- App Configuration
- CLI
- Tutorials
The packages that generate your server, client, docs and Dockerfile.
- Revali Server
- Revali Client
- Revali Swagger
- Revali Docker
Write your own code generator against the Revali pipeline.
- Getting Started
- Core
Why Revali#
Constructs are first-class. Generate a Dart client, a Swagger document or a Dockerfile from the same annotations — or write your own.
revali dev watches your routes, regenerates the server and hot reloads it.
No build step to remember, no restart to sit through.
One language across your API and your Flutter app, with the same types on both sides of the wire and no hand-written serialization in between.
Where to start#
Add the CLI to a Dart project and get a server answering requests.
Write a controller, annotate a method, and watch the route appear.
Middleware, guards, interceptors and exception catchers, and the order they run in.
Call your API from Flutter with the same models the server returns.