Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coralline Ecosystem

coralline coralline_extensions coralline_flutter License: Apache-2.0 Flutter SDK Dart SDK

"Don't write boilerplates. To handle complex reactive pipelines, all you have to do is call a line (Coralline)."
Stop tangling your logic wires—a composable pipeline for reactive structures. Simply call a line.

Coralline is a high-performance, zero-overhead Dart & Flutter reactive state management framework powered by CORAL (Chain of Reactivity And Lazy-computation). Designed to solve computational flooding and verbosity in state management, Coralline models state processing after Flutter's RenderObject pipeline: Push-Dirty ($O(1)$) + Pull-Data (Lazy).



📦 Packages in this Repository

Package pub.dev Description
coralline pub package Pure Dart core engine implementing the Chain of Reactivity and Lazy Computation pipeline architecture.
coralline_extensions pub package Official extension library for reactive operations on Dart Future, Stream, Iterable, and List.
coralline_flutter pub package High-performance Flutter state management framework with zero-allocation single-dependency components and $O(1)$ context resolution.


💡 Why Coralline?

Traditional push-based reactive frameworks (e.g., standard Streams or Signals) continuously flood heavy data payloads downstream on every mutation.

flowchart LR
    A0["Data Change"] -->|"Compute & Push"| B0["Intermediate Stage 1"]
    B0 -->|"Compute & Push"| C0["Intermediate Stage 2"]
    C0 -->|"Compute & Push"| D0["UI Rebuild"]
Loading

Coralline decouples dirty notification from data computation into two distinct phases:

Phase 1: Push-Dirty (COR: Chain of Reactivity)

flowchart LR
    A1["CoralController"] -->|"Push-Dirty O(1)"| B1["CoralBroadcaster"]
    B1 --> C1["Coral.diverge"]
    C1 --> D1["Trunk.converge"]
    D1 -->|"O(1) Invalidation"| E1["CoralTerminal.onDirty"]
    E1 --> F1["UI Render Queue"]
Loading

(No data computation or memory allocation occurs during state mutation; only a lightweight $O(1)$ dirty flag is broadcast)

Phase 2: Pull-Data (AL: And Lazy-computation)

flowchart RL
    F2["UI Render (Display)"] -->|"VSYNC Render Tick"| E2["CoralTerminal.snapshot"]
    E2 --> D2["Trunk.converge"]
    D2 -->|"Upstream Pull"| C2["Coral.diverge"]
    C2 --> B2["CoralBroadcaster"]
    B2 -->|"Fetch Cached Data"| A2["CoralController"]
Loading

(Data computation occurs strictly on demand during frame rendering, caching intermediate results automatically)



🚀 Quick Start (Flutter)

Add coralline_flutter to your pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter
  coralline_flutter: ^0.1.0

1:1 Inline Reactive Widget Example

import 'package:flutter/material.dart';
import 'package:coralline_flutter/coralline_flutter.dart';

void main() => runApp(CounterApp());

class CounterApp extends StatelessWidget {
  CounterApp({super.key});

  final counterController = CoralController<int>(0);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Coralline Counter Example')),
        body: Center(
          child: counterController.provider.coral
              .map((count) => Text(
                    'Count: $count',
                    style: const TextStyle(fontSize: 28, fontWeight: FontWeight.bold),
                  ))
              .toWidget(),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () => counterController.set(counterController.data + 1),
          child: const Icon(Icons.add),
        ),
      ),
    );
  }
}


📚 Technical Documentation & Manuals

Explore the in-depth documentation in the coralline/doc/manual directory:

  1. 🚀 Quickstart & Core Concepts Guide — Build your first reactive pipeline in 5 minutes.
  2. 🔀 Pipeline & Broadcasting Guide — Master 1:N sharing (CoralBroadcaster), dynamic topology (CoralCoupler), and snapshots.
  3. 📖 Public API Reference Manual — Complete catalog of all public Classes, Mixins, and Extensions.
  4. 🔬 Flutter & Dart Engineering Whitepaper — Deep technical analysis of Push-Dirty Pull-Data, Fasttrack $O(1)$, and Wasm performance.


📄 License

Coralline ecosystem libraries are licensed under the Apache License 2.0.

About

A reactive state management framework for Flutter based on chain of reactivity and lazy computation pipeline.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages