How gitbutlerapp/gitbutler works
Main Application Components
a. Frontend Layer:
• UI Components (/packages/ui)
• Desktop App Interface (/apps/desktop)
• Web Interface (/apps/web)
• Shared Components (/packages/shared)
b. Backend Layer (Rust):
• Branch Management System (/crates/gitbutler-branch-actions)
• Git Operations (/crates/gitbutler-git)
• Virtual Branch System (/crates/gitbutler-branch)
• Project Management (/crates/gitbutler-project)
• User Management (/crates/gitbutler-user)
c. Integration Layer:
• A section for "External Integrations":
• GitHub Integration
• SSH/GPG Systems
• AI Services (OpenAI)
• Cloud Sync Services
Key Architectural Components
• Tauri Bridge (connecting Frontend and Backend)
• Virtual Branch Manager (core feature)
• File System Watcher (/crates/gitbutler-watcher)
• State Management System
• Authentication System
Data Flow Patterns
Flow for key operations:
• Virtual Branch Operations
• Git Operations
• User Authentication
• File Change Monitoring
• AI Integration
Component Details
For each major component, include:
• Name
• Primary responsibility
• Key dependencies
• Communication protocols
External Systems
Connections to:
• Git repositories
• GitHub API
• OpenAI API
• Cloud storage
Cross-Cutting Concerns
Sections for:
• Error handling (/crates/gitbutler-error)
• Configuration management (/crates/gitbutler-config)
• Security features (/crates/gitbutler-secret)
• Logging system
Development Tools
A section showing:
• Testing infrastructure
• Build system
• Development tools
• The separation between frontend and backend
• The central role of the virtual branch system
• The event-driven nature of the file watching system
• The modularity of the codebase
• The integration points with external services
Key Relationships to Highlight:
How external services are integrated
Remember to:
• Use consistent styling
• Related components
• Clear boundaries between systems
This architecture should reflect GitButler's unique approach to Git branch management while maintaining a clear separation of concerns and modularity in the codebase.