https://github.com/rorychatt/gitpub
A GitHub-like platform built with Rust with Sliplane integration
https://github.com/rorychatt/gitpub
cli git hosting rust sliplane
Last synced: 2 months ago
JSON representation
A GitHub-like platform built with Rust with Sliplane integration
- Host: GitHub
- URL: https://github.com/rorychatt/gitpub
- Owner: rorychatt
- License: mit
- Created: 2026-04-30T18:18:31.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-30T21:10:16.000Z (2 months ago)
- Last Synced: 2026-04-30T21:17:54.512Z (2 months ago)
- Topics: cli, git, hosting, rust, sliplane
- Language: Rust
- Size: 97.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# gitpub
A GitHub-like platform built with Rust, featuring direct integration with Sliplane for seamless deployment and hosting.
## Features
- 🦀 **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
## Architecture
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
## Getting Started
### Prerequisites
- Rust 1.70 or higher
- PostgreSQL 14 or higher
- Git 2.30 or higher
### Environment Variables
The following environment variables are required to run gitpub-server:
- **`DATABASE_URL`** (required): PostgreSQL connection string
- Example: `postgresql://user:password@localhost/gitpub`
- **`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.
### Installation
```bash
# Clone the repository
git clone https://github.com/rorychatt/gitpub.git
cd gitpub
# Build all components
cargo build --workspace
# Run tests
cargo test --workspace
```
### Running the Server
```bash
# 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-server
```
The server will start on `http://localhost:3000`.
### Using the CLI
```bash
# 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 main
```
## Sliplane Integration
gitpub integrates directly with Sliplane for easy deployment:
1. Configure your Sliplane API credentials
2. Push your code to gitpub
3. Deploy automatically with zero configuration
See `docs/sliplane-integration.md` for detailed setup instructions.
## Development
### Project Structure
```
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
```
### Building
```bash
# Build all components
cargo build --workspace
# Build in release mode
cargo build --workspace --release
```
### Testing
```bash
# Run all tests
cargo test --workspace
# Run specific component tests
cargo test --package gitpub-core
```
### Formatting and Linting
```bash
# Format code
cargo fmt --all
# Run linter
cargo clippy --all-targets --all-features -- -D warnings
```
## Contributing
Contributions are welcome! Please see `CONTRIBUTING.md` for guidelines.
## License
MIT License - see `LICENSE` for details