WhoDB is a database management tool with dual-edition architecture: Community Edition (CE) in /core and Enterprise Edition (EE) in /ee.
Note: The ee/ submodule is only available to core WhoDB developers. If ee/ is not present, stub files provide no-op implementations so CE builds work normally. Build tags (//go:build ee vs //go:build !ee) control which code is compiled.
EE Documentation: All Enterprise Edition documentation, commands, and development guides are in ee/AGENTS.md and ee/.claude/docs/. This file covers CE only.
- Analyze before coding - Read relevant files and understand patterns before writing code. Always check to see if something existing was done, or if an existing pattern can be reused or adapted.
- GraphQL-first - All new API functionality via GraphQL. Never add HTTP resolvers unless explicitly needed (e.g., file downloads)
- No SQL injection - Never use
fmt.Sprintfwith user input for SQL. Use parameterized queries or GORM builders. See.claude/docs/sql-security.md - Plugin architecture - Never use
switch dbTypeorif dbType ==in shared code. All database-specific logic goes in plugins. See.claude/docs/plugin-architecture.md - CE/EE separation - EE code MUST stay in the ee submodule. All EE documentation is in
ee/. No exceptions - Documentation requirements - All exported Go functions/types need doc comments. All exported TypeScript functions/components need JSDoc. See
.claude/docs/documentation.md - Localization requirements - All user-facing strings must use
t()with YAML keys. No fallback strings. No hardcoded UI text. See.claude/docs/localization.md - Verify before completing - After finishing any task, verify: (1) type checks pass (
pnpm run typecheckfor frontend,go buildfor backend), (2) no linting errors, (3) all added code is actually used (no dead code). See.claude/docs/verification.md - Fallback clarification - Do not include fallback logic UNLESS you were asked to. If you think the project could benefit from fallback logic, first ask and clarify
- Show proof - When making a claim about how something outside of our codebase works, for example a 3rd party library or function, always provide official documentation or the actual code to back that up. Check online if you have to.
- No defensive code - Do not program defensively. If there is an edge or use case that you think needs to be handled, first ask.
- No mention of EE in CE - Under no circumstance can you mention ANY EE databases, features, or functionality in the CE version.
core/ # CE backend (Go)
server.go # Entry point (func main)
src/src.go # Engine initialization, plugin registration
src/engine/plugin.go # PluginFunctions interface
src/plugins/ # Database connectors (each implements PluginFunctions)
graph/schema.graphqls # GraphQL schema
graph/*.resolvers.go # GraphQL resolvers
frontend/ # React/TypeScript
src/index.tsx # Entry point
src/store/ # Redux Toolkit state
src/generated/ # GraphQL codegen output (@graphql alias)
cli/ # Interactive TUI CLI (Bubble Tea)
desktop-ce/ # CE desktop app (Wails)
desktop-common/ # Shared desktop code
.github/workflows/ # CI/CD pipelines (release, build, deploy)
Additional docs: .claude/docs/cli.md (CLI), .claude/docs/desktop.md (desktop), .claude/docs/ci-cd.md (GitHub Actions).
- Use
anyinstead ofinterface{}(Go 1.18+) - Use
plugins.WithConnection()for all database operations - handles connection lifecycle - SQL plugins should extend
GormPluginbase class (core/src/plugins/gorm/plugin.go) - When adding plugin functionality: add to
PluginFunctionsinterface, implement in each plugin - Use
ErrorHandler(core/src/plugins/gorm/errors.go) for user-friendly error messages - Never log sensitive data (passwords, API keys, tokens, connection strings)
- Delete build binaries after testing (
go buildartifacts)
- Use PNPM, not NPM. Use pnpx, not npx
- Define GraphQL operations in
.graphqlfiles, then runpnpm run generate - Import generated hooks from
@graphqlalias - never use inlinegqlstrings - CE features in
frontend/src/
Use core/go.mod as the reference point for dependency versions.
Additional docs: .claude/docs/cli.md (CLI), .claude/docs/desktop.md (desktop), .claude/docs/ci-cd.md (GitHub Actions), .claude/docs/testing.md (testing).
See .claude/docs/testing.md for comprehensive testing documentation including:
- Frontend Cypress E2E tests (CE and EE)
- Docker container setup for test databases
- Go backend unit and integration tests
- CLI tests
Quick reference:
# Frontend Cypress
cd frontend && pnpm cypress:ce:headless # CE headless
cd frontend && pnpm cypress:ee:headless # EE headless (requires ee/)
# Backend Go tests
bash dev/run-backend-tests.sh all # Unit + integration
# CLI tests
bash dev/run-cli-tests.sh # All CLI tests# Backend: cd core && go run .
# Frontend: cd frontend && pnpm start
# CLI: cd cli && go run .- Clean, readable code over clever code
- Only add what is required - no overengineering
- Do not modify existing functionality without justification
- Do not rename variables/files unless necessary
- Remove unused code - no leftovers
- Comment WHY, not WHAT - explain reasoning, edge cases, and non-obvious behavior. Never comment obvious code
- Ask questions to understand requirements fully
- Use subagents to accomplish tasks faster
- Maintain professional, neutral tone without excessive enthusiasm
- When you finish a task, go back and check your work. Check that it is correct and that it is not over-engineered
- When you finish a task, if the ee submodule is available, then go through it and see if it needs to be modified to accomodate your changes. For example if you change a plugin signature in CE, update it in EE as well