> Sourced from [authorizerdev/authorizer](https://github.com/authorizerdev/authorizer) โ [MIT](https://github.com/authorizerdev/authorizer/blob/1726717485db6387a98019e1196dd5a233dfb7f4/CLAUDE.md). # CLAUDE.md Project instructions for AI coding tools (Claude Code, Cursor, Gemini, Copilot). Detailed conventions live in `.claude/skills/authorizer-*/SKILL.md` and load on demand when matching files are touched. Role-specific expertise lives in `.claude/agents/`. ## What is Authorizer Open-source, self-hosted authentication and authorization server. Supports 13+ databases, OAuth2/OIDC, social logins, MFA, magic links, role-based access, webhooks, and email templating. **Stack**: Go 1.24+, Gin, gqlgen, GORM, zerolog, Cobra CLI, JWT, OAuth2/OIDC. **v2**: CLI flags for all config โ no `.env` or OS env vars. ## Quick Commands ```bash make dev # Run with SQLite (dev mode) make build # Build server binary make build-app # Build login UI (web/app) make build-dashboard # Build admin UI (web/dashboard) make generate-graphql # Regenerate after schema.graphqls change make test # SQLite integration + storage (via TEST_DBS) make test-sqlite # SQLite everywhere (no Docker) make test-all-db # All 7 databases via Docker # Single test go clean --testcache && TEST_DBS="sqlite" go test -p 1 -v -run TestSignup ./internal/integration_tests/ ``` ## Architecture (Quick Reference) **Initialization order** (`cmd/root.go`): Config โ Storage โ MemoryStore โ Token โ Email/SMS โ OAuth โ Events โ HTTP/GraphQL โ Server **Key paths**: - GraphQL schema: `internal/graph/schema.graphqls` | Business logic: `internal/graphql/` - Storage interface: `internal/storage/provider.go` | SQL: `internal/storage/db/sql/` | NoSQL: `mongodb/`, `arangodb/`, `cassandradb/`, `dynamodb/`, `couchbase/` - OAuth/OIDC endpoints: `internal/http_handlers/` - Token management: `internal/token/` - Tests: `internal/integration_tests/` - Frontend: `web/app/` (user UI) | `web/dashboard/` (admin UI) **Pattern**: Every subsystem uses `Dependencies` struct + `New()` โ `Provider` interface. ## Critical Rules (Top of Mind) 1. **Admin GraphQL ops prefixed with `_`** โ not for public use. 2. **Schema changes MUST update all 13+ database providers.** 3. **Run `make generate-graphql`** after editing `schema.graphqls`. 4. **NEVER commit to main** โ always use a feature branch (`feat/`, `fix/`, `security/`, `chore/`), push, open a PR. Main must stay deployable. Detailed rules load via skills (see below) โ don't restate them here. ## AI Agents | Agent | Model | Focus | |---|---|---| | `principal-engineer` | opus | Full SDLC: Plan โ Execute โ Test โ Review across Go, storage, GraphQL, HTTP. Use for any change touching >1 subsystem. | | `security-engineer` | opus | OAuth2/OIDC, JWT, MFA, vulnerability audit. Second-pass on auth-sensitive PRs. | | `doc-writer` | haiku | API docs, guides, migration docs. | ## Project Skills (auto-load on matching files) | Skill | Fires when editing | |---|---| | `authorizer-go-conventions` | any `*.go` file | | `authorizer-graphql` | `internal/graph/`, `internal/graphql/`, `schema.graphqls` | | `authorizer-storage` | `internal/storage/` (any provider) | | `authorizer-http-handlers` | `internal/http_handlers/` | | `authorizer-security` | auth-sensitive code or `security/` branches | | `authorizer-testing` | any `*_test.go` | | `authorizer-frontend` | `web/app/`, `web/dashboard/` | ## Token Optimization Notes - Detailed rules live in skills โ they only load when relevant files are touched. - Agent definitions only load when invoked via the `Task` tool. - Go files auto-formatted on save via hook (no formatting discussion needed). - Use `Grep`/`Glob` before exploring โ avoid speculative file reads. - Prefer reading specific line ranges over full files.
Add to your project
Paste into your project's CLAUDE.md or ~/.claude/CLAUDE.md for global rules.
More for Docker
Claude Codex Settings CLAUDE.md
by @fcakyon
My personal Claude Code and OpenAI Codex setup with battle-tested skills, plugins, hooks and agents that I use daily.
Rivet CLAUDE.md
by @rivet-dev
Rivet Actors are the primitive for stateful workloads. Built for AI agents, collaborative apps, and durable execution.
Mindx CLAUDE.md
by @DotNetAge
ไธไธชๅฏ่ชไธป่ฟๅ็ๆฐๅญๅๅ่บซ
Claude Homelab CLAUDE.md
by @jmagar
Comprehensive Agents, Commands, Hooks, and Skills for homelab service management - media automation, infrastructure monitoring, document management, and more
Sing Box Sub Converter CLAUDE.md
by @Mystery00
ๅๅนถใ่ฝฌๆขsingbox้ ็ฝฎ๏ผไปฃ็ ๅ่่ช https://github.com/Toperlock/sing-box-subscribe
Coolify Docs CLAUDE.md
by @coollabsio
Documentation for Coolify
MCP servers for Docker
netdata/netdata#Netdata
๐๏ธ ๐ โ๏ธ ๐ ๐ ๐ช ๐ง - Discovery, exploration, reporting and root cause analysis using all observability data, including metrics, logs, systems, containers, processes, and network connections
mickaelkerjean/filestash
๐๏ธ โ๏ธ - Remote Storage Access: SFTP, S3, FTP, SMB, NFS, WebDAV, GIT, FTPS, gcloud, azure blob, sharepoint, etc.
Higress MCP Server Hosting
A solution for hosting MCP Servers by extending the API Gateway (based on Envoy) with wasm plugins.
Get the Claude Code Starter Pack
Top CLAUDE.md rules for Next.js, TypeScript, Python, Go, and React โ free.

