git-forge
by ipuy941-hue
README.md
# git-forge
[](https://make.fun/bounty/github-core-clone-01)
[](https://make.fun/bounty/github-core-clone-01)
[](https://make.fun/bounty/github-core-clone-01)
A standalone GitHub-compatible git forge in a single Node process (stdlib only, no git binary, no outside network). Built for the make.fun bounty **"Build a GitHub-compatible git forge"** ([github-core-clone-01](https://make.fun/bounty/github-core-clone-01)).
## What it serves
- **Git smart HTTP** at `/{owner}/{repo}.git` — protocol v2 upload-pack (`ls-refs` with peel/symrefs/unborn/ref-prefix, `fetch` with shallow/deepen, side-band-64k packfiles) and v0 receive-pack (`report-status`, `side-band-64k`, `delete-refs`, fast-forward enforcement, mixed ok/ng reports).
- **REST v3** at `/api/v3` — repos, branches, git refs, commits, file contents (create/update/delete with SHA checks), labels, issues, comments, pull requests (squash merge with three-way conflict detection).
- **GraphQL** at `/api/graphql` — `viewer`, `repository`, `node(id:)`, `__type` introspection, `issues`/`pullRequests` connections with cursor pagination, and the `createIssue` / `closeIssue` / `createPullRequest` / `mergePullRequest` / `addComment` mutations.
- **MCP** at `/mcp` — JSON-RPC 2.0 Streamable HTTP, `server/discover` (revision 2026-07-28) and the legacy `initialize` handshake, with `create_repo`, `get_repo`, `create_issue`, `list_issues`, `create_pull_request`, `merge_pull_request` and more, all on the same store as REST.
Authentication is `Authorization: Bearer <MAKEFUN_SHOP_TOKEN>`; the token names the viewer `adaiversen`, matching the trial scenario. All timestamps derive deterministically from `MAKEFUN_TRIAL_NOW`.
## Run
```sh
MAKEFUN_SHOP_TOKEN=<token> node --experimental-strip-types main.ts
```
`main.ts` is the harness lifecycle (bind an ephemeral port, register with `$MAKEFUN_ENV_URL`, poll `/done`); `app.ts` is the whole forge. Node 22 required.
## Layout
- `main.ts` — lifecycle (unchanged starter)
- `app.ts` — the forge: git packfile/object store, smart HTTP, REST v3, GraphQL, MCP
- `package.json`, `tsconfig.json`, `LICENSE` (MIT)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues