flint_dart 1.0.0%2B5

SDKdartflutter
Platformandroidioswindowslinuxmacos

A minimal Dart backend framework by Eulogia Technologies.

Flint Dart 🔥

Flint Dart is a minimal, expressive, and extensible server-side framework built with Dart. Inspired by the simplicity of Express.js and Laravel, Flint provides an elegant developer experience for building RESTful APIs and backend services with Dart.

Developed and maintained by Eulogia Technologies.

📚 Table of Contents

TopicDescription
🚀 Getting StartedSet up Flint in your project
🛣️ RoutingDefine routes for your Flint Dart app
🛡 MiddlewareProtect and modify requests with middleware
🗄 ORM & ModelsWork with databases using Flint Dart ORM
💾 Database & MigrationsManage your database schema and migrations
🔑 AuthenticationBuilt-in authentication and Google Auth support
✅ ValidationValidate input like Laravel
♻️ Hot ReloadInstant feedback while developing
💾 StorageStorage Flint Dart to production
🚢 DeploymentDeploy Flint Dart to production
📖 API DocsBest-in-class API documentation with Swagger UI

✨ Features

  • 🧱 Simple and intuitive routing
  • 🛡️ Middleware support
  • 🔐 Built-in JWT authentication
  • 🔒 Secure password hashing
  • ♻️ Hot reload support for rapid development
  • 🧪 Modular structure for scalable projects
  • 💡 Clean API design inspired by Flutter's widget philosophy
  • ORM for MySQL/Postgres
  • CLI for migrations, models, etc.

🚀 Getting Started

1. Install as a Global Package

If you want to quickly create and run apps without adding Flint as a dependency, install it globally:

dart pub global activate flint_dart
flint create new_app   # Create a new Flint project
flint run              # Run the project

2. Add as a Project Dependency

If you prefer Flint to be part of your project’s dependencies:

dart pub add flint_dart
dart run 
import 'package:flint_dart/flint_dart.dart';

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

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

  app.listen(3000);
}

3. Run with hot reload



app.get('/hello', (req, res) async {
  return res.json({'message': 'Hello, world!'});
});

Middleware


import 'package:flint_dart/flint_dart.dart';

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

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

JWT Authentication

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

Password Hashing

final hash = Hashing.hashPassword('mySecret');
final isValid = Hashing.verifyPassword('mySecret', hash);

📁 Project Structure

lib/
├── main.dart
├── src/
│   ├── app.dart
│   ├── router.dart
│   ├── request.dart
│   ├── response.dart
│   ├── middleware.dart
│   └── security/
│       ├── jwt_util.dart
│       └── hashing.dart

📮 Contact & Support 🌐 Website: flintdart.eulogia.net

📧 Email: eulogiatechnologies@gmail.com

🐙 GitHub: github.com/eulogiatechnologies/flint_dart

🛠 Contributing We welcome contributions! To get started:

git clone https://github.com/eulogiatechnologies/flint_dart.git
cd flint_dart
dart pub get

Then feel free to submit issues or pull requests.