Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: rm flowy-user-data-model crate

appflowy8963561355da
diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock
index b3916ec2ec..afd27f512f 100644
--- a/frontend/rust-lib/Cargo.lock
+++ b/frontend/rust-lib/Cargo.lock
@@ -999,7 +999,6 @@ dependencies = [
"flowy-sync",
"flowy-text-block",
"flowy-user",
- "flowy-user-data-model",
"futures-util",
"http-flowy",
"hyper",
@@ -1182,11 +1181,11 @@ dependencies = [
"dart-notify",
"diesel",
"diesel_derives",
+ "fancy-regex",
"flowy-database",
"flowy-derive",
"flowy-error",
"flowy-test",
- "flowy-user-data-model",
"futures",
"lazy_static",
"lib-dispatch",
@@ -1202,22 +1201,6 @@ dependencies = [
"strum_macros",
"tokio",
"tracing",
-]
-
-[[package]]
-name = "flowy-user-data-model"
-version = "0.1.0"
-dependencies = [
- "bytes",
- "derive_more",
- "fancy-regex",
- "flowy-derive",
- "flowy-error-code",
- "lazy_static",
- "lib-infra",
- "log",
- "protobuf",
- "serde",
"unicode-segmentation",
"validator",
]
@@ -3613,9 +3596,9 @@ dependencies = [
[[package]]
name = "validator"
-version = "0.12.0"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "841d6937c33ec6039d8071bcf72933146b5bbe378d645d8fa59bdadabfc2a249"
+checksum = "f07b0a1390e01c0fc35ebb26b28ced33c9a3808f7f9fbe94d3cc01e233bfeed5"
dependencies = [
"idna",
"lazy_static",
@@ -3624,15 +3607,8 @@ dependencies = [
"serde_derive",
"serde_json",
"url",
- "validator_types",
]
-[[package]]
-name = "validator_types"
-version = "0.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad9680608df133af2c1ddd5eaf1ddce91d60d61b6bc51494ef326458365a470a"
-
[[package]]
name = "vcpkg"
version = "0.2.15"
diff --git a/frontend/rust-lib/flowy-folder/Cargo.toml b/frontend/rust-lib/flowy-folder/Cargo.toml
index de149a4d9b..e099df9629 100644
--- a/frontend/rust-lib/flowy-folder/Cargo.toml
+++ b/frontend/rust-lib/flowy-folder/Cargo.toml
@@ -33,8 +33,8 @@ lazy_static = "1.4.0"
serde = { version = "1.0", features = ["derive"] }
tracing = { version = "0.1", features = ["log"] }
bytes = { version = "1.0" }
-
unicode-segmentation = "1.8"
+
[dev-dependencies]
serde_json = "1.0"
flowy-folder = { path = "../flowy-folder", features = ["flowy_unit_test"]}
diff --git a/frontend/rust-lib/flowy-net/Cargo.toml b/frontend/rust-lib/flowy-net/Cargo.toml
index 5ba64866e5..6096f18ea3 100644
--- a/frontend/rust-lib/flowy-net/Cargo.toml
+++ b/frontend/rust-lib/flowy-net/Cargo.toml
@@ -11,7 +11,6 @@ flowy-error = { path = "../flowy-error", features = ["collaboration", "http_serv
flowy-derive = { path = "../../../shared-lib/flowy-derive" }
flowy-sync = { path = "../../../shared-lib/flowy-sync"}
flowy-folder-data-model = { path = "../../../shared-lib/flowy-folder-data-model"}
-flowy-user-data-model = { path = "../../../shared-lib/flowy-user-data-model"}
flowy-folder = { path = "../flowy-folder" }
flowy-user = { path = "../flowy-user" }
flowy-text-block = { path = "../flowy-text-block" }
@@ -46,7 +45,6 @@ dart = [
"flowy-user/dart",
"flowy-sync/dart",
"flowy-error/dart",
- "flowy-user-data-model/dart",
"flowy-folder-data-model/dart"
]
diff --git a/frontend/rust-lib/flowy-net/src/http_server/user.rs b/frontend/rust-lib/flowy-net/src/http_server/user.rs
index 875f696e21..faf5621161 100644
--- a/frontend/rust-lib/flowy-net/src/http_server/user.rs
+++ b/frontend/rust-lib/flowy-net/src/http_server/user.rs
@@ -1,9 +1,9 @@
use crate::{configuration::*, request::HttpRequestBuilder};
use flowy_error::FlowyError;
-use flowy_user::event_map::UserCloudService;
-use flowy_user_data_model::entities::{
+use flowy_user::entities::{
SignInParams, SignInResponse, SignUpParams, SignUpResponse, UpdateUserProfileParams, UserProfile,
};
+use flowy_user::event_map::UserCloudService;
use http_flowy::errors::ServerError;
use lib_infra::future::FutureResult;
diff --git a/frontend/rust-lib/flowy-net/src/local_server/server.rs b/frontend/rust-lib/flowy-net/src/local_server/server.rs
index ec7b9db0cd..cdec4d0c48 100644
--- a/frontend/rust-lib/flowy-net/src/local_server/server.rs
+++ b/frontend/rust-lib/flowy-net/src/local_server/server.rs
@@ -262,10 +262,10 @@ use flowy_folder_data_model::revision::{
gen_app_id, gen_workspace_id, AppRevision, TrashRevision, ViewRevision, WorkspaceRevision,
};
use flowy_text_block::BlockCloudService;
-use flowy_user::event_map::UserCloudService;
-use flowy_user_data_model::entities::{
+use flowy_user::entities::{
SignInParams, SignInResponse, SignUpParams, SignUpResponse, UpdateUserProfileParams, UserProfile,
};
+use flowy_user::event_map::UserCloudService;
use lib_infra::{future::FutureResult, util::timestamp};
impl FolderCouldServiceV1 for LocalServer {
diff --git a/frontend/rust-lib/flowy-user/Cargo.toml b/frontend/rust-lib/flowy-user/Cargo.toml
index 96e6141ed6..b7127b69a9 100644
--- a/frontend/rust-lib/flowy-user/Cargo.toml
+++ b/frontend/rust-lib/flowy-user/Cargo.toml
@@ -6,7 +6,6 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-flowy-user-data-model = { path = "../../../shared-lib/flowy-user-data-model" }
flowy-derive = { path = "../../../shared-lib/flowy-derive" }
flowy-database = { path = "../flowy-database" }
flowy-error = { path = "../flowy-error", features = ["db", "http_server"] }
@@ -29,7 +28,9 @@ parking_lot = "0.11"
strum = "0.21"
strum_macros = "0.21"
tokio = { version = "1", features = ["rt"] }
-
+unicode-segmentation = "1.8"
+validator = "0.15"
+fancy-regex = "0.10.0"
[dev-dependencies]
flowy-test = { path = "../flowy-test" }
diff --git a/frontend/rust-lib/flowy-user/Flowy.toml b/frontend/rust-lib/flowy-user/Flowy.toml
index 9994320410..7ca5466b30 100644
--- a/frontend/rust-lib/flowy-user/Flowy.toml
+++ b/frontend/rust-lib/flowy-user/Flowy.toml
@@ -1,3 +1,3 @@
# Check out the FlowyConfig (located in flowy_toml.rs) for more details.
-proto_input = ["src/event_map.rs", "src/dart_notification.rs"]
+proto_input = ["src/entities", "src/event_map.rs", "src/dart_notification.rs"]
event_files = ["src/event_map.rs"]
\ No newline at end of file
diff --git a/shared-lib/flowy-user-data-model/src/entities/auth.rs b/frontend/rust-lib/flowy-user/src/entities/auth.rs
similarity index 95%
rename from shared-lib/flowy-user-data-model/src/entities/auth.rs
rename to frontend/rust-lib/flowy-user/src/entities/auth.rs
index 4e9cf59243..14224ae231 100644
--- a/shared-lib/flowy-user-data-model/src/entities/auth.rs
+++ b/frontend/rust-lib/flowy-user/src/entities/auth.rs
@@ -1,8 +1,7 @@
-use std::convert::TryInto;
-
+use crate::entities::parser::{UserEmail, UserName, UserPassword};
+use crate::errors::ErrorCode;
use flowy_derive::ProtoBuf;
-
-use crate::{errors::*, parser::*};
+use std::convert::TryInto;
#[derive(ProtoBuf, Default)]
pub struct SignInPayload {
diff --git a/shared-lib/flowy-user-data-model/src/entities/mod.rs b/frontend/rust-lib/flowy-user/src/entities/mod.rs
similarity index 88%
rename from shared-lib/flowy-user-data-model/src/entities/mod.rs
rename to frontend/rust-lib/flowy-user/src/entities/mod.rs
index e7214db5ca..18e64885dc 100644
--- a/shared-lib/flowy-user-data-model/src/entities/mod.rs
+++ b/frontend/rust-lib/flowy-user/src/entities/mod.rs
@@ -3,5 +3,6 @@ pub use user_profile::*;
pub use user_setting::*;
pub mod auth;
+pub mod parser;
mod user_profile;
mod user_setting;
diff --git a/shared-lib/flowy-user-data-model/src/parser/mod.rs b/frontend/rust-lib/flowy-user/src/entities/parser/mod.rs
similarity index 100%
rename from shared-lib/flowy-user-data-model/src/parser/mod.rs
rename to frontend/rust-lib/flowy-user/src/entities/parser/mod.rs
diff --git a/shared-lib/flowy-user-data-model/src/parser/user_email.rs b/frontend/rust-lib/flowy-user/src/entities/parser/user_email.rs
similarity index 100%
rename from shared-lib/flowy-user-data-model/src/parser/user_email.rs
rename to frontend/rust-lib/flowy-user/src/entities/parser/user_email.rs
diff --git a/shared-lib/flowy-user-data-model/src/parser/user_id.rs b/frontend/rust-lib/flowy-user/src/entities/parser/user_id.rs
similarity index 100%
rename from shared-lib/flowy-user-data-model/src/parser/user_id.rs
rename to frontend/rust-lib/flowy-user/src/entities/parser/user_id.rs
diff --git a/shared-lib/flowy-user-data-model/src/parser/user_name.rs b/frontend/rust-lib/flowy-user/src/entities/parser/user_name.rs
similarity index 100%
rename from shared-lib/flowy-user-data-model/src/parser/user_name.rs
rename to frontend/rust-lib/flowy-user/src/entities/parser/user_name.rs
diff --git a/shared-lib/flowy-user-data-model/src/parser/user_password.rs b/frontend/rust-lib/flowy-user/src/entities/parser/user_password.rs
similarity index 100%
rename from shared-lib/flowy-user-data-model/src/parser/user_password.rs
rename to frontend/rust-lib/flowy-user/src/entities/parser/user_password.rs
diff --git a/shared-lib/flowy-user-data-model/src/parser/user_workspace.rs b/frontend/rust-lib/flowy-user/src/entities/parser/user_workspace.rs
similarity index 100%
rename from shared-lib/flowy-user-data-model/src/parser/user_workspace.rs
rename to frontend/rust-lib/flowy-user/src/entities/parser/user_workspace.rs
diff --git a/shared-lib/flowy-user-data-model/src/entities/user_profile.rs b/frontend/rust-lib/flowy-user/src/entities/user_profile.rs
similarity index 97%
rename from shared-lib/flowy-user-data-model/src/entities/user_profile.rs
rename to frontend/rust-lib/flowy-user/src/entities/user_profile.rs
index b5519e6812..82553e8050 100644
--- a/shared-lib/flowy-user-data-model/src/entities/user_profile.rs
+++ b/frontend/rust-lib/flowy-user/src/entities/user_profile.rs
@@ -2,8 +2,8 @@ use flowy_derive::ProtoBuf;
use std::convert::TryInto;
use crate::{
+ entities::parser::{UserEmail, UserId, UserName, UserPassword},
errors::ErrorCode,
- parser::{UserEmail, UserId, UserName, UserPassword},
};
#[derive(Default, ProtoBuf)]
diff --git a/shared-lib/flowy-user-data-model/src/entities/user_setting.rs b/frontend/rust-lib/flowy-user/src/entities/user_setting.rs
similarity index 100%
rename from shared-lib/flowy-user-data-model/src/entities/user_setting.rs
rename to frontend/rust-lib/flowy-user/src/entities/user_setting.rs
diff --git a/frontend/rust-lib/flowy-user/src/event_map.rs b/frontend/rust-lib/flowy-user/src/event_map.rs
index 8445d4a47c..348da177d3 100644
--- a/frontend/rust-lib/flowy-user/src/event_map.rs
+++ b/frontend/rust-lib/flowy-user/src/event_map.rs
@@ -1,7 +1,7 @@
-use crate::{errors::FlowyError, handlers::*, services::UserSession};
-use flowy_user_data_model::entities::{
+use crate::entities::{
SignInParams, SignInResponse, SignUpParams, SignUpResponse, UpdateUserProfileParams, UserProfile,
};
+use crate::{errors::FlowyError, handlers::*, services::UserSession};
use lib_dispatch::prelude::*;
use lib_infra::future::FutureResult;
use std::sync::Arc;
diff --git a/frontend/rust-lib/flowy-user/src/handlers/auth_handler.rs b/frontend/rust-lib/flowy-user/src/handlers/auth_handler.rs
index b5d667bcbe..22a17d887c 100644
--- a/frontend/rust-lib/flowy-user/src/handlers/auth_handler.rs
+++ b/frontend/rust-lib/flowy-user/src/handlers/auth_handler.rs
@@ -1,6 +1,6 @@
+use crate::entities::*;
use crate::services::UserSession;
use flowy_error::FlowyError;
-use flowy_user_data_model::entities::*;
use lib_dispatch::prelude::*;
use std::{convert::TryInto, sync::Arc};
diff --git a/frontend/rust-lib/flowy-user/src/handlers/user_handler.rs b/frontend/rust-lib/flowy-user/src/handlers/user_handler.rs
index c635f326c1..6ee62519e7 100644
--- a/frontend/rust-lib/flowy-user/src/handlers/user_handler.rs
+++ b/frontend/rust-lib/flowy-user/src/handlers/user_handler.rs
@@ -1,8 +1,8 @@
-use crate::{errors::FlowyError, services::UserSession};
-use flowy_database::kv::KV;
-use flowy_user_data_model::entities::{
+use crate::entities::{
AppearanceSettings, UpdateUserProfileParams, UpdateUserProfilePayload, UserProfile, APPEARANCE_DEFAULT_THEME,
};
+use crate::{errors::FlowyError, services::UserSession};
+use flowy_database::kv::KV;
use lib_dispatch::prelude::*;
use std::{convert::TryInto, sync::Arc};
diff --git a/frontend/rust-lib/flowy-user/src/lib.rs b/frontend/rust-lib/flowy-user/src/lib.rs
index 18ef8e72e0..dea55778fd 100644
--- a/frontend/rust-lib/flowy-user/src/lib.rs
+++ b/frontend/rust-lib/flowy-user/src/lib.rs
@@ -1,4 +1,5 @@
mod dart_notification;
+pub mod entities;
pub mod event_map;
mod handlers;
pub mod protobuf;
@@ -11,7 +12,3 @@ extern crate flowy_database;
pub mod errors {
pub use flowy_error::*;
}
-
-pub mod entities {
- pub use flowy_user_data_model::entities::*;
-}
diff --git a/frontend/rust-lib/flowy-user/src/services/database.rs b/frontend/rust-lib/flowy-user/src/services/database.rs
index 6a76b0a021..eaf5b7f6cb 100644
--- a/frontend/rust-lib/flowy-user/src/services/database.rs
+++ b/frontend/rust-lib/flowy-user/src/services/database.rs
@@ -1,7 +1,7 @@
+use crate::entities::{SignInResponse, SignUpResponse, UpdateUserProfileParams, UserProfile};
use flowy_database::ConnectionPool;
use flowy_database::{schema::user_table, DBConnection, Database};
use flowy_error::{ErrorCode, FlowyError};
-use flowy_user_data_model::entities::{SignInResponse, SignUpResponse, UpdateUserProfileParams, UserProfile};
use lazy_static::lazy_static;
use parking_lot::RwLock;
use std::{collections::HashMap, sync::Arc, time::Duration};
diff --git a/frontend/rust-lib/flowy-user/src/services/notifier.rs b/frontend/rust-lib/flowy-user/src/services/notifier.rs
index 6bebc33cfb..9500988d99 100644
--- a/frontend/rust-lib/flowy-user/src/services/notifier.rs
+++ b/frontend/rust-lib/flowy-user/src/services/notifier.rs
@@ -1,4 +1,4 @@
-use flowy_user_data_model::entities::UserProfile;
+use crate::entities::UserProfile;
use tokio::sync::{broadcast, mpsc};
#[derive(Clone)]
diff --git a/frontend/rust-lib/flowy-user/src/services/user_session.rs b/frontend/rust-lib/flowy-user/src/services/user_session.rs
index 8167b05a19..48e6ef9661 100644
--- a/frontend/rust-lib/flowy-user/src/services/user_session.rs
+++ b/frontend/rust-lib/flowy-user/src/services/user_session.rs
@@ -1,3 +1,6 @@
+use crate::entities::{
+ SignInParams, SignInResponse, SignUpParams, SignUpResponse, UpdateUserProfileParams, UserProfile,
+};
use crate::{
dart_notification::*,
errors::{ErrorCode, FlowyError},
@@ -14,9 +17,6 @@ use flowy_database::{
schema::{user_table, user_table::dsl},
DBConnection, ExpressionMethods, UserDatabaseConnection,
};
-use flowy_user_data_model::entities::{
- SignInParams, SignInResponse, SignUpParams, SignUpResponse, UpdateUserProfileParams, UserProfile,
-};
use parking_lot::RwLock;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
diff --git a/frontend/rust-lib/flowy-user/tests/event/auth_test.rs b/frontend/rust-lib/flowy-user/tests/event/auth_test.rs
index f03fb30e7b..39b22a9af0 100644
--- a/frontend/rust-lib/flowy-user/tests/event/auth_test.rs
+++ b/frontend/rust-lib/flowy-user/tests/event/auth_test.rs
@@ -1,7 +1,7 @@
use crate::helper::*;
use flowy_test::{event_builder::UserModuleEventBuilder, FlowySDKTest};
+use flowy_user::entities::{SignInPayload, SignUpPayload, UserProfile};
use flowy_user::{errors::ErrorCode, event_map::UserEvent::*};
-use flowy_user_data_model::entities::{SignInPayload, SignUpPayload, UserProfile};
#[tokio::test]
async fn sign_up_with_invalid_email() {
diff --git a/frontend/rust-lib/flowy-user/tests/event/user_profile_test.rs b/frontend/rust-lib/flowy-user/tests/event/user_profile_test.rs
index 49e959dfef..b01a533336 100644
--- a/frontend/rust-lib/flowy-user/tests/event/user_profile_test.rs
+++ b/frontend/rust-lib/flowy-user/tests/event/user_profile_test.rs
@@ -1,7 +1,7 @@
use crate::helper::*;
use flowy_test::{event_builder::UserModuleEventBuilder, FlowySDKTest};
+use flowy_user::entities::{UpdateUserProfilePayload, UserProfile};
use flowy_user::{errors::ErrorCode, event_map::UserEvent::*};
-use flowy_user_data_model::entities::{UpdateUserProfilePayload, UserProfile};
use nanoid::nanoid;
// use serial_test::*;
diff --git a/shared-lib/Cargo.lock b/shared-lib/Cargo.lock
index 04b92a09fb..62d70be943 100644
--- a/shared-lib/Cargo.lock
+++ b/shared-lib/Cargo.lock
@@ -186,15 +186,6 @@ dependencies = [
"phf_codegen",
]
-[[package]]
-name = "claim"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68ad37958d55b29a7088909368968d2fe876a24c203f8441195130f3b15194b9"
-dependencies = [
- "autocfg",
-]
-
[[package]]
name = "cmd_lib"
version = "1.3.0"
@@ -350,15 +341,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "fake"
-version = "2.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21a8531dd3a64fd1cfbe92fad4160bc2060489c6195fe847e045e5788f710bae"
-dependencies = [
- "rand 0.8.5",
-]
-
[[package]]
name = "fake-simd"
version = "0.1.2"
@@ -484,32 +466,6 @@ dependencies = [
"url",
]
-[[package]]
-name = "flowy-user-data-model"
-version = "0.1.0"
-dependencies = [
- "bytes",
- "claim",
- "derive_more",
- "fake",
- "fancy-regex",
- "flowy-derive",
- "flowy-error-code",
- "futures",
- "lazy_static",
- "lib-infra",
- "log",
- "protobuf",
- "quickcheck",
- "quickcheck_macros",
- "rand 0.8.5",
- "rand_core 0.6.3",
- "serde",
- "serial_test",
- "unicode-segmentation",
- "validator",
-]
-
[[package]]
name = "fnv"
version = "1.0.7"
@@ -1400,28 +1356,6 @@ dependencies = [
"tempfile",
]
-[[package]]
-name = "quickcheck"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6"
-dependencies = [
- "env_logger",
- "log",
- "rand 0.8.5",
-]
-
-[[package]]
-name = "quickcheck_macros"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "608c156fd8e97febc07dc9c2e2c80bf74cfc6ef26893eae3daf8bc2bc94a4b7f"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "quote"
version = "1.0.10"
@@ -1637,28 +1571,6 @@ dependencies = [
"syn",
]
-[[package]]
-name = "serial_test"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0bccbcf40c8938196944a3da0e133e031a33f4d6b72db3bda3cc556e361905d"
-dependencies = [
- "lazy_static",
- "parking_lot 0.11.2",
- "serial_test_derive",
-]
-
-[[package]]
-name = "serial_test_derive"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2acd6defeddb41eb60bb468f8825d0cfd0c2a76bc03bfd235b6a1dc4f6a1ad5"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "sha-1"
version = "0.8.2"
@@ -2106,28 +2018,6 @@ version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
-[[package]]
-name = "validator"
-version = "0.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "841d6937c33ec6039d8071bcf72933146b5bbe378d645d8fa59bdadabfc2a249"
-dependencies = [
- "idna",
- "lazy_static",
- "regex",
- "serde",
- "serde_derive",
- "serde_json",
- "url",
- "validator_types",
-]
-
-[[package]]
-name = "validator_types"
-version = "0.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad9680608df133af2c1ddd5eaf1ddce91d60d61b6bc51494ef326458365a470a"
-
[[package]]
name = "version_check"
version = "0.9.3"
diff --git a/shared-lib/Cargo.toml b/shared-lib/Cargo.toml
index 370c4d7f31..1ddded168d 100644
--- a/shared-lib/Cargo.toml
+++ b/shared-lib/Cargo.toml
@@ -1,6 +1,5 @@
[workspace]
members = [
- "flowy-user-data-model",
"flowy-folder-data-model",
"flowy-sync",
"lib-ot",
diff --git a/shared-lib/flowy-user-data-model/Cargo.toml b/shared-lib/flowy-user-data-model/Cargo.toml
deleted file mode 100644
index 916a6c79f9..0000000000
--- a/shared-lib/flowy-user-data-model/Cargo.toml
+++ /dev/null
@@ -1,35 +0,0 @@
-[package]
-name = "flowy-user-data-model"
-version = "0.1.0"
-edition = "2018"
-
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
-
-[dependencies]
-flowy-derive = { path = "../flowy-derive" }
-flowy-error-code = { path = "../flowy-error-code" }
-protobuf = {version = "2.18.0"}
-bytes = "1.0"
-unicode-segmentation = "1.8"
-derive_more = {version = "0.99", features = ["display"]}
-serde = { version = "1.0", features = ["derive"] }
-validator = "0.12.0"
-log = "0.4.14"
-fancy-regex = "0.10.0"
-lazy_static = "1.4"
-
-[build-dependencies]
-lib-infra = { path = "../lib-infra", features = ["protobuf_file_gen"] }
-
-[dev-dependencies]
-quickcheck = "1.0.3"
-quickcheck_macros = "0.9.1"
-fake = "2.4.3"
-claim = "0.4.0"
-futures = "0.3.15"
-serial_test = "0.5.1"
-rand_core = "0.6.3"
-rand = "0.8.5"
-
-[features]
-dart = ["lib-infra/dart", "flowy-error-code/dart"]
diff --git a/shared-lib/flowy-user-data-model/Flowy.toml b/shared-lib/flowy-user-data-model/Flowy.toml
deleted file mode 100644
index 5e3ca53bf2..0000000000
--- a/shared-lib/flowy-user-data-model/Flowy.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-# Check out the FlowyConfig (located in flowy_toml.rs) for more details.
-proto_input = ["src/entities", "src/errors.rs"]
diff --git a/shared-lib/flowy-user-data-model/build.rs b/shared-lib/flowy-user-data-model/build.rs
deleted file mode 100644
index e897c3690d..0000000000
--- a/shared-lib/flowy-user-data-model/build.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-use lib_infra::code_gen;
-
-fn main() {
- code_gen::protobuf_file::gen(env!("CARGO_PKG_NAME"));
-}
diff --git a/shared-lib/flowy-user-data-model/src/lib.rs b/shared-lib/flowy-user-data-model/src/lib.rs
deleted file mode 100644
index eb967a2520..0000000000
--- a/shared-lib/flowy-user-data-model/src/lib.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-pub mod entities;
-pub mod parser;
-pub mod protobuf;
-
-pub mod errors {
- pub use flowy_error_code::ErrorCode;
-}