This is the authoritative source for all coding conventions in this monorepo. For workflow rules (verification, git, deployment), see CLAUDE.md. For architecture details, see architecture-deep-dive.md.
This directory is the single source of truth for VoIPbin coding conventions.
Recommended reading order for new engineers:
- package-structure.md — file layout and the bin-common-handler 3-service admission rule
- naming.md — Go naming conventions
- imports.md — import grouping and ordering
- error-handling.md — wrap, log, propagate
- logging.md — Debug for retrieved data, Info for external events
- models.md — struct definitions, field tags, JSON marshaling
- database.md — squirrel + commondatabasehandler + dbhandler-only access
- handlers.md — handler interface + struct + constructor pattern
- rpc.md — inter-service RabbitMQ RPC
- api-design.md — atomic responses, WebhookMessage pattern reference, URL path naming convention
- events.md — pub/sub
- configuration.md — env vars, viper
- testing.md — mockgen, table-driven tests, coverage targets
- metrics.md — Prometheus naming, no name collisions with shared library
- security.md — secrets, input validation, authorization
- direct-resource-types.md — no magic strings for direct resource types