A customer self-service support portal for e-commerce built with Blazor WebAssembly and ASP.NET Core Web API.
- View Order History - Browse all past orders with status tracking and color-coded badges
- View Order Details - See detailed information including items, timeline, pricing, and delivery status
- Initiate Returns - Process returns for delivered orders with automatic refund processing
- Contact Support - Access support resources, contact information, and AI chat (coming soon)
- .NET 8 SDK or later
- Windows, macOS, or Linux operating system
- A modern web browser (Chrome, Firefox, Edge, or Safari)
git clone <repository-url>
cd ContosoShopSupportPortaldotnet restoredotnet buildThe build should complete successfully. If you encounter errors, ensure .NET 8 SDK is properly installed.
dotnet run --project ContosoShop.ServerThe application will start and be available at:
- Application URL:
http://localhost:5266
The server hosts both the API and the Blazor WebAssembly client.
Open your browser and navigate to http://localhost:5266
The database will be automatically created and seeded with sample data on first run.
The application is seeded with:
- Demo User: John Doe (john.doe@example.com)
- Sample Orders: 4 orders with various statuses (Processing, Shipped, Delivered, Returned)
- Home Page - View welcome message and quick action cards
- View Orders - Click "Orders" in the navigation to see all orders
- View Order Details - Click "View Details" on any order to see full information
- Process Return - On a delivered order, click "Return Order" to initiate a return
- Contact Support - Click "Contact Support" for help resources
ContosoShopSupportPortal/
├── ContosoShop.Client/ # Blazor WebAssembly frontend
│ ├── Pages/ # Razor pages (Home, Orders, OrderDetails, Support)
│ ├── Shared/ # Shared components (OrderStatusBadge)
│ ├── Layout/ # Layout components (MainLayout, NavMenu)
│ ├── Services/ # Client-side services (OrderService)
│ └── wwwroot/ # Static assets (CSS, icons)
├── ContosoShop.Server/ # ASP.NET Core Web API backend
│ ├── Controllers/ # API controllers (OrdersController)
│ ├── Services/ # Business logic services (EmailService, OrderService)
│ ├── Data/ # Database context and initialization
│ └── appsettings.json # Configuration
└── ContosoShop.Shared/ # Shared models and contracts
└── Models/ # Entity models (User, Order, OrderItem, OrderStatus)
## Database
The application uses SQLite for local development with automatic seeding of sample data on first run.
**Demo User**: John Doe (john.doe@example.com)
**Sample Orders**: 4 orders with various statuses (Processing, Shipped, Delivered, Returned)
## Development
### Running Tests
```bash
dotnet test
# Create migration
dotnet ef migrations add <MigrationName> --project ContosoShop.Server
# Apply migrations
dotnet ef database update --project ContosoShop.ServerConfiguration is managed through appsettings.json files:
ContosoShop.Server/appsettings.json- Base configurationContosoShop.Server/appsettings.Development.json- Development overrides
- ConnectionString: SQLite database path (default:
Data Source=App_Data/ContosoShop.db) - Logging: Log levels for different components
- CORS: Allowed origins for Blazor client
- Frontend: Blazor WebAssembly with Bootstrap 5 for responsive UI
- Backend: ASP.NET Core Web API with REST endpoints
- Data Access: Entity Framework Core with SQLite (development) or Azure SQL (production)
- Dependency Injection: Built-in ASP.NET Core DI for testability
- API Contracts: RESTful design with standard HTTP status codes
The application is designed for cloud deployment to Azure:
- API: Azure App Service
- Client: Azure Static Web Apps or CDN
- Database: Azure SQL Database
- Configuration: Azure App Configuration
To switch to Azure SQL, update the connection string in Azure App Service configuration and change UseSqlite() to UseSqlServer() in Program.cs.
- Order list loads in under 2 seconds
- Order details load in under 1 second
- Return operation completes in under 30 seconds
- Responsive UI from 320px (mobile) to 1920px (desktop)
- All API responses under 500ms
- Create a feature branch from
main - Make your changes following the
.editorconfigconventions - Ensure all tests pass
- Submit a pull request
This is a sample/training application for demonstration purposes.
For questions or issues, see the Contact Support page in the application.