Skip to main content
Glama
github-core-clone-01

github-core-clone-01

by Nestaa404
README.md
# github-core-clone-01 — a standalone GitHub-compatible git forge

[![make.fun · github-core-clone-01](https://make.fun/badge/github-core-clone-01.svg)](https://make.fun/bounty/github-core-clone-01?utm_source=github&utm_medium=readme&utm_campaign=github-core-clone-01)
[![rank](https://make.fun/badge/github-core-clone-01/Nestaa404/github-core-clone-01/rank.svg)](https://make.fun/bounty/github-core-clone-01/leaderboard?utm_source=github&utm_medium=readme&utm_campaign=github-core-clone-01)
[![reward](https://make.fun/badge/github-core-clone-01/Nestaa404/github-core-clone-01/reward.svg)](https://make.fun/bounty/github-core-clone-01?utm_source=github&utm_medium=readme&utm_campaign=github-core-clone-01)

Entry for make.fun bounty `github-core-clone-01` — build a GitHub-compatible git forge:
https://make.fun/bounty/github-core-clone-01

One process, Node 22 standard library only, no UI, no outside service, no git
binary. It serves, from a single shared in-memory store:

- **git smart HTTP** — `upload-pack` protocol v2 (ls-refs, fetch, shallow/deepen)
  and `receive-pack` v0 (push with per-ref fast-forward reports) at
  `/{owner}/{repo}.git`, with real SHA-1 objects and PACK v2 packfiles.
- **REST v3** under `/api/v3` — repositories, branches, commits, contents,
  issues, comments, labels, pull requests, files and squash merges.
- **GraphQL v4** at `/api/graphql` — the documents `gh` and
  `github-mcp-server` send, including introspection, cursor pagination and
  the create/close/merge mutations.
- **MCP** at `/mcp` — streamable HTTP, revision 2026-07-28
  (`server/discover`, `initialize`, `tools/list`, `tools/call`) with six
  tools that act on the same store as REST.

## Run it

```sh
node --experimental-strip-types main.ts
```

`main.ts` binds an ephemeral port, registers it with the trial env at
`$MAKEFUN_ENV_URL/register`, then polls `$MAKEFUN_ENV_URL/done` until the
suite finishes and exits 0. `app.ts` is the whole forge. `DESIGN.md` is the
store/API contract the implementation follows.

## Local grade

Against the kit's sealed suite (`program/env/server.mjs`):

```
120/120 conformance checks (git 30/30, repos 15/15, issues 15/15,
pulls 20/20, graphql 20/20, mcp 15/15, protocol 5/5), perf 174/200
(push 39, clone 35, read 50, write 50) — local score 974/1000.
```

## License

MIT — see `LICENSE`.