mockforge_collab/lib.rs
1//! Pillars: [Cloud]
2//!
3//! # `MockForge` Collaboration
4//!
5//! Cloud collaboration features for `MockForge` including team workspaces,
6//! real-time synchronization, version control, and role-based access control.
7//!
8//! ## Features
9//!
10//! - **Team Workspaces**: Shared environments for collaborative mock development
11//! - **Real-time Sync**: WebSocket-based synchronization across team members
12//! - **Role-Based Access Control**: Admin, Editor, and Viewer roles
13//! - **Version Control**: Git-style history and versioned snapshots
14//! - **Self-Hosted Option**: Run your own team collaboration server
15//! - **Conflict Resolution**: Intelligent merging of concurrent changes
16//!
17//! ## Quick Start
18//!
19//! ### Creating a Collaborative Workspace
20//!
21//! ```rust,no_run
22//! use mockforge_collab::{
23//! CollabServer, CollabConfig, TeamWorkspace, UserRole,
24//! };
25//!
26//! #[tokio::main]
27//! async fn main() -> anyhow::Result<()> {
28//! // Create collaboration server
29//! let config = CollabConfig::default();
30//! let server = CollabServer::new(config).await?;
31//!
32//! // Start the server
33//! server.run("127.0.0.1:8080").await?;
34//!
35//! Ok(())
36//! }
37//! ```
38//!
39//! ### Connecting to a Collaborative Workspace
40//!
41//! ```rust,no_run
42//! use mockforge_collab::{CollabClient, ClientConfig};
43//!
44//! #[tokio::main]
45//! async fn main() -> anyhow::Result<()> {
46//! let config = ClientConfig {
47//! server_url: "ws://localhost:8080".to_string(),
48//! auth_token: "your-token".to_string(),
49//! };
50//!
51//! let client = CollabClient::connect(config).await?;
52//!
53//! // Subscribe to workspace changes
54//! client.subscribe_to_workspace("workspace-id").await?;
55//!
56//! Ok(())
57//! }
58//! ```
59
60pub mod access_review_provider;
61pub mod api;
62pub mod auth;
63pub mod backup;
64pub mod client;
65pub mod config;
66pub mod conflict;
67pub mod core_bridge;
68pub mod error;
69pub mod events;
70pub mod history;
71pub mod merge;
72pub mod middleware;
73pub mod models;
74pub mod permissions;
75pub mod promotion;
76pub mod server;
77pub mod sync;
78pub mod user;
79pub mod websocket;
80pub mod workspace;
81
82pub use auth::{AuthService, Credentials, Session, Token};
83pub use backup::{BackupService, StorageBackend, WorkspaceBackup};
84pub use client::{ClientConfig, CollabClient, ConnectionState};
85pub use config::CollabConfig;
86pub use conflict::{ConflictResolution, ConflictResolver, MergeStrategy};
87pub use core_bridge::CoreBridge;
88pub use error::{CollabError, Result};
89pub use events::{ChangeEvent, ChangeType, EventBus, EventListener};
90pub use history::{Commit, History, Snapshot, VersionControl};
91pub use merge::MergeService;
92pub use models::{TeamWorkspace, User, UserRole, WorkspaceMember};
93pub use permissions::{Permission, PermissionChecker, RolePermissions};
94pub use promotion::PromotionService;
95pub use server::CollabServer;
96pub use sync::{SyncEngine, SyncMessage, SyncState};
97pub use workspace::{WorkspaceManager, WorkspaceService};