A GitHub-compatible git forge in a single Node 22 process, with no runtime
dependencies and no git binary. Built for the make.fun competition
github-core-clone-01 ("Build a GitHub-compatible git forge").
- git smart HTTP at
/{owner}/{repo}.git—info/refs,git-upload-pack(protocol v2 and v0) andgit-receive-pack(v0). Pure-TypeScript git object model: blobs, trees, commits, tags, loose objects, packfile read (OFS/REF deltas, thin packs) and write, refs, shallow clones (deepen), fast-forward validation on push. - REST v3 under
/api/v3— root, meta, users, repos (create/list/get/ patch/delete, branches, refs, commits, contents, labels), issues and comments, pull requests (create/list/get/files, squash merge). JSON everywhere,X-GitHub-Request-Idon every reply, Bearer token auth. - GraphQL v4 at
POST /api/graphql— repositories, issues, pull requests, search,node(id:), mutations (createIssue,closeIssue,createPullRequest,mergePullRequest,addComment), batch queries. - MCP at
POST /mcp— streamable HTTP,server/discoverand legacyinitialize,tools/list,tools/call(create_repo,get_repo,create_issue,list_issues,get_issue,create_pull_request,merge_pull_request,list_pull_requests). - Health at
GET /healthz→{"ok": true}.
State lives in memory (per repo: objects, refs, issues, pulls, labels). Timestamps are deterministic (a monotonic sequence clock), so object SHAs are stable across replays.
MAKEFUN_SHOP_TOKEN=<token> node --experimental-strip-types main.tsmain.ts registers the service at $MAKEFUN_ENV_URL/register, binds an
ephemeral port and long-polls /done. For local checks, start the app the
same way and point the kit runner at it:
node --experimental-strip-types sdk/run.ts --url http://127.0.0.1:PORT --token "$TOKEN" [--perf] [--json]main.ts— starter lifecycle (unchanged).app.ts— the whole forge (HTTP plumbing, store, REST, GraphQL, MCP, git wire protocol).package.json,tsconfig.json— Node 22, type stripping, no deps..makefun/owner.json— competition wallet.
MIT — see LICENSE.