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 access_review_provider;
59pub mod api;
60pub mod auth;
61pub mod backup;
62pub mod client;
63pub mod config;
64pub mod conflict;
65pub mod core_bridge;
66pub mod error;
67pub mod events;
68pub mod history;
69pub mod merge;
70pub mod middleware;
71pub mod models;
72pub mod permissions;
73pub mod server;
74pub mod sync;
75pub mod user;
76pub mod websocket;
77pub mod workspace;
78
79pub use auth::{AuthService, Credentials, Session, Token};
80pub use backup::{BackupService, StorageBackend, WorkspaceBackup};
81pub use client::{ClientConfig, CollabClient, ConnectionState};
82pub use config::CollabConfig;
83pub use conflict::{ConflictResolution, ConflictResolver, MergeStrategy};
84pub use core_bridge::CoreBridge;
85pub use error::{CollabError, Result};
86pub use events::{ChangeEvent, ChangeType, EventBus, EventListener};
87pub use history::{Commit, History, Snapshot, VersionControl};
88pub use merge::MergeService;
89pub use models::{TeamWorkspace, User, UserRole, WorkspaceMember};
90pub use permissions::{Permission, PermissionChecker, RolePermissions};
91pub use server::CollabServer;
92pub use sync::{SyncEngine, SyncMessage, SyncState};
93pub use workspace::{WorkspaceManager, WorkspaceService};