flint_dart 1.5.10
flint_dart: ^1.5.10 copied to clipboard
The fullstack Dart web framework by Eulogia Technologies - Server, Web UI, and APIs.
Flint Dart ⚡ #
Flint Dart #
Precision of a Dart. Ignition of Flint.
The First Official Full-Stack, Declarative, SEO-First Dart Web Framework.
The First Official Full-Stack, Declarative, SEO-First Dart Web Framework.
Website • Pub.dev • GitHub • Documentation
🌟 What is Flint Dart? #
Flint Dart is not just a backend server — it is the first unified full-stack web framework for Dart.
Flint Dart empowers developers to build entire end-to-end web applications with 100% pure Dart:
- 🎨 Declarative Web UI (Flint UI natively built-in): Flutter-like widget syntax compiling directly to browser DOM.
- 🔍 First-Class SEO & Server-Side Rendering (SSR): Instant HTML generation, meta tags, and OpenGraph crawlers with client-side hydration.
- ⚡ High-Performance Backend: Ultra-fast RESTful HTTP routing, RFC 10008
QUERYsupport, controllers, and middleware pipelines. - 🗄️ Active Record ORM & Secure DB API: Fluent PostgreSQL & MySQL ORM, auto-migrations, and Row-Level Security (
FlintDbPolicy). - 🔌 Real-Time WebSockets: Low-latency event streaming with Socket.IO-style rooms, namespaces, and auto-serialization.
- 🤖 AI Runtime & Agent Workflows: Built-in multi-provider LLM engine (OpenAI, Gemini, Anthropic) with autonomous tool calling and memory.
💡 Zero JavaScript or CSS build tools required. Write your backend logic, database queries, and browser UI in a single language with unified type safety!
🎯 The Philosophy: Dart's Precision, Flint's Spark #
The Flint Dart identity represents the fusion of two core engineering ideals:
- 🎯 The Precision of a Dart: A dart has a singular purpose: fly directly to the target with zero drift. In software, that means type safety, null safety, and architectural predictability. Models, schemas, request validators, and UI components all speak the exact same language—no guessing, no runtime type drift, and no mismatch between client and server.
- ⚡ The Ignition of Flint: Flint is the stone that strikes sparks and ignites fire. Where a dart brings trajectory, Flint brings ignition and velocity: sub-millisecond response times, lightning-fast Ahead-Of-Time (AOT) native compilation directly to machine code, and rapid developer iteration with zero context switching.
Flint + Dart: The precision to hit your target cleanly, powered by the spark that gets you there faster.
🚀 Key Pillars #
| Pillar | Description | Key Import |
|---|---|---|
| Server & HTTP | REST routing, route groups, controllers, CORS, and auth middleware. | import 'package:flint_dart/flint_dart.dart'; |
| Flint Web UI | Declarative components, styles, reactive state signals, and DOM hydration. | import 'package:flint_dart/ui.dart'; |
| Database & ORM | Active Record models, migrations, seeders, and secure DB API endpoints. | import 'package:flint_dart/db.dart'; |
| WebSockets | Real-time channels, room broadcasting, and structured event emitters. | import 'package:flint_dart/flint_dart.dart'; |
| AI Runtime | Multi-model agent orchestration, tool calling, and persistent thread memory. | import 'package:flint_dart/flint_dart.dart'; |
| Mailer Engine | SMTP client with .flint.html email template rendering. |
import 'package:flint_dart/mail.dart'; |
📦 Installation #
1) Global CLI Toolchain #
Install the flint CLI globally to create and run fullstack apps:
dart pub global activate flint_dart
2) Create a New Project #
flint create my_fullstack_app
cd my_fullstack_app
flint run
3) Add to an Existing Project #
dart pub add flint_dart
💡 Quickstarts #
1. Declarative Web UI with SSR & SEO (package:flint_dart/ui.dart) #
Flint UI is natively built-in. Build Flutter-like components with reactive state, modern design tokens, and built-in SEO metadata:
import 'package:flint_dart/ui.dart';
class HomePage extends FlintComponent {
HomePage(super.props);
@override
FlintNode build() {
return AppShell(
topbar: Topbar(title: 'Flint Fullstack App'),
child: Container(
padding: Spacing.all(24),
child: Column(
children: [
// Built-in SEO head configuration
Head(
title: 'Welcome to Flint Dart',
meta: [
Meta(name: 'description', content: 'The first fullstack declarative Dart web framework.'),
Meta(property: 'og:title', content: 'Flint Dart Fullstack Web'),
],
),
Text('Build Fullstack Apps in 100% Pure Dart', style: TextStyle(size: 28, weight: '700')),
Spacer(height: 16),
Row(
children: [
Button(
child: 'Get Started',
variant: ButtonVariant.solid,
onPressed: (_) => window.alert('Welcome to Flint!'),
),
Spacer(width: 12),
Link(
href: 'https://flintdart.dev',
child: 'Documentation',
variant: ButtonVariant.outline,
),
],
),
],
),
),
);
}
}
2. Fullstack Backend Server (package:flint_dart/flint_dart.dart) #
import 'package:flint_dart/flint_dart.dart';
import 'package:flint_dart/db.dart';
void main() async {
final app = Flint();
// Middleware
app.use(CorsMiddleware());
app.use(LoggerMiddleware());
// REST API Route
app.get('/api/users', (Context ctx) async {
final users = await User().all();
return ctx.res?.json(users.map((u) => u.toMap()).toList());
});
// Server-Side Rendered (SSR) Web UI Route
app.get('/', (Context ctx) async {
final users = await User().limit(5).get();
return ctx.res?.flintPage(
'HomePage',
title: 'Flint Dashboard',
props: {'users': users.map((u) => u.toMap()).toList()},
);
});
// Real-Time WebSocket Channel
app.websocket('/ws/chat', (Context ctx) {
ctx.socket?.on('message', (data) {
ctx.socket?.broadcast('message', data);
});
});
// Start Server
await app.listen(port: 3000);
}
3. Active Record Database ORM & Migrations (package:flint_dart/db.dart) #
import 'package:flint_dart/db.dart';
class User extends Model<User> {
User() : super(User.new);
String get name => getAttribute('name');
String get email => getAttribute('email');
@override
Table get table => Table(
name: 'users',
columns: [
Column(name: 'name', type: ColumnType.string, length: 255),
Column(name: 'email', type: ColumnType.string, length: 255),
Column(name: 'role', type: ColumnType.string, defaultValue: 'user'),
],
);
}
// Fluent Database Queries:
final user = await User().find(1);
final activeUsers = await User()
.where('role', 'admin')
.orderBy('created_at', desc: true)
.limit(10)
.get();
// Safe Mutators:
await User().create({
'name': 'Ada Lovelace',
'email': 'ada@example.com',
'role': 'admin',
});
🛠️ Complete Flint Ecosystem #
The Flint ecosystem is designed as a unified suite:
- ⚡
flint_dart: The flagship Fullstack Web Framework (Server, SSR, Web UI, and Database ORM). - 📱
flint_client: Standalone HTTP, WebSocket, & Database Client SDK for Flutter Mobile (iOS/Android), Desktop, and Web. - 🤖
flint_hardware: Embedded Systems, Robotics State Machines, and Multi-MCU code generators for ESP32, Raspberry Pi Pico, and STM32. - 🧠
flint_ai: Multi-provider AI agents, LLM tool callers, and autonomous workflow engines.
📚 Documentation & Community #
- Official Website & Guides: flintdart.dev
- Pub.dev Package: pub.dev/packages/flint_dart
- GitHub Repository: github.com/flint-dart/flint_dart
- Issue Tracker: github.com/flint-dart/flint_dart/issues
📄 License #
Flint Dart is licensed under the MIT License.