패키지, 저장소 및 앱 카테고리 검색

패키지 상세v5.4.0

crdt_lf

충돌 없는 복제 데이터 유형(CRDT) - Dart에서 제공하는 로컬 우선 구현

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.4천
좋아요
8
Pub 점수
160

패키지 설치

flutter pub add crdt_lf

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

crdt_lf는 로컬 우선 애플리케이션을 위한 충돌 없는 복제 데이터 유형(CRDT)의 Dart 구현입니다. 중앙 서버 없이 여러 장치 간에 데이터 일관성을 보장함으로써 원활한 실시간 협업을 가능하게 합니다. 풍부한 텍스트, 마크다운, HTML 에디터에 적합하며 오프라인 편집을 지원하고 연결이 복원되면 자동으로 충돌을 해결합니다. 이 패키지는 플랫폼 독립적이며 Android, iOS, Web, macOS, Windows, Linux에서 작동합니다.

사용 사례

  • 실시간 협업 텍스트 편집
  • 오프라인 우선 문서 편집
  • 리치 텍스트 앱을 위한 다기기 동기화
  • 탈중앙화 콘텐츠 관리
  • 장치 간에 마크다운 문서 동기화

주요 기능

  • 충돌 없는 데이터 동기화
  • 오프라인 작동을 지원합니다
  • 동시 편집의 자동 병합
  • 경량이고 효율적
  • 크로스 플랫폼 호환성
  • rich text 구조에 대한 내장 지원

적합한 대상

  • 협업 글쓰기 도구
  • 오프라인 사용 가능한 메모 앱
  • 분산 콘텐츠 편집기
  • 서버 없이 실시간 동기화가 필요한 앱
  • 로컬 우선 애플리케이션을 개발하는 개발자

고려 사항

  • 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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.