Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 3.3 KB

File metadata and controls

65 lines (48 loc) · 3.3 KB

GitNull

GitNull is an onchain-native code collaboration platform — Git as you know it, but with immutable contribution records, autonomous AI agents, and a token-powered economy built directly into every repository.

Run & Operate

  • pnpm --filter @workspace/api-server run dev — run the API server (port 5000)
  • pnpm --filter @workspace/gitnull run dev — run the frontend (uses PORT from workflow)
  • pnpm run typecheck — full typecheck across all packages
  • pnpm run build — typecheck + build all packages
  • pnpm --filter @workspace/api-spec run codegen — regenerate API hooks and Zod schemas from the OpenAPI spec
  • pnpm --filter @workspace/db run push — push DB schema changes (dev only)
  • Required env: DATABASE_URL — Postgres connection string

Stack

  • pnpm workspaces, Node.js 24, TypeScript 5.9
  • Frontend: React + Vite + Wouter + TanStack Query + shadcn/ui + Tailwind CSS
  • API: Express 5
  • DB: PostgreSQL + Drizzle ORM
  • Validation: Zod (zod/v4), drizzle-zod
  • API codegen: Orval (from OpenAPI spec)
  • Build: esbuild (CJS bundle)
  • Fonts: Geist + Geist Mono (Vercel-style)

Where things live

  • lib/api-spec/openapi.yaml — OpenAPI spec (source of truth for all API contracts)
  • lib/db/src/schema/ — Drizzle ORM table definitions (repositories, pull_requests, issues, bounties, contributors, activity_events)
  • artifacts/api-server/src/routes/ — Express route handlers
  • artifacts/gitnull/src/ — React frontend (pages/, components/)
  • lib/api-client-react/src/generated/ — Generated React Query hooks (do not edit manually)
  • lib/api-zod/src/generated/ — Generated Zod schemas for server validation (do not edit manually)

Architecture decisions

  • Contract-first: OpenAPI spec gates all codegen. Always update openapi.yaml before writing routes or hooks.
  • Body schema naming: All request bodies use entity-shaped names (RepositoryInput, not CreateRepositoryBody) to avoid Orval TS2308 collisions.
  • Onchain addresses and proofs are generated server-side as hex strings for demo purposes.
  • Activity events are written as side effects within mutation handlers (PR merge, issue create, bounty settle).
  • Dark mode is the default and only theme — this is a developer tool.

Product

  • Dashboard with platform stats ($GNULL paid, onchain proofs, PRs merged) and activity feed
  • Repository browser with language filters, agent status badges, and per-repo detail views
  • Pull Request workflow with diff stats (additions/deletions), merge that generates onchain proof NFTs
  • Issue tracker with bounty amounts in $GNULL
  • Bounty board — post $GNULL on issues, agent-verified settlement
  • Contributor leaderboard with wallet addresses, reputation scores, and $GNULL balances

User preferences

  • UI style: Vercel + GitHub aesthetic — dark monochromatic, green accents, monospace for code/hashes

Gotchas

  • Run pnpm --filter @workspace/api-spec run codegen after any spec change before using updated hooks
  • Query params on listIssues and listPullRequests were removed to avoid Orval TS2308 naming collision
  • Always restart the API server workflow after backend changes (it rebuilds on start)
  • Do NOT restart the frontend workflow while the design subagent is running

Pointers

  • See the pnpm-workspace skill for workspace structure, TypeScript setup, and package details