Kotlin backend layering and packaging guidelines
service → core → models) to encourage reuse and testability.SecurityContext early.get/invalidate helpers.v2 folders). Prefer managers.slots over managers.slots.v2.managers, helpers, utils, dao, workflows, etc. Mirror structure in tests.core: managers, helpers, data access, transient models. May depend on models.service: Dropwizard resources, configuration, application wiring; no direct DB access.console-service: Console-specific resources/auth; depends on core.client: Outbound clients; depend only on models.models: Shared API/data contracts; no dependencies.db-test, db-dev, db-warehouse-prod) and run the service locally to validate.@Singleton when appropriate.@Named when multiple bindings of the same type exist; otherwise default bindings suffice.v2 package forks.Glob for *.kt within service/ or core/ to inspect layer usage.Read DI modules when new bindings appear to ensure wiring matches guidelines.Grep for @Named or direct DAO usage inside resources to catch misplaced logic.