mockforge_collab/
lib.rs

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