notification-service — Planned SMS/Email Notification Hub (Not Yet Functional)
Responsibility
notification-service is the intended future owner of outbound customer notifications — today it is not a working service. Its own CLAUDE.md is a byte-for-byte copy of user-secure-engine’s CLAUDE.md, and its Rust source is a copy-paste of the same service’s bootstrap files, not a genuine scaffold for this domain.
Current state — confirmed non-functional
main.rsdeclares nine modules (app_config,transport,domain,infra,message_receiver,migration,repository,service,state), but onlyapp_config,domain,infra, andstateactually exist as files.transport,message_receiver,migration,repository, andserviceare referenced and do not exist anywhere in the tree — the code as it stands cannot compile.app_config.rs’sstart()function isuser-secure-engine’s own startup code verbatim: it setsservice_name = "user-secure-engine"and wiresUserModule/OtpModule/AuthModule/ConsentModule/AppCheckModule/TokenModule/UserServiceHandler— none of which are notification concerns.domain/mod.rsdeclaresauth,otp,otp_verify_audit,token_verification,usersubmodules — none of these files exist either.Cargo.toml’s package name is literally"user-secure-engine", and its dependency list (axum, tonic, mongodb, sea-orm, jsonwebtoken) is inherited from the copied source — there is no SMS/email-provider SDK, no templating library, and no dependency that points toward this service’s intended domain.- There is zero genuine notification-domain business logic anywhere in this service today — no templates, no provider integration, no masking logic, no mobile-facing API.
Planned scope — not implemented, documented here only to avoid re-discovering the same requirement later
Per the originating feature request, once rebuilt this service is intended to:
- Define notification templates for SMS, email, and voice-call channels.
- Integrate with an SMS provider, an email provider, and a call/voice provider, and dispatch a notification to a customer’s phone or email through them.
- Mask PII information inside the template content for auditing purposes before any audit record is persisted — this is a distinct masking concern from document-service’s existing audit-trail masking (
PII_KEYSindocumentaudit_masking.rs), since that pipeline masks a publisher’s raw request/response JSON, not rendered notification-template content; whether this service reuses that masking approach or needs its own is an open design question, not yet decided. - Expose an API for the mobile app to view past notifications (
ui-application’s notification inbox/history screen has no backing service today).
None of this exists yet. Per this site’s Engineering Doc Pipeline, this scope has not progressed past being a stated requirement — no BRD, SR, ADR, or architecture doc exists for it, and none should be written until the actual implementation begins; this page exists to record what’s real (nothing) and what’s intended (the bullets above), not to document a design that hasn’t been made yet.
Tech Stack
| Concern | Choice |
|---|---|
| Language | Rust (inherited, unverified — no notification-specific dependency has been added) |
| What actually runs | Nothing — main.rs cannot compile due to five missing modules |
| Intended data stores, messaging, providers | Not yet decided |
Implementation Notes
- This is not an early, legitimate scaffold left mid-build — it is a copy-paste artifact. Every file that exists (
app_config.rs,domain/mod.rs,infra/*.rs,state.rs) isuser-secure-engine’s own code, unmodified apart from presumably the copy operation itself. - The root
CLAUDE.md’s own Monorepo Layout table discloses this:notification-service/CLAUDE.md“was accidentally overwritten with a copy ofuser-secure-engine/CLAUDE.mdin a past commit” (commitc5ff891) — the source code copy appears to be the same incident, not a separate one. pii-service’s own doc listsnotification-serviceas a real consumer with a workingUserServicegRPC client and a hardcodedcaller_servicevalue still reading"user-secure-engine"in every audit-log entry it produces — see pii-service’s Implementation Notes and TD-00008, TD-02. That client code is itself part of the same copy-paste — it authenticates and callspii-serviceexactly asuser-secure-enginedoes, underuser-secure-engine’s own identity, not a notification-specific integration.- Before any real implementation starts here: fix the module tree (remove references to nonexistent modules or actually author them), rename the package in
Cargo.toml, and replace the inheritedapp_config.rs/domain/mod.rswith code that reflects this service’s actual domain (templates, provider clients, masking, notification history) rather than editing the copied identity service’s files in place.
Related Documents
- user-secure-engine — the service this one’s current source was copy-pasted from
- pii-service — already has a (misattributed) client integration from this service’s copied code
- document-service — existing PII-masking-for-audit precedent, relevant to this service’s planned masking requirement
Full module reference: notification-service/CLAUDE.md (currently a placeholder — see the root CLAUDE.md’s Monorepo Layout table).