सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
crdt_lf एक डार्ट इम्प्लीमेंटेशन है जो संघर्ष-मुक्त प्रतिलिपि डेटा प्रकार (CRDTs) के लिए लोकल-फर्स्ट एप्लिकेशन के लिए डिज़ाइन किया गया है। यह बिना केंद्रीय सर्वर के बहुत उपकरणों के बीच डेटा सुसंगतता सुनिश्चित करके बिना बाधा के तत्काल सहयोग की अनुमति देता है। यह धन्यवाद, मार्कडाउन और HTML एडिटर के लिए आदर्श है, ऑफलाइन संपादन का समर्थन करता है और जब कनेक्शन पुनर्स्थापित होता है तो स्वचालित रूप से टकराव का समाधान करता है। यह पैकेज प्लेटफॉर्म-अनार्सिक है, जो Android, iOS, Web, macOS, Windows और Linux पर काम करता है।
उपयोग
रियल-टाइम सहयोगी पाठ संपादन
ऑफलाइन-प्रथम दस्तावेज़ संपादन
समृद्ध पाठ एप्लिकेशन के लिए बहु-उपकरण सिंक
डेसेंट्रलाइज्ड कंटेंट मैनेजमेंट
उपकरणों के बीच मार्कडाउन दस्तावेज़ सिंक करना
मुख्य विशेषताएँ
टकराव-मुक्त डेटा सिंक्रनाइजेशन
ऑफलाइन संचालन का समर्थन करता है
समानांतर संपादनों का स्वचालित मर्ज
हल्का और कारगर
क्रॉस-प्लेटफॉर्म संगतता
समृद्ध पाठ संरचनाओं के लिए निर्मित समर्थन
इनके लिए उपयुक्त
सहयोगात्मक लेखन उपकरण
ऑफलाइन क्षमता वाले नोट-टेकिंग ऐप्स
वितरित सामग्री संपादक
सर्वर के बिना रियल-टाइम सिंक की आवश्यकता वाले ऐप्स
स्थानीय-पहले एप्लिकेशन बना रहे विकासकर्ता
विचार योग्य बातें
CRDT सिद्धांतों के बारे में समझने की आवश्यकता है
बड़े डेटासेट के साथ अधिक मेमोरी उपयोग हो सकता है
बिना अनुकूलन के उच्च आवृत्ति अपडेट के लिए उपयुक्त नहीं
मूल उदाहरणों के अलावा सीमित दस्तावेज़न
संरचित पाठ के लिए बेहतरीन, बाइनरी डेटा के लिए नहीं
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
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.