Project
mini-github
Self-hosted GitHub + Vercel in one box, git hosting, container deploys, and an AI code brain.

mini-github folds source hosting, a Vercel-style deploy engine, and an AI layer into one monorepo. It serves real bare-git repos over Smart-HTTP and SSH, builds and runs them as containers with per-PR previews, and answers questions about the code with cited RAG. The backend is a 37-module NestJS app, ~182 HTTP endpoints over a 948-line Drizzle schema across 41 tables and 40 migrations, and every AI feature falls back to a deterministic heuristic when there's no API key.
Stack
What I built
08 systems, built solo, the parts that mattered.
A real git server, not a UI over the CLI, one hardened process boundary.
Every git call funnels through a single GitService that spawns git with arg-arrays (never a shell), exposing ~40 operations: upload-pack/receive-pack transport, blame, diff ranges, merge-base, and squash/merge with conflict detection.
Git-over-SSH with public-key auth, an ssh2 server on :2222 that authenticates against stored keys and runs only git-upload-pack/receive-pack against the bare repos.
No shells, no ptys, no arbitrary commands.
A Vercel-style deploy engine that builds real containers, auto-generated Dockerfiles for Next, Node, Python and static apps, resource-capped runs in a bounded port range, and a subdomain proxy routing each app to its live container.
Per-PR preview environments included.
CI-lite that gates deploys, on push it runs the repo's opt-in test command in a throwaway container (via git archive, never a checkout), capped at 10 minutes, and blocks the build on failure.
pgvector semantic search + grounded RAG, files chunked and embedded with text-embedding-3-small into a pgvector HNSW index, then questions answered by GPT-4o over the retrieved chunks with file:line citations.
AI PR review with a deterministic fallback, structured, severity-tagged findings and a computed risk score, every result tagged ai or heuristic so it still works with no OpenAI key.
Signed webhooks and dual-mode code search, HMAC-SHA256 delivery signatures, plus a Postgres GIN full-text index sitting alongside the vector index for ranked lexical search.
An ops surface beyond the git core, TCP/HTTP uptime monitoring with incident tracking and alerts, weekly activity digests, Slack-to-issue ticketing, and a streamable-HTTP MCP server (7 tools, PAT-auth) so agents act through the same tenant-scoped services as the REST API.
Inside the build


Next
IléHQ