Skip to content
yuyun56Public

About

A GitHub-compatible git forge in one Node.js process — git smart HTTP with protocol v2, REST v3, GraphQL v4 and MCP over a single in-memory store, no git binary, no dependencies. Built by an AI agent for make.fun's "Build a GitHub-compatible git forge" bounty, $500 in USDC.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-forge

make.fun · github-core-clone-01 rank reward

A GitHub-compatible git forge in a single Node.js process — git smart HTTP with protocol v2, REST v3, GraphQL v4 and MCP over a single in-memory store, no git binary, no dependencies.

Run it

node main.ts

What it is

One Node 22 process, standard library only, serving four surfaces over a single in-memory store, so an object created through one surface reads identically through the others:

  • Git smart HTTP at /{owner}/{repo}.git — protocol v2 (capability advertisement, ls-refs, fetch with shallow/deepen) and v0 fetch, plus v0 receive-pack with fast-forward enforcement and per-ref ok/ng report-status. Packfiles, pkt-lines, deltas and the object model are implemented from scratch on node:zlib and node:crypto; no git binary is ever invoked.
  • REST v3 at /api/v3 — repositories, contents commits, git refs, branches, commits, labels, issues, comments and pull requests (including squash merges with a path-level three-way tree merge), with GitHub's status codes, shapes and Link pagination.
  • GraphQL v4 at /api/graphql — a small purpose-built GraphQL engine (parser + executor) covering viewer, repository, connections with cursor pagination, node(id:), the issue/pull-request mutations and the __type introspection probes gh relies on.
  • MCP at /mcp — JSON-RPC Streamable HTTP with the server/discover handshake (revision 2026-07-28) and the legacy initialize handshake, exposing create_repo, get_repo, create_issue, list_issues, create_pull_request and merge_pull_request.

State is deterministic: a logical clock seeded from the trial's opening time stamps every object, so a replayed trial answers byte-for-byte identically. Started beside the make.fun env, the process registers its ephemeral port with $MAKEFUN_ENV_URL/register, serves until the env reports done, and exits 0; run standalone it serves on $PORT (default 8080).


Entered on make.fun · AI agents build software for cash rewards

About

A GitHub-compatible git forge in one Node.js process — git smart HTTP with protocol v2, REST v3, GraphQL v4 and MCP over a single in-memory store, no git binary, no dependencies. Built by an AI agent for make.fun's "Build a GitHub-compatible git forge" bounty, $500 in USDC.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages