Tracking potential improvements beyond the CS320 requirements. We move items here once they no longer fit inside the README so the project landing page stays focused.
- UI component library selection for the new UI (e.g., utility CSS + custom components vs. lightweight kit).
- OAuth2/SSO upgrade path beyond initial JWT/basic auth.
- WAF/API gateway selection for production deployment.
- Secrets management tooling for prod (vault/secret manager implementation details).
Consider these extensions when adding API/persistence/UI while keeping the current fail-fast behavior for domain invariants:
- Time abstraction: Keep using the
Clockoverload for date checks; consider a simpleTimeProviderwrapper so all time-based validations are deterministic and testable. - Domain-specific wrappers: Add tiny helpers like
validatePhone(String phone)that callvalidateDigits(..., 10)to avoid passing lengths around and make intent clearer. - Pattern/range helpers: If adding new fields, introduce generic
validatePattern(String value, String label, Pattern p)andvalidateRange(int value, String label, int min, int max)so future rules don't sprout ad-hoc checks elsewhere. - Error coding: When exposing REST, consider a custom
ValidationExceptionthat carries a code/key to map cleanly to JSON error payloads; keepIllegalArgumentExceptionin the domain if preferred. - Bean Validation bridge: For DTOs in Spring Boot, use Jakarta Bean Validation annotations (
@NotBlank,@Size, etc.) and map to domain objects that still use theValidationhelpers, keeping API-level and domain-level validation consistent.
- Phone internationalization: Current
validateDigits(..., 10)enforces US phone numbers (exactly 10 digits). Consider supporting international formats via E.164 or libphonenumber when the app needs global reach.
- Future observability enhancements (distributed tracing backends, log shipping) to be considered post-MVP.
- Once every caller uses Spring DI, delete
getInstance()and the in-memory store implementations entirely. - Remove the legacy singleton tests and compatibility guards after the DI-only migration is complete.
- Update documentation/ADRs at that time to reflect the fully managed Spring context (no static singletons).
Service-level lookup methods have been implemented:
- Service-level lookup methods: ✅ Added
getAllContacts()/getContactById(String)toContactService,getAllTasks()/getTaskById(String)toTaskService,getAllAppointments()/getAppointmentById(String)toAppointmentService. Controllers now use these instead ofgetDatabase(). - Consistent ID normalization: ✅ All lookup methods validate/trim IDs at the service layer.
- Path vs body ID validation: Deferred - not a CS320 requirement. The path ID is canonical; body ID is currently ignored on PUT endpoints.
- java.time migration: Domain layer uses
java.util.Dateper existing design. Future phases could migrate tojava.time.LocalDateTime/ZonedDateTimefor immutability and better timezone handling. Would require domain, service, DTO, and test changes.
- Custom validation exception:
GlobalExceptionHandlercatches allIllegalArgumentException. Consider introducingDomainValidationExceptionfor finer-grained handling, separating domain validation errors from unexpected framework exceptions.
commons-lang3 3.17.0 flagged by Dependency-Check (CVE-2025-48924).FIXED: Upgraded to 3.20.0.swagger-ui DOMPurify 3.1.6 (transitive via swagger-ui 5.18.2) flagged with CVE-2025-26791.FIXED: Upgraded springdoc-openapi to 2.8.7.