S
Swadhin Biswas
Merge pull request #84 from swadhinbiswas/fix/platform-polish-and-ci-cd
committed 1 months ago
.astro feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
.circleci docs(ci): add CircleCI Cloud worker guide with external PostgreSQL/Redis setup 5 months ago
.githooks fix(ci): resolve Docker build, coverage deps, and perf script 5 months ago
.github feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
.mimocode Feat/federation (#82) 2 months ago
.understand-anything feat: implement air-gapped mode, UI fixes, and project management integrations 3 months ago
cli feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
community feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
deploy Feature/ai code reviewer (#73) 2 months ago
doc Feature/ai code reviewer (#79) 2 months ago
docs feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
docs-site feat: finalize platform polish - discussions, gists, webhook queue, realtime, push-mirror, auth/metrics hardening 1 months ago
drizzle feat: push-mirror, webhook queue, auth-cache, gists/discussions 1 months ago
packages feat(arch): phase 1-4 github parity (sync, daemons, ui, queues) 6 months ago
pci feat: implement production-grade security and fix critical vulnerabilities 9 months ago
playwright-report Feature/ai code reviewer (#73) 2 months ago
public feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
scratch feat: implement air-gapped mode, UI fixes, and project management integrations 3 months ago
scripts feat: finalize platform polish - discussions, gists, webhook queue, realtime, push-mirror, auth/metrics hardening 1 months ago
src feat: finalize platform polish - discussions, gists, webhook queue, realtime, push-mirror, auth/metrics hardening 1 months ago
test-results Feature/ai code reviewer (#73) 2 months ago
tests feat: finalize platform polish - discussions, gists, webhook queue, realtime, push-mirror, auth/metrics hardening 1 months ago
.dockerignore feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
.env.example feat: push-mirror, webhook queue, auth-cache, gists/discussions 1 months ago
.gitignore Feat/federation (#82) 2 months ago
.gitleaks.toml feat: production readiness — fix critical bugs, achieve 100% test pass rate, complete documentation 5 months ago
AGENTS.md feat: finalize platform polish - discussions, gists, webhook queue, realtime, push-mirror, auth/metrics hardening 1 months ago
apply-dracula.cjs feat: implement air-gapped mode, UI fixes, and project management integrations 3 months ago
astro.config.mjs Feat/federation (#82) 2 months ago
bun.lock Feature/ai code reviewer (#73) 2 months ago
Caddyfile feat: implement air-gapped mode, UI fixes, and project management integrations 3 months ago
CHANGELOG.md Feature/ai code reviewer (#79) 2 months ago
CLI.md feat: production readiness — fix critical bugs, achieve 100% test pass rate, complete documentation 5 months ago
CONTRIBUTING.md Initial commit of OpenCodeHub source 10 months ago
DEPLOYMENT.md Feature/ai code reviewer (#73) 2 months ago
docker-compose.nas.yml Feature/ai code reviewer (#80) 2 months ago
docker-compose.production.yml Feature/ai code reviewer (#80) 2 months ago
docker-compose.yml feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
docker-entrypoint.sh Feature/ai code reviewer (#73) 2 months ago
Dockerfile feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
Dockerfile.runner feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
Dockerfile.worker feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
DOCKERHUB.md Feature/ai code reviewer (#73) 2 months ago
drizzle.config.ts feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
eslint.config.mjs feat: implement air-gapped mode, UI fixes, and project management integrations 3 months ago
features.md Feat/federation (#82) 2 months ago
fix_lint.py feat: implement air-gapped mode, UI fixes, and project management integrations 3 months ago
github-issues-checklist.md feat: OpenCodeHub v1.1.0 - Enterprise Features & Storage Adapters 8 months ago
github-roadmap-issues.json feat: OpenCodeHub v1.1.0 - Enterprise Features & Storage Adapters 8 months ago
install.sh feat: implement air-gapped mode, UI fixes, and project management integrations 3 months ago
LICENSE Fix broken repository links: Use owner/name instead of slug 10 months ago
make-admin.ts Feature/ai code reviewer (#73) 2 months ago
notimplemented.md Feature/ai code reviewer (#73) 2 months ago
out.json Feature/ai code reviewer (#73) 2 months ago
package.json feat: finalize platform polish - discussions, gists, webhook queue, realtime, push-mirror, auth/metrics hardening 1 months ago
playwright.config.ts fix(ci): switch e2e to PostgreSQL service + harden dev env precedence 4 months ago
postcss.config.mjs Initial commit of OpenCodeHub source 10 months ago
PRODUCTION_READINESS.md Feature/ai code reviewer (#73) 2 months ago
protection.json Feature/ai code reviewer (#73) 2 months ago
README.md feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
render.yaml Feat/federation (#82) 2 months ago
smartcommit.sh Feature/ai code reviewer (#73) 2 months ago
tailwind.config.mjs feat: implement air-gapped mode, UI fixes, and project management integrations 3 months ago
test-utils.ts Initial commit of OpenCodeHub source 10 months ago
tsconfig.json feat: implement air-gapped mode, UI fixes, and project management integrations 3 months ago
UIPLAN.md feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets 2 months ago
Vercel Deploy.md Feature/ai code reviewer (#73) 2 months ago
vercel.json fix(vercel): set git repos path, fix regex and add error ui 9 months ago
vitest.config.ts Feature/ai code reviewer (#79) 2 months ago
README.md

OpenCodeHub is an open-source, self-hosted alternative to GitHub and GitLab engineered as a modular monolith. It provides stack-first developer workflows (Graphite-style stacked diffs), an automated merge queue with speculative builds, Docker-based CI/CD pipelines, and multi-model AI code reviews out of the box — with zero per-seat licensing fees.

Documentation · CLI Quickstart · Deploy in 5 Minutes · API Reference


✨ Key Differentiators

Capability What It Does Why It Matters
Stacked PRs Break complex features into small, dependent branches and PRs (och stack) Faster reviews, zero merge blocking, unblocked teammates
Merge Queue Parallel CI validation with speculative builds and priority lanes Protects main from broken builds without serialized slow merges
CI/CD Pipelines GitHub Actions YAML compatibility with isolated Docker executors Native pipeline execution without external CI SaaS dependencies
Multi-Provider AI Review Automated code reviews powered by GPT-4, Claude 3.5, Gemini 1.5, Groq, Ollama Instant feedback on PRs before human peer review
Pluggable Storage Local filesystem or S3-compatible object storage (AWS, MinIO, R2, B2, Ceph) Flexible deployment across homelabs, NAS servers, or hyper-scale clouds
Federation Fork, push branches, and submit cross-instance pull requests across servers Seamless collaboration across autonomous OpenCodeHub instances

💻 OpenCodeHub CLI (och)

The official OpenCodeHub CLI (opencodehub-cli) delivers a terminal-first workflow for stacks, code reviews, merge queues, and repository management.

Installation

Install globally using your preferred package manager:

# via npm
npm install -g opencodehub-cli

# via bun
bun add -g opencodehub-cli

# via pnpm
pnpm add -g opencodehub-cli

# via yarn
yarn global add opencodehub-cli

Or run directly without installing:

npx opencodehub-cli --help

1. Authenticate

# Interactive login
och auth login --url https://git.yourcompany.com

# Non-interactive / CI login with Personal Access Token
och auth login --url https://git.yourcompany.com --token och_xxxxxxxxxxxx

# Check health & auth status
och config doctor

2. Stacked PR Workflow

Create and submit Graphite-style stacked branches in seconds:

# Create first stacked branch
och stack create feature/user-auth

# Commit changes, then create dependent branch
git commit -am "feat: implement auth middleware"
och stack create feature/user-profile

# Push all branches in the stack and generate linked PRs automatically
och stack submit

# Visualize your stack topology in terminal
och stack log

# Rebase the whole stack when upstream main updates
och stack sync

3. Interactive Focus Cockpit (och focus)

Launch the terminal dashboard for PRs, reviews, and merge queue operations:

och focus
  • Interactive Timeline: Switch branches, view diff stats, and trigger CI runs without leaving the CLI.
  • Review Cockpit: Approve, request changes, or trigger AI code reviews inline.
  • Queue Controls: Enqueue PRs and monitor speculative build states in realtime.

4. Merge Queue Management

# View active queue status and speculative lanes
och queue list

# Enqueue a PR for automated CI validation and merge
och queue add 42

# Check queue position and build attempts
och queue status 42

🚀 Quickstart & Deployment

Production Stack (Docker Compose)

# 1. Clone the repository
git clone https://github.com/swadhinbiswas/OpencodeHub.git
cd OpenCodeHub

# 2. Configure environment
cp .env.example .env
# Edit .env and set your secrets (JWT_SECRET, SESSION_SECRET, POSTGRES_PASSWORD, REDIS_PASSWORD)

# 3. Launch the container stack
docker compose up -d

# 4. Initialize the admin account
docker compose exec app bun scripts/seed-admin.ts

Open http://localhost:4321 in your browser to start collaborating.

Container Images

Official minimal production images (251 MB) are published on Docker Hub:

Service Image Tag Purpose
Platform opencodehub/opencodehub:latest Web UI + REST & GraphQL API + Git HTTP / SSH Server
Worker opencodehub/opencodehub-worker:latest Background queues, webhooks, and automation jobs
Runner opencodehub/opencodehub-runner:latest Docker-in-Docker CI/CD pipeline execution runner

🎨 Design System & Theme

OpenCodeHub features a modern developer UI built on Tailwind CSS, Radix UI, and clean GitHub/Linear design principles:

  • Adaptive Theming: Native dark and light theme support with zero layout flicker.
  • High-Contrast Dark Mode: Pure zinc/slate dark surfaces (#0d1117 / #161b22) paired with crisp emerald status indicators (#238636).
  • Responsive Workspace: Full mobile, tablet, and desktop fidelity with integrated keyboard shortcuts.

🏛 Architecture

┌─────────────────────────────────────────────────────────────┐
│                        CLIENTS                               │
│  Browser  │  Git CLI (HTTP/SSH)  │  OpenCodeHub CLI (och)   │
└─────────────────────────────────────────────────────────────┘
                              │
┌─────────────────────────────────────────────────────────────┐
│                    OPENCODEHUB PLATFORM                      │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐  │
│  │  Web UI     │  │  REST API   │  │  GraphQL Endpoint   │  │
│  │ (Astro+React│  │ (175+ routes│  │ (src/pages/api/...) │  │
│  └─────────────┘  └─────────────┘  └─────────────────────┘  │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐  │
│  │ Git Server  │  │ SSH Server  │  │  Pipeline Runner    │  │
│  │ (HTTP RPC)  │  │ (ssh2 daemon│  │ (Docker Executor)   │  │
│  └─────────────┘  └─────────────┘  └─────────────────────┘  │
└─────────────────────────────────────────────────────────────┘
                              │
┌─────────────────────────────────────────────────────────────┐
│              PERSISTENCE & INFRASTRUCTURE                    │
│  PostgreSQL / SQLite / Turso │ Redis (Queues) │ Pluggable S3 │
└─────────────────────────────────────────────────────────────┘

🧪 Development & Testing

# Install dependencies
npm install

# Push database schema
npm run db:push

# Run full test suite (679 unit, integration & contract tests)
npm run test

# Typecheck & verify build
npm run typecheck
npm run build

📄 License

OpenCodeHub is released under the MIT License.

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

None license
Updated 22 days ago

Languages

  • TypeScript 82.4%
  • Astro 13.5%
  • JavaScript 2.1%
  • Shell 1.4%
  • CSS 0.4%
  • Python 0.2%