3.9 KiB
3.9 KiB
Sprint 9 - Product Engagement Report
1. Architecture Decisions
- Product engagement was implemented as a dedicated module under product feature:
src/app/features/website/product/engagement/components. - ProductFacade remained the single feature entry point for engagement flows:
loadRating(productID)loadReviews(productID, query)loadQuestions(productID, query)submitReview(productID, input)submitQuestion(productID, input)
- No feature component uses
HttpClientdirectly. - Data flow remains layered:
- Feature Container/Components ->
ProductFacade->ProductDataService->ProductDataProvider(ApiProductDataProvider) ->ApiService.
- Feature Container/Components ->
- Existing auth/payment/bootstrap initialization flows were not changed.
- Widget/section/bootstrap runtime architecture was preserved.
2. Reusable Components Added
Product Engagement Atoms
StarsComponentStarSelectorComponentProductTabsComponentRatingSummaryComponent
Reviews
ReviewFormComponentReviewCardComponentReviewListComponent(includes pagination support)
Questions
QuestionFormComponentQuestionCardComponentQuestionListComponent(includes pagination + Ask Question toggle)
Product Page Sections
- Existing reusable sections kept:
- Gallery, Product Info, Variant Selector, Delivery, Description, Related Products
- New/updated reusable sections:
ProductSpecificationsComponentProductWarrantyComponent- Reviews section via
ReviewListComponent - Questions section via
QuestionListComponent
3. Domain Models Added
File: src/app/core/products/models/product-engagement.model.ts
RatingSummaryReviewQuestionAnswer- Supporting contracts:
RatingDistributionEntryEngagementListQueryEngagementListResult<T>SubmitReviewInputSubmitQuestionInput
4. Bootstrap Additions (Feature Config Only)
Added new optional config model:
src/app/shared/models/config/product-page-config.model.ts
Added to bootstrap contract:
BootstrapConfig.productPage?: ProductPageConfig
Added to mock bootstrap example:
src/assets/mock/bootstrap/bootstrap.jsonnow containsproductPagewith:rating.enabledreviews.enabled/pageSize/showSummaryquestions.enabled/pageSizetabs.enabled/itemsrelatedProducts.enabled
No review/question domain data was placed in bootstrap.
5. Backend Endpoints Expected
Prepared in docs/contracts as target backend API:
GET /products/{id}/ratingGET /products/{id}/reviewsGET /products/{id}/questionsPOST /products/{id}/reviewsPOST /products/{id}/questions
Current runtime uses existing available mock/API item data mapping where applicable, while facade methods and contracts are already prepared for dedicated engagement endpoints.
6. Validation Results
Build
npm run build-> PASS
Architecture Rules
- No
HttpClientusage found in feature layer (src/app/features/**). - No
environment.*usage found in feature layer (src/app/features/**). - No DTO imports found in feature layer (
src/app/features/**, checked for\bdto\b|\.dto).
Architecture Governance Scripts
npm run arch:check:boundaries-> PASSnpm run arch:check:cycles-> PASS (No circular dependency found)
7. Documentation Updated
Platform docs:
docs/platform/00-bootstrap-example.mddocs/platform/02-bootstrap-json-spec.mddocs/platform/06-api-contracts.mddocs/platform/10-product-domain.mddocs/platform/13-backend-requirements.md
Backend docs:
docs/backend-platform/business-apis.md
8. Future Extension Points
- Photo upload support in review form (placeholder is already present in UI).
- Backend-side moderation and verification flags for reviews/questions.
- Dedicated seller identity and accepted-answer workflow integration.
- Server-driven sorting/filtering for reviews and questions.
- Optional widgetized engagement blocks for dynamic page composition.