2.8 KiB
2.8 KiB
NotiHub Repository Rules
Repository Role and Contracts
- This repository is the Java 17 Spring Boot backend for shared email, SMS, Kakao notification, template, attachment, scheduling, and delivery-report workflows.
- Treat endpoint paths, request and response DTOs, channel and result codes, template variables, attachment behavior, scheduling rules, identifiers, retry behavior, and error responses as contracts used by other projects.
- Preserve the established controller, service, external-client, scheduler, DTO, configuration, and persistence boundaries.
- Consume KriCommon through
com.kri.common:starter:beta.1.6.3. Do not change that approved version or duplicate a KriCommon feature without separate explicit approval.
Delivery and External-Side-Effect Safety
- Never send real email, SMS, Kakao notifications, callbacks, or business API requests during development or validation. Use an already-approved mock, fake, or verified test recipient only when the task explicitly requires it.
- Before changing a send flow, identify creation, reservation, dispatch, provider callback or polling, retry, cancellation, and final-status transitions.
- Preserve idempotency and duplicate-send protections across HTTP retries, scheduler overlap, worker retries, and provider timeouts. Do not mark a message successful before the provider contract establishes success.
- Keep provider timeouts, retry limits, error mapping, and partial-failure behavior explicit. Do not silently discard provider errors or attachments.
- Validate attachment count, type, size, filename, storage path, and lifecycle. Prevent path traversal and avoid loading unbounded files or message bodies into memory.
Data, Security, and Privacy
- Keep transaction boundaries narrow around queue, template, attachment, report, and status changes. Review concurrency and locking whenever scheduled or bulk work is modified.
- Treat the MySQL API-key data source as read-only authentication data. Do not add writes to it without separate explicit approval.
- Never log credentials, API keys, provider tokens, full recipient lists, complete message bodies, attachment contents, or other personal data.
- Preserve authentication, authorization, validation, rate limits, allowlists, template ownership checks, and reporting access controls.
Documentation and Verification
AGENTS.mdandCLAUDE.mdare harness-generated outputs. Never edit either file directly; edit.agent/project.mdor.agent/profile.ymland recompose instead.- Use the repository Gradle Wrapper and run
.\gradlew.bat compileJavaon Windows for relevant changes, followed by focused tests that cannot deliver real notifications or call live providers. - Do not start schedulers, connect to production data, upload real attachments, or invoke external notification providers during validation without separate explicit approval.