- Refreshed CODEBASE_ANALYSIS.md to reflect the new ownership model and improve onboarding documentation. - Deleted obsolete VALIDATION_DUPLICATION_REPORT.md to streamline the codebase. - Made minor adjustments to various components and services for better organization and clarity.
2.2 KiB
2.2 KiB
Codebase Analysis (October 2025)
✅ Recent Cleanup
- Checkout contracts unified:
checkoutBuildCartRequestSchemaand the wrapped response now live in@customer-portal/domain/orders. Both the NestJS controller and service import the shared types, eliminating local Zod definitions and ad-hoc request shapes. - SIM configuration aligned: The catalog store and
useSimConfigurehook persist state that maps directly tosimConfigureFormSchema. Validation now delegates to the domain schema, and UI state uses the shared field names (selectedAddons,scheduledActivationDate, etc.). - Dashboard metadata centralized: Invoice/service activity metadata schemas moved into
@customer-portal/domain/dashboard, and the portal utilities reuse them rather than maintaining local copies. - UI totals reuse domain types:
EnhancedOrderSummarynow aliasesCheckoutTotals, keeping the presentation layer in lockstep with the API contract. - Build artefacts removed: Legacy
dist/folders underapps/bffandpackages/*were deleted and remain ignored so future builds stay out of version control.
🔍 Follow-Up Opportunities
- Auth workflow audit: Re-run a focused review of the WHMCS link workflow and mapping services to confirm no lingering loose types (the earlier report flagged placeholder values—verify after the latest merges).
- Portal checkout transforms: Consider using
simConfigureFormToRequestwhen serialising SIM selections into cart params so the client sends the same payload shape the BFF expects. - End-to-end validation run: Execute
pnpm lint && pnpm type-checkonce the workspace stabilises to catch any regressions introduced outside the touched files.
🎯 Next Recommended Steps
- Type-check sweep – run the workspace type checker and fix residual errors, paying special attention to auth and user modules.
- Checkout flow trace – ensure the BFF and portal both serialise/deserialise SIM selections via the shared helpers (avoids stale query-param parsing edge cases).
- Documentation refresh – propagate the new ownership model (domain-first schemas) into any onboarding or architecture docs so future engineers default to the shared packages.