パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v5.4.0

crdt_lf

衝突フリーなレプリケートデータ型(CRDT)- Dartで提供されるローカルファースト実装

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
1370
いいね数
8
Pub ポイント
160

パッケージをインストール

flutter pub add crdt_lf

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

crdt_lf は、ローカルファーストアプリケーション向けに設計された、競合を回避するレプリケートデータ型(CRDT)のDart実装です。中央サーバーを必要とせずに、複数デバイス間でデータの一貫性を保ちながら、シームレスかつリアルタイムでのコラボレーションを可能にします。豊富なテキスト、Markdown、HTMLエディタに最適で、オフライン編集をサポートし、接続が復旧したときに自動的に競合を解決します。このパッケージはプラットフォーム非依存であり、Android、iOS、Web、macOS、Windows、Linuxで動作します。

用途

  • リアルタイム共同テキスト編集
  • オフライン優先のドキュメント編集
  • リッチテキストアプリのマルチデバイス同期
  • 分散型コンテンツ管理
  • デバイス間でMarkdownドキュメントを同期する

主な機能

  • 競合のないデータ同期
  • オフライン操作をサポート
  • 同時編集の自動マージ
  • 軽量で効率的
  • クロスプラットフォーム互換性
  • 豊富なテキスト構造の組み込みサポート

適している対象

  • 共同執筆ツール
  • オフライン対応のノートアプリ
  • 分散型コンテンツエディタ
  • サーバーなしでリアルタイム同期を必要とするアプリ
  • ローカルファーストアプリケーションを開発する開発者

注意事項

  • CRDTの原則を理解する必要がある
  • 大規模なデータセットではメモリ使用量が高くなる可能性があります
  • 最適化されていない場合、高頻度の更新には向かない
  • 基本的な例以外のドキュメントは限られている
  • バイナリデータよりも構造化テキストに適している

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

CRDT

github_starts melos_badge repo_size

logo

docs_badge

Apps

Packages

Roadmap

A roadmap is available in the project page. The roadmap provides a high-level overview of the project's goals and the current status of the project.

Workspace structure

This repository is a workspace that contains multiple packages and apps. Consistency is granted by the melos tool.

Melos

Melos (pub.dev) is a CLI tool for Dart/Flutter monorepos. It links the local packages together, so every package can depend on the others without publishing them first, and it runs the same command over all of them (format, analyze, test, publish, ...).

Every shared command lives in melos.yaml and runs with melos run <script>:

Script What it does
format formats the code (80 characters per line)
analyze runs the analyzer with warnings and infos as errors
test / test_flutter / test_chrome runs the Dart, Flutter and web tests
benchmark runs the benchmarks of every package with a benchmarks/ folder
devtools_build builds the DevTools extension
docs_bs / docs_build bootstraps and builds the documentation site
update_references propagates package/app references into the READMEs
Setup

The Flutter SDK is pinned with fvm, and the documentation site is a Docusaurus project, so Node.js (with npm) is required too.

fvm install                     # installs the pinned Flutter SDK
fvm dart pub get                # resolves the workspace tools (melos included)
fvm dart run melos bootstrap    # links the packages and prepares the examples
fvm dart run melos run docs_bs  # optional: installs the documentation site (needs Node.js)

Note Melos is a dev_dependency of the root pubspec.yaml, so running it as fvm dart run melos ... is the safest option: you use the melos version pinned by this repository, with the Flutter/Dart SDK pinned by fvm. A globally activated melos (dart pub global activate melos) works as well, but it may be a different version than the one the workspace expects, and the difference usually shows up at the worst possible moment 🙃.

A command is provided to try to publish all packages:

fvm dart run melos publish --dry-run

This ensures that every package is formatted, analyzed, tested and built.

Organization

The repository structure is organized as follows:

workspace/
├── melos.yaml # melos configuration file
├── packages/ # contains every package of the workspace
│   ├── core/ # the CRDT engine and its bindings
│   │   ├── crdt_lf/
│   │   │   ├── lib/
│   │   │   ├── example/
│   │   │   └── flutter_example/
│   │   └── .../
│   ├── adapters/
│   │   └── persistence/ # storage backends for crdt_lf
│   │       ├── crdt_lf_drift/
│   │       ├── crdt_lf_hive/
│   │       └── crdt_lf_sqlite/
│   └── _internal/ # private, unpublished packages
│       ├── benchmark_infrastructure/
│       └── shared_examples_infrastructure/
├── apps/ # contains the applications built on top of the packages
│   └── greyhound_markdown/
│       ├── client/
│       └── server/
├── docs/ # the documentation site (Docusaurus, Node.js project)
├── scripts/ # dart scripts used by the melos commands
└── assets/ # contains the assets used in the documentation
    └── .../
VS Code

If you work with VS Code, the repository already contains a .vscode folder with:

  • the recommended extensions (Dart, Flutter, Melos, Mermaid);
  • the settings (fvm SDK path, project dictionary for the spell checker);
  • the launch configurations for the apps and the examples;
  • the snippets used in the READMEs and the changelogs.

Accepting the recommended extensions gives you the smoothest experience on this workspace.

Contributing

Contributions are welcome: bug fixes, new features, documentation, performance work, or anything else — a fixed typo counts too 💚.

The whole flow (roadmap, issues, pull requests, AI-assisted work) is described in CONTRIBUTING.md. Please read it before opening an issue or a pull request.

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。