Implement Customer/Outlet Empowerment Portal with Self-Service Features#76
Draft
Copilot wants to merge 4 commits into
Draft
Implement Customer/Outlet Empowerment Portal with Self-Service Features#76Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Co-authored-by: Fadil369 <121701645+Fadil369@users.noreply.github.com>
…rtal Co-authored-by: Fadil369 <121701645+Fadil369@users.noreply.github.com>
Co-authored-by: Fadil369 <121701645+Fadil369@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Build self-service customer empowerment portal
Implement Customer/Outlet Empowerment Portal with Self-Service Features
Oct 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a comprehensive self-service customer portal for SSDP outlet owners, providing them with powerful tools to manage their orders, inventory, payments, and business operations efficiently. The portal features AI-powered recommendations, real-time analytics, and full bilingual support (Arabic/English).
Problem Statement
Outlet owners needed a centralized, insight-rich platform to:
Solution
Built a modern, responsive customer portal with 7 core feature areas accessible through an intuitive tab-based interface:
1. Dashboard Overview
Provides real-time business metrics including total orders, available products, current balance, and orders in transit. Features visual trend indicators (+/- percentages) and alerts for recent orders and low stock items.
2. Self-Service Ordering
Enables customers to search products, view real-time stock availability, add items to cart, and confirm orders with a single click. The interface includes category filtering and displays current stock levels for each product.
3. Inventory Insights
Tracks stock levels with visual progress bars, monitors expiry dates (60-day alerts), identifies fast-moving items, and provides category-based filtering. Each product shows its velocity (fast/medium/slow) and last restocked date.
4. Payment Management
Displays current balance, credit limit, and available credit with utilization percentage. Shows complete transaction history (payments, credits, refunds) and supports multiple payment methods. Includes payment due dates and minimum payment calculations.
5. Promotions & Notifications
Lists active promotions with discount codes and one-click copy functionality. Real-time notifications keep users informed about order status, promotions, payments, and inventory alerts with read/unread status tracking.
6. AI Recommendations
Provides intelligent suggestions for reordering based on historical patterns, bundle opportunities, optimal ordering times, and seasonal demand forecasts. Each recommendation includes priority level (high/medium/low) and estimated savings calculations.
7. Complaint Resolution
Allows users to submit complaints with categories (Quality, Delivery, Order, Payment, Service), set priority levels, and track status (open/in-progress/resolved). Includes message tracking and assignment visibility.
Technical Implementation
Frontend (Next.js 14 + TypeScript)
src/components/customer-portal//customer-portalwith tab-based navigationBackend (FastAPI + Python)
/api/v1/customer-portal/API Endpoints Added
Screenshots
Dashboard Overview with Real-Time Stats
Self-Service Ordering Interface
AI-Powered Recommendations
Testing
Added comprehensive unit tests:
CustomerPortalDashboard.test.tsx- Dashboard rendering and bilingual supportOrderingInterface.test.tsx- Product search, filtering, and cart functionalityDocumentation
Created
docs/CUSTOMER_PORTAL.mdwith complete documentation including:Files Changed
New Files (18)
customer-portal/*.tsx)customer_portal.py, schemas)Modified Files (4)
backend/app/main.py- Registered customer portal routerfrontend/src/components/layout/Navigation.tsx- Added portal navigation linkfrontend/public/locales/en/common.json- Added English translationsfrontend/public/locales/ar/common.json- Added Arabic translationsBusiness Impact
Acceptance Criteria ✅
All requirements from the original issue have been met:
Next Steps
The portal is production-ready with mock data. Future work could include:
Related Issue: #ssdp-root-epic (Outlet/Customer Empowerment Portal)
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.