Skip to content

Latest commit

 

History

History

Conventions

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:

  1. package-structure.md — file layout and the bin-common-handler 3-service admission rule
  2. naming.md — Go naming conventions
  3. imports.md — import grouping and ordering
  4. error-handling.md — wrap, log, propagate
  5. logging.md — Debug for retrieved data, Info for external events
  6. models.md — struct definitions, field tags, JSON marshaling
  7. database.md — squirrel + commondatabasehandler + dbhandler-only access
  8. handlers.md — handler interface + struct + constructor pattern
  9. rpc.md — inter-service RabbitMQ RPC
  10. api-design.md — atomic responses, WebhookMessage pattern reference, URL path naming convention
  11. events.md — pub/sub
  12. configuration.md — env vars, viper
  13. testing.md — mockgen, table-driven tests, coverage targets
  14. metrics.md — Prometheus naming, no name collisions with shared library
  15. security.md — secrets, input validation, authorization
  16. direct-resource-types.md — no magic strings for direct resource types