DRFT
DRFT (pronounced "drift") stands for Dart Resource Framework Toolkit. The name "drift" refers to the concept of infrastructure drift - when your actual resources diverge from their desired state. DRFT helps you detect and correct this drift by comparing desired resources (defined in code) with actual resources (what exists in the system).
DRFT is a resource management framework written in Dart. It allows you to describe and manage resources declaratively using Dart code, leveraging Dart's expressive syntax and type system.
What is DRFT?
DRFT is a framework for managing resources of any kind - from cloud infrastructure to project configuration, application setup, and more. It enables you to:
- Declare resources using clean, type-safe Dart code
- Compare states between desired and actual resources
- Plan changes before applying them
- Execute changes to bring resources to the desired state
- Manage state to track your resources
While DRFT excels at infrastructure-as-code (IaC) scenarios, it's designed to be a general-purpose resource management framework applicable to many different use cases.
Basic Example
import 'package:drft/drft.dart';
void main() async {
final stack = DrftStack(
name: 'my-stack',
providers: [
MockProvider(), // For testing
],
resources: [
// Your resources here
],
);
// Plan changes
final plan = await stack.plan();
print(plan.summary);
// Apply changes
final result = await stack.apply(plan);
print(result.summary);
}
Key Features
- Type Safety: Leverage Dart's strong typing for resource definitions
- Immutable Resources: Flutter-style immutable resources with final properties
- Clean Syntax: Familiar Dart constructor syntax, just like Flutter widgets
- State Management: Automatic state tracking and comparison
- Dependency Resolution: Automatic handling of resource dependencies
- Plan Before Apply: Always see what will change before making changes
- Extensible: Easy to add new providers and resources
- Idempotent: Running the same configuration multiple times is safe
Use Cases
DRFT can be used to manage various types of resources:
- Infrastructure as Code (IaC): Cloud infrastructure, servers, databases, networks
- Project Setup: Development environments, tooling configuration, CI/CD pipelines
- Application Configuration: App store listings, Firebase projects, API configurations
- Any Declarative Resource: Anything that can be described, planned, and managed declaratively
Getting Started
- Getting Started Guide - Set up DRFT in your project
- Examples - Real-world examples and use cases
Core Concepts
- Core Concepts - Understanding DRFT fundamentals
- Architecture - System design and components
- Resources - Understanding resources
- Providers - Working with providers
- State Management - How state works
Guides
- Dependent Resources - Managing resource dependencies
- Creating Providers - Building custom providers
- Creating Resources - Defining custom resources
Provider Guides
- Firebase Provider - Configure Firebase resources
- App Store Provider - Manage App Store Connect resources
Project Status
ā Phase 1 Complete - Core framework is implemented and functional. Currently working on provider implementations.
For Dart/Flutter Developers
If you're already working with Dart and Flutter, DRFT feels natural. The syntax is familiar, the type system is the same, and you can leverage your existing Dart knowledge.
Type Safety
Unlike configuration-based tools, DRFT provides compile-time type checking. Catch errors before they reach production.
Clean Syntax
Define resources the same way you define Flutter widgets - with clean, declarative constructors.
final stack = DrftStack(
name: 'production',
providers: [FirebaseProvider()],
resources: [
FirebaseApp(
id: 'ios-app',
projectId: 'my-project',
platform: FirebaseAppPlatform.ios,
displayName: 'My App',
),
],
);
License
This project is licensed under the BSD-3-Clause License. See the LICENSE file for details.