Hybrid Go + TypeScript monorepo containing Nhost's open-source services, SDK, CLI, dashboard, and documentation. Uses Nix for Go builds and pnpm + Turbo for JS/TS workspaces.
Important: Each project may have its own CLAUDE.md with project-specific context. Always load the relevant project's CLAUDE.md when working on that project.
services/auth- JWT-based authentication service with OAuth2/OIDC support, email/SMS verification, WebAuthn. Uses OpenAPI (oapi-codegen), sqlc for DB queries, and gomock for testingservices/constellation- GraphQL engine that turns relational databases (PostgreSQL, SQLite) into a role-based GraphQL API. Near-drop-in replacement for Hasura Community Edition: Hasura-compatible metadata, schema generation, queries/mutations/subscriptions, remote schemas, and cross-source remote relationshipsservices/functions- Node.js development runtime for serverless functions with Express, esbuild bundling, and hot-reload. Local dev simulation only, not a production serviceservices/mcp- MCP (Model Context Protocol) server exposing a Hasura GraphQL endpoint to AI assistants. OAuth2/OIDC auth with JWT forwarding to the upstream GraphQL endpointservices/postgres- PostgreSQL Docker image with the extensions and plugins used by Nhost projects (not a Go service; image config and tests only)services/storage- S3-compatible file storage with virus scanning (ClamAV), metadata management, and image transformation
- Go-based CLI for local development (
nhost dev), project management, deployments, secrets, and MCP server
internal/lib/oapi- shared OpenAPI middleware and utilitiesinternal/lib/clidocs- CLI documentation generation
- Next.js admin UI for managing Nhost projects. React 19, TypeScript, TanStack Query, Apollo Client, Tailwind CSS, Shadcn/Radix components
- Client SDK providing auth, storage, GraphQL, and functions helpers. Builds to ESM, CJS, and UMD
- Astro-based documentation site
examples/demos/- feature demonstrationsexamples/guides/- learning guides (React Query, Apollo, CodeGen)examples/quickstarts/- quick setup examples (Next.js, React, React Native)examples/tutorials/- full tutorials (Next.js, Vue, React Native)examples/docker-compose/- self-hosting reference
build/makefiles/general.makefile- shared Makefile targets (help, develop, check, build, build-docker-image, dev-env-up/down)build/makefiles/release.makefile- release targetsbuild/configs/- shared build configurations
tools/codegen- code generation utilitiestools/ghactivity-ghCLI extension (binarygh-activity, invoked asgh activity ...) that builds a markdown stand-up report of a user's GitHub PR/issue activity in an org over a time windowtools/govulncheck-wrapper- wrapper aroundgovulncheckfor the monorepo's vulnerability scanning workflow
- Go services use Nix dev shells. Enter with:
nix develop .\#<project-name>(e.g.,nix develop .\#auth) - Each service has a
project.nixand aMakefilethat includesbuild/makefiles/general.makefile - Common Makefile targets:
make help,make develop,make check,make build,make build-docker-image,make dev-env-up,make dev-env-down - JS/TS packages use pnpm 11.1.0 (not npm or yarn) with Turbo for orchestration
- Node >= 22 required
Authoritative design rules live in .claude/docs/. Load the one that matches the file you are touching before writing or reviewing code:
- Go —
.claude/docs/go-design-rules.md. Covers placement, package invariants, local correctness, the mandatorygolines/golangci-lint --fix ./...post-change checks, and the module-wide constraints (Go 1.26.0, singlego.modat root, generated-file globs,exhaustructpolicy,export_test.goban). - TypeScript / JavaScript —
.claude/docs/javascript-design-rules.md. Repo-wide rules plus separate sections for Dashboard (React/Next.js) and SDK & Node. Tooling:pnpm(nevernpm/yarn), Biome, Turbo, Node ≥ 22.
Per-project CLAUDE.mds layer project-specific invariants on top of these — read them too.
- GitHub Actions workflows in
.github/workflows/. - Separate check and release workflows per project (e.g.,
auth_checks.yaml,auth_wf_release.yaml). - Go services are built with Nix and packaged as Docker images.
- JS/TS packages are built with Turbo.
- Changelogs generated with
git-cliff.
PR review uses the agents in .claude/agents/ (go-developer, javascript-developer, generic-developer) and the rules docs in .claude/docs/. The /nhost_review skill routes diff hunks to the right agent automatically. When reviewing manually, apply the design-rules document that matches the language of the change, and remember to update the project's CLAUDE.md if structure or standards change.