Contributing to Terraphim AI
Overview
This guide covers the complete contribution workflow for Terraphim AI, including our dual-repository approach, branch protection, and development setup.
Repository Structure
Terraphim AI uses a dual-repository approach for security:
- Public Repository (
terraphim/terraphim-ai): Open-source code only - Private Repository (
zestic-ai/terraphim-private): Proprietary and sensitive code
Branch Protection and Naming
Allowed Branch Names (Public Repository)
# Feature branches
# Development branches
Blocked Branch Names (Public Repository)
# Private patterns (blocked by pre-push hook)
Pre-Push Hook Protection
The repository automatically validates:
- Branch naming conventions
- Commit message markers (
[PRIVATE],[INTERNAL], etc.) - File content for sensitive keywords
- File patterns using
.gitprivateignore
Development Setup
Prerequisites
- Rust: Latest stable version via rustup
- Node.js: Version 18+ for desktop app development
- Yarn: Package manager for JavaScript dependencies
- Git: For version control
Quick Start
- Clone and setup:
# Install pre-commit hooks
# Add private remote (if needed)
- Install sample data:
Development Methods
Method 1: Local Development
Run the backend
Run the frontend
Run Tauri desktop app
Method 2: Earthly-Based Development
You can run the full stack using Earthly:
# List available targets
# Build full stack
Working with Private Code
If you need to work with private or sensitive code:
- Switch to private repository:
- Create private branch:
# or
- Develop and push:
- Switch back to public (when ready):
Troubleshooting
Branch Protection Errors
"Branch matches private pattern"
Solution:
"Sensitive keyword found"
Solution:
- Remove or replace sensitive content
- Use private repository for sensitive development
- Update
.gitprivateignoreif false positive
Code Quality
The project enforces code quality through:
- Pre-commit hooks: Formatting, linting, security checks
- Conventional commits: Structured commit messages
- Automated testing: CI/CD pipeline validation
- Branch protection: Prevents private content leaks
Getting Help
- Discord: Terraphim Discord
- Discourse: Community Forum
- GitHub Issues: Bug reports and feature requests
- Documentation: Check
docs/src/for detailed guides