A GitHub-like platform built with Rust, featuring direct integration with Sliplane for seamless deployment and hosting.
- 🦀 Rust-Powered: Built entirely in Rust for performance and reliability
- 🔄 Git Repository Hosting: Full-featured git repository management
- 🚀 Sliplane Integration: One-click deployment and hosting integration
- 🛠️ CLI Tool: Powerful command-line interface for all git operations
- 🔌 Standard Git Compatible: Works seamlessly with existing git repositories
The project is organized as a Rust workspace with four main components:
- gitpub-server: Web server and REST API for git operations
- gitpub-cli: Command-line interface for repository management
- gitpub-core: Shared core library with data models and utilities
- gitpub-sliplane: Sliplane integration module for deployment
- Rust 1.70 or higher
- PostgreSQL 14 or higher
- Git 2.30 or higher
The following environment variables are required to run gitpub-server:
-
DATABASE_URL(required): PostgreSQL connection string- Example:
postgresql://user:password@localhost/gitpub
- Example:
-
JWT_SECRET(required): Secret key for JWT token signing- Must be at least 32 bytes long
- Generate with:
openssl rand -base64 32 - Never commit this value to source control
- Use a different secret for each environment (development, staging, production)
See .env.example for a template.
# Clone the repository
git clone https://github.com/rorychatt/gitpub.git
cd gitpub
# Build all components
cargo build --workspace
# Run tests
cargo test --workspace# Set up environment variables
export DATABASE_URL="postgresql://user:password@localhost/gitpub"
export JWT_SECRET="$(openssl rand -base64 32)"
# Start the server
cargo run --package gitpub-serverThe server will start on http://localhost:3000.
# Install the CLI
cargo install --path gitpub-cli
# Initialize a new repository
gitpub init my-repo
# Clone a repository
gitpub clone https://gitpub.io/user/repo
# Push changes
gitpub push origin main
# Pull changes
gitpub pull origin maingitpub integrates directly with Sliplane for easy deployment:
- Configure your Sliplane API credentials
- Push your code to gitpub
- Deploy automatically with zero configuration
See docs/sliplane-integration.md for detailed setup instructions.
gitpub/
├── gitpub-server/ # Web server and API
│ └── src/
│ └── main.rs # Server entry point
├── gitpub-cli/ # Command-line interface
│ └── src/
│ └── main.rs # CLI entry point
├── gitpub-core/ # Shared core library
│ └── src/
│ └── lib.rs # Core models and utilities
└── gitpub-sliplane/ # Sliplane integration
└── src/
└── lib.rs # Sliplane API client
# Build all components
cargo build --workspace
# Build in release mode
cargo build --workspace --release# Run all tests
cargo test --workspace
# Run specific component tests
cargo test --package gitpub-core# Format code
cargo fmt --all
# Run linter
cargo clippy --all-targets --all-features -- -D warningsContributions are welcome! Please see CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details