flint_dart 1.0.0+2 copy "flint_dart: ^1.0.0+2" to clipboard
flint_dart: ^1.0.0+2 copied to clipboard

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.


โœจ 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

๐Ÿš€ 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 {
    res.send('Welcome to Flint Dart!');
  });

  app.listen(3000);
}

3. Run with hot reload #



app.get('/hello', (req, res) async {
  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") {
        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.

7
likes
0
points
14
downloads

Publisher

verified publisherflintdart.eulogia.net

Weekly Downloads

A minimal Dart backend framework by Eulogia Technologies.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

bcrypt, crypto, dart_jsonwebtoken, mime, mysql_dart, postgres, sqlite3, uuid

More

Packages that depend on flint_dart