Flint Dart - Modern Dart Backend Framework
Internal rollout build v1.0.0+27

Build fast APIs with Dart.

Flint Dart is a high-performance, expressive server-side framework for Dart. Build RESTful APIs, authentication systems, and scalable backend services with clean, modern syntax.

100%
Dart Native
Fast
Hot Reload
Built
for DX
main.dart
import 'package:flint_dart/flint_dart.dart';

void main() {
  final app = Flint();

  app.get('/', (Context ctx) async {
    return ctx.res.send('Welcome to Flint Dart!');
  });

  app.listen(port: 3000);
}

Everything You Need to Build Modern APIs

Flint Dart provides a complete toolkit for building scalable backend services.

🧱

Simple Routing

Intuitive routing APIs for clean, expressive endpoints

🛡️

Middleware Stack

Protect and transform requests with composable middleware

🔐

JWT Authentication

Built-in JWT auth utilities and guard support

🔒

Password Hashing

Secure hashing helpers for user credentials

♻️

Hot Reload

Instant feedback while developing

🧪

Modular Structure

Organize large apps with a scalable layout

🗄️

ORM for MySQL/Postgres

Active Record ORM with migrations and models

🛠️

CLI Tooling

Scaffold migrations, models, and more

📚

Swagger Docs

Generate API docs with Swagger/OpenAPI

Unique Wins in Flint Dart

A few things that feel distinctly Flint and speed up real projects.

Hot Reload for Views + Routes

Edit templates and handlers without restarting the server.

Flint Templates

A lightweight template engine with sections, includes, loops, and conditionals.

First‑Class CLI

Scaffold models, routes, middleware, mail, and seeders in seconds.

Built‑in Swagger Docs

Generate API docs and serve Swagger UI with one flag.

Unified Data Layer

QueryBuilder + Models + Schema sync keep DB work consistent.

Batteries Included

Auth helpers, sessions, cache, storage, mail, and WebSockets in core.

Get Started in Minutes

Installation and basic setup is quick and easy.

1

Install the CLI

dart pub global activate flint_dart
2

Create Your App

flint create new_app
3

Run the Server

flint run
4

Open Your App

Visit your app URL (local or deployed) in your browser

See It in Action

Clean, expressive APIs that feel natural to Dart developers.

Quick Start

import 'dart:io';
import 'package:flint_dart/flint_dart.dart';

void main() {
  final app = Flint();

  app.get('/', (Context ctx) async {
    return ctx.res?.send('Welcome to Flint Dart!');
  });

  final port = int.tryParse(Platform.environment['PORT'] ?? '') ?? 3000;
  app.listen(port: port, hotReload: false);
}

Middleware

class AuthMiddleware extends Middleware {
  @override
  Handler handle(Handler next) {
    return (Context ctx) async {
      final token = ctx.req.bearerToken;
      if (token == null || token != "expected_token") {
        return ctx.res?.status(401).send("Unauthorized");
      }
      return await next(ctx);
    };
  }
}

app.put('/:id', AuthMiddleware().handle(controller.update));

JWT Auth

final token = JwtUtil.generateToken({'userId': 123});
final payload = JwtUtil.verifyToken(token);

Model

class User extends Model {
  User() : super(() => User());

  @override
  Table get table => Table(
    name: 'users',
    columns: [
      Column(name: 'name', type: ColumnType.string, length: 255),
      Column(name: 'email', type: ColumnType.string, length: 255),
    ],
  );
}

final users = await User().where('name', 'Ada').get();
final user = await User().create({
  'name': 'Ada',
  'email': 'ada@example.com',
});

Controller

class UserController {
  Future index(Request req, Response res) async {
    final users = await User().get();
    return res.json({'users': users.map((u) => u.toMap()).toList()});
  }
}

final controller = UserController();
app.get('/users', controller.index);

WebSocket

app.websocket('/chat', (Context ctx) {
  ctx.socket?.on('ping', (_) {
    ctx.socket?.emit('pong', {'ok': true});
  });
});

Flash + Back Redirect

app.post('/settings', (Context ctx) async {
  final data = await ctx.req.validate({'name': 'required|string'});
  // ... persist settings
  return ctx.res
      ?.withSuccess('Settings updated successfully.')
      .back(fallback: '/settings');
});