jaguar 0.5.9

Build Status


Jaguar is a production ready server framework built for speed, simplicity and extensiblity

Advantages of Jaguar

  1. Batteries included
    1. ORM
    2. Various databases support
      1. Mongo
      2. PostgreSQL
      3. MySQL
    3. Authentication and Authorization
    4. OAuth
    5. Session management
  2. Keeps your route handlers concise and clean
  3. Bare metal speed achieved through code generation
  4. Extensible interceptor infrastructure
  5. Various ways to build routes
    1. Class-annotation based
      1. Reflection based
      2. Source generation based
    2. Mux based
  6. Extensive respository of examples
    1. Annotation based
    2. Reflection based
    3. Mux based
    4. MongoDB
    5. PostgreSQL
    6. Upload files using Jaguar


Simple routes

Below example shows how to add routes to Jaguar.dart server.

@Api(path: '/api/book')
class BooksApi {
  /// Simple [Route] annotation. Specifies path of the route using path argument.
  @Route(path: '/books')
  int getFive(Context ctx) => 5;

  /// [methods] lets routes specify methods the route should respond to. By default,
  /// a route will respond to GET, POST, PUT, PATCH, DELETE and OPTIONS methods.
  @Route(path: '/books', methods: const <String>['GET'])
  String getName(Context ctx) => "Jaguar";

  /// [Get] is a sugar to respond to only GET requests. Similarly sugars exist for
  /// [Post], [Put], [Delete]
  @Get(path: '/books')
  String getMoto(Context ctx) => "speed, simplicity and extensiblity";

  /// [statusCode] and [headers] arguments lets route annotations specify default
  /// Http status and headers
      path: '/inject/httprequest',
      statusCode: 200,
      headers: const {'custom-header': 'custom data'})
  void defaultStatusAndHeader(Context ctx) {}

Future<Null> main(List<String> args) async {
  Jaguar jaguar = new Jaguar();
  jaguar.addApi(new JaguarBooksApi(new BooksApi()));

  await jaguar.serve();

Join us on Gitter



  • Fixed writing headers to response by Response


  • Added redirect to Response class


  • Removed RouteWrapper
  • Removed injection


  • Added properly handling List<int> response type
  • Implemented Route redirection


  • Remove Settings from Configuration


  • Removed isolate creation. Control is given to the programmer.
  • Bug fix for "Page not found!" error


Breaking Changes:

Annotation to build annotation from annotated function has changed.<br>

  • PreProcessorFunction has changed to PreInterceptorFunction
  • PostProcessorFunction has changed to PostInterceptorFunction

jaguar.yaml parameters has also changed

  • pre_processors has changed to pre_interceptors
  • post_processors has changed to post_interceptors

1. Depend on it

Add this to your package's pubspec.yaml file:

  jaguar: "^0.5.9"

2. Install it

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.

3. Import it

Now in your Dart code, you can use:

import 'package:jaguar/jaguar.dart';


Jaguar is a production ready server framework built for **speed, simplicity and extensiblity**


Email Ravi Teja Gudapati
Email Kevin Segaud



Source code (hyperlinked)