Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
562 changes: 37 additions & 525 deletions Cargo.lock

Large diffs are not rendered by default.

21 changes: 2 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
[workspace]
members = [
"collab",
"collab-database",
"collab-user",
"collab-entity",
"collab-document",
"collab-folder",
"collab-plugins",
"collab-importer",
]
members = ["collab"]
resolver = "2"

[workspace.dependencies]
collab = { path = "collab" }
collab-database = { path = "collab-database" }
collab-plugins = { path = "collab-plugins" }
collab-user = { path = "collab-user" }
collab-entity = { path = "collab-entity" }
collab-document = { path = "collab-document" }
collab-folder = { path = "collab-folder" }
collab-importer = { path = "collab-importer" }
yrs = { version = "0.24", features = ["sync"] }
anyhow = "1.0.94"
thiserror = "1.0.39"
Expand All @@ -37,4 +20,4 @@ futures-lite = { version = "2.6.0", features = ["futures-io"] }
[patch.crates-io]
# We're using a specific commit here because rust-rocksdb doesn't publish the latest version that includes the memory alignment fix.
# For more details, see https://github.com/rust-rocksdb/rust-rocksdb/pull/868
rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "1710120e4549e04ba3baa6a1ee5a5a801fa45a72" }
rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "1710120e4549e04ba3baa6a1ee5a5a801fa45a72" }
42 changes: 0 additions & 42 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,45 +76,3 @@ default_to_workspace = false

[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true

[tasks.wasm_build]
script_runner = "bash"
script = [
"""
#!/bin/bash
BASE_DIR=$(pwd)
crates=("collab" "collab-document" "collab-folder" "collab-user" "collab-plugins")

# Iterate over each crate and build it
for crate in "${crates[@]}"; do
echo "🔥🔥🔥 Building $crate with wasm-pack..."

# Navigate to the crate directory
cd "$BASE_DIR/$crate" || { echo "Failed to enter directory $crate"; exit 1; }

# Build the crate
wasm-pack build || { echo "Build failed for $crate"; exit 1; }
done
"""
]

[tasks.wasm_test]
script_runner = "bash"
script = [
"""
#!/bin/bash
BASE_DIR=$(pwd)
crates=("collab-plugins")

# Iterate over each crate and build it
for crate in "${crates[@]}"; do
echo "🔥🔥🔥 Running $crate tests with wasm-pack..."

# Navigate to the crate directory
cd "$BASE_DIR/$crate" || { echo "Failed to enter directory $crate"; exit 1; }

# Build the crate
wasm-pack test --headless --firefox
done
"""
]
37 changes: 11 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@

# AppFlowy-Collab

`AppFlowy-Collab` is a project that aims to support the collaborative features of AppFlowy. It consists of several crates that are currently under active development:

* `collab`
* `collab-database`
* `collab-document`
* `collab-folder`
* `collab-plugins`
* `collab-sync`
`AppFlowy-Collab` is a project that aims to support the collaborative features of AppFlowy. The workspace now centers on
the `collab` crate, which houses database, document, folder, importer, plugin, and user functionality under a single
module tree.

![architecture.png](resources/crate_arch.png)

Expand All @@ -18,23 +13,13 @@ ones are refined.

## collab
The `collab` crate is built on top of the [yrs](https://docs.rs/yrs/latest/yrs/) crate, providing a higher level of
abstraction for the collaborative features of AppFlowy. It offers a simple API for creating and managing collaborative
documents.

## collab-database
The `collab-database` crate provides a simple API for creating and managing collaborative databases. It is built on top
of the `collab` crate.

## collab-document
The `collab-document` crate provides a simple API for creating and managing collaborative documents. It is built on top
of the `collab` crate.

## collab-folder
The `collab-folder` crate provides a simple API for creating and managing collaborative folders. It is built on top of
the `collab` crate.
abstraction for the collaborative features of AppFlowy. It exposes cohesive modules:

## collab-plugins
The `collab-plugins` crate contains a list of plugins that can be used with the `collab` crate.
- Entity definitions and protobuf types under `collab::entity`.
- Database, document, folder, importer, plugin, and user services under `collab::database`, `collab::document`,
`collab::folder`, `collab::importer`, `collab::plugins`, and `collab::user`.
- The plugin subsystem (`collab::plugins`) is guarded by the optional `plugins` Cargo feature; enable it when you
need local/remote persistence helpers.

## collab-sync
The `collab-sync` crate supports syncing the collaborative documents to a remote server.
With everything consolidated, consumers only need to depend on the `collab` crate to access the full collaborative
feature set.
63 changes: 0 additions & 63 deletions collab-database/Cargo.toml

This file was deleted.

67 changes: 0 additions & 67 deletions collab-database/src/error.rs

This file was deleted.

Loading
Loading