Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

312 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCodeHub

The self-hosted Git platform that doesn't compromise.

CI License CLI version Docs Docker


OpenCodeHub is a self-hosted Git platform with stacked PRs, merge queue, CI/CD pipelines, and AI code review. One platform for everything your team needs — no vendor lock-in, no per-seat pricing.

Documentation · Deploy in 5 minutes · CLI Reference


Demo

OpenCodeHub Demo

Watch the full walkthrough — deployment, stacked PRs, AI review, and merge queue in action.


Why OpenCodeHub?

Problem Solution
PRs too large to review Stacked PRs — break changes into small, dependent branches
Merge conflicts on main Merge Queue — stack-aware ordering with speculative CI builds
Slow review cycles AI Code Review — catches bugs before humans even look
Split across 5+ services All-in-one — Git, PRs, CI/CD, issues, wiki in one place
Data leaves your servers Self-hosted — your code stays on your hardware

Features

Core Platform

  • Git Hosting — HTTP smart protocol + SSH push/pull, forks, mirroring, LFS
  • Pull Requests — Inline comments, approvals, suggested changes, draft PRs
  • Issues & Projects — Labels, milestones, custom fields, kanban boards
  • Wiki — Repository wiki with revision history
  • Organizations — Teams, collaborators, role-based access control

Delivery Workflows

  • Stacked PRs — Graphite-style stacked branches with web + CLI support
  • Merge Queue — Stack-aware queue with speculative builds and priority lanes
  • CI/CD Pipelines — GitHub Actions-compatible engine with Docker-based runners
  • Webhooks — Outbound webhooks with event filtering and HMAC signing
  • Automations — Rule-based workflow automation for PRs and deployments

AI & Quality

  • AI Code Review — 10+ providers: GPT-4, Claude, Gemini, Groq, Ollama, OpenRouter
  • Secret Scanning — Detect secrets in commits before they reach production
  • Branch Protection — Required reviews, status checks, push restrictions
  • Developer Metrics — PR velocity, review efficiency, time-to-merge tracking

Security

  • Authentication — JWT sessions, OAuth (GitHub, Google, GitLab), 2FA/TOTP, SSO/SAML
  • Authorization — RBAC with roles, team permissions, collaborator levels
  • Rate Limiting — Redis-backed per-endpoint rate limiting
  • Audit Logging — Track all administrative actions

Extensibility

  • REST API — 175+ endpoints covering all platform features
  • GraphQL — Full GraphQL endpoint for flexible queries
  • CLIoch command line tool with 20+ command groups
  • Storage — Local, S3, MinIO, R2, or any S3-compatible backend

Deploy

Docker (Recommended)

git clone https://github.com/swadhinbiswas/OpencodeHub.git
cd OpenCodeHub
cp .env.example .env
docker compose up -d
docker compose exec app bun run scripts/seed-admin.ts

Open http://localhost:4321 and create your admin account.

Render (Free)

Deploy to Render with free PostgreSQL + Upstash Redis:

# 1. Create free Redis at upstash.com (Singapore region)
# 2. Push to GitHub
# 3. Render → New → Blueprint → Select your repo
# 4. Set REDIS_URL and SITE_URL
# 5. Deploy

See the Render Deployment Guide for step-by-step instructions.

More Deployment Options

Platform Guide Cost
Docker Compose Deployment Guide Free
Render (Asia) Render Guide Free
Oracle Cloud Free Deployment Free forever
NAS (Synology/TrueNAS) NAS Guide Free
Kubernetes K8s Guide Free
Cloudflare Tunnel Cloudflare Guide Free

CLI

# Install
npm install -g opencodehub-cli

# Login
och auth login --url http://localhost:4321

# Stacked PR workflow
och stack create feature/auth-step-1
och stack submit
och stack sync

# Merge queue
och queue list
och queue add <pr-number>

# Interactive cockpit
och focus

Full CLI Reference


API

# Create a repository
curl -X POST http://localhost:4321/api/repos \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"my-project","visibility":"public"}'

# List pull requests
curl http://localhost:4321/api/repos/owner/repo/pulls \
  -H "Authorization: Bearer YOUR_TOKEN"

# GraphQL
curl -X POST http://localhost:4321/api/graphql \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ repositories { name owner { username } } }"}'

Full API Reference


Tech Stack

Layer Technology
Framework Astro 4.x (SSR) + React 18
UI Tailwind CSS + Radix UI
Database PostgreSQL / SQLite / Turso (Drizzle ORM)
Auth JWT + OAuth + 2FA/TOTP + SSO/SAML
Git Native git CLI + simple-git + isomorphic-git
SSH ssh2 library
CI/CD Docker-based runners, GitHub Actions syntax
Storage Local filesystem or S3-compatible (AWS, MinIO, R2)
AI OpenAI, Anthropic, Google, Groq, Ollama, OpenRouter
Queue BullMQ + Redis
CLI Commander.js + Inquirer

Architecture

┌─────────────────────────────────────────────────────────────┐
│                        CLIENTS                               │
│  Browser  │  Git CLI (HTTP/SSH)  │  OpenCodeHub CLI (och)   │
└─────────────────────────────────────────────────────────────┘
                              │
┌─────────────────────────────────────────────────────────────┐
│                    OPENCODEHUB PLATFORM                      │
│  Web UI (Astro+React)  │  REST API (175+ routes)  │ GraphQL │
│  Git Server (HTTP)     │  SSH Server (ssh2)       │         │
│  Pipeline Runner (Docker)                          │         │
└─────────────────────────────────────────────────────────────┘
                              │
┌─────────────────────────────────────────────────────────────┐
│  PostgreSQL/SQLite/Turso  │  Redis  │  Pluggable Storage    │
└─────────────────────────────────────────────────────────────┘

Documentation

Topic Link
Installation docs.opencodehub.space/getting-started/installation
Configuration docs.opencodehub.space/administration/configuration
Stacked PRs docs.opencodehub.space/features/stacked-prs
AI Code Review docs.opencodehub.space/features/ai-review
CLI Reference docs.opencodehub.space/reference/cli-commands
API Reference docs.opencodehub.space/api/rest-api
Deployment docs.opencodehub.space/administration/deployment

Contributing

# Clone and setup
git clone https://github.com/swadhinbiswas/OpencodeHub.git
cd OpenCodeHub
cp .env.example .env
npm install
npm run db:push
bun run scripts/seed-admin.ts

# Start development
npm run dev

# Run tests
npm run test

See CONTRIBUTING.md for development workflow and standards.


Community


License

MIT — Use it however you want.

About

self-hosted Git platform built for You. Features SSH, Actions-compatible pipelines, and AI code reviews in a beautiful interface.Your code your control

Topics

Resources

Contributing

Stars

Watchers

Forks

Used by

Contributors

Languages