Skip to content

Commit edc39d7

Browse files
committed
Add feature documentation, README, and technical architecture for ContosoShop E-commerce Support Portal
- Created AppFeatures.md detailing user authentication, order management, return/refund capabilities, customer support interface, error handling, and roadmap for cloud-scale features. - Added README.md providing an overview of the project, key features, local setup instructions, and next steps for AI integration. - Introduced TechStack.md outlining the solution architecture, frameworks, key components, and design considerations for local vs cloud environments.
1 parent 99858ca commit edc39d7

12 files changed

Lines changed: 10220 additions & 0 deletions

File tree

96-lab-exercise.md

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

AppFeatures.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# AppFeatures.md
2+
3+
## Core Features Implemented
4+
5+
The ContosoShop E-commerce Support Portal offers the following key features in its base implementation:
6+
7+
### 1. User Experience & Authentication
8+
9+
- **Single-user simulation**: The application runs locally without requiring complex authentication. A user identity ("John Doe") is assumed for development and demo purposes.
10+
- **Session-based state**: While authentication isn't enforced in development, the architecture supports adding identity providers (like Azure AD or Auth0) for production.
11+
- **Navigation & layout**: Provides a navigation menu with links to "Orders" and "Contact Support" pages, ensuring intuitive access to primary functions.
12+
13+
### 2. Order Management
14+
15+
- **Order listing**: Display a list of orders for the current user, showing order ID, date, status, and total amount.
16+
- **Order details**: Drill down into individual orders to view line items, quantities, prices, delivery information, and current status (Processing, Shipped, Delivered, or Returned).
17+
- **Status tracking**: Orders have multiple states that reflect their lifecycle (Processing → Shipped → Delivered or Returned). Each state change is tracked with timestamps where applicable (e.g., DeliveryDate).
18+
- **Data persistence**: Orders are stored in a SQLite database (local file) with Entity Framework Core. The database is seeded with sample orders on first run, simulating real-world e-commerce data.
19+
20+
### 3. Return & Refund Capability
21+
22+
- **Eligibility check**: Users can initiate returns only for delivered orders. The UI displays a "Return" button for eligible orders and enforces business rules (e.g., orders must be Delivered to be returnable).
23+
- **Automated return process**: When a return is requested:
24+
- Order status is updated to "Returned"
25+
- A ReturnDate timestamp is recorded
26+
- A refund confirmation is logged
27+
- An automated email is sent to the customer confirming the refund details
28+
- **Email notifications**: Uses a placeholder IEmailService that can be swapped with a real implementation (like SendGrid or SMTP) for production.
29+
- **Error handling**: Provides user-friendly error messages if a return request fails (e.g., order not found or ineligible status).
30+
31+
### 4. Customer Support Interface
32+
33+
- **Contact Support page**: A dedicated page where users can submit queries or requests for assistance.
34+
- **Placeholder agent interaction**: In the base app, this is a static form that acknowledges submissions with a placeholder message. The lab exercise enhances this page by integrating the GitHub Copilot SDK to create a live AI-powered agent.
35+
- **Query submission**: Users can type questions (e.g., "Where is my order?") and receive responses. The base version is a simple stub that will be replaced with intelligent responses in the lab.
36+
37+
### 5. Error Handling & Validation
38+
39+
- **Client-side validation**: Blazor components validate user input (e.g., ensuring required fields are filled before submission).
40+
- **Server-side validation**: API endpoints check data integrity (e.g., verifying order IDs exist before processing returns).
41+
- **Exception handling**: Try-catch blocks in service methods catch and log errors without exposing sensitive details to end users. Error messages are user-friendly (e.g., "Sorry, we couldn't find that order. Please check the order number.").
42+
- **Fallback UI**: If an API call fails, the UI displays an error alert with guidance on what to do next (e.g., "Please try again later or contact support.").
43+
44+
### 6. Cloud-Ready Features & Roadmap
45+
46+
While the base application runs entirely locally (for ease of learning and development), it is designed with cloud deployment in mind. Key cloud-ready aspects include:
47+
48+
- **Scalable architecture**: The frontend and backend can be deployed separately (e.g., Blazor WASM on a CDN, API on Azure App Service).
49+
- **Database migration path**: The SQLite database can be replaced with Azure SQL Database with minimal code changes (just updating the connection string and EF Core provider).
50+
- **Configuration management**: Uses appsettings.json and environment variables for secrets and settings, making it easy to integrate with Azure Key Vault or Azure App Configuration.
51+
- **Logging & telemetry**: Supports standard .NET logging interfaces that can pipe to Application Insights or other cloud monitoring tools.
52+
- **Email service abstraction**: The IEmailService interface can be backed by SendGrid, Azure Communication Services, or other cloud email providers without changing business logic.
53+
54+
These features collectively provide a realistic e-commerce support portal experience. The application is complete enough to demonstrate order tracking and returns in action, yet simple enough to serve as a learning platform for integrating advanced features like AI agents.

0 commit comments

Comments
 (0)