eShopLite
AGENTS.md169 starsChanged 6 months agoMITView on GitHub
eShopLite is a modular Aspire-based reference eCommerce platform demonstrating advanced AI, search, and orchestration patterns. This is a scenario-driven monorepo where each scenario in scenarios/ is a self-contained solution showcasing different capabilities like Semantic Search, Model Context Protocol (MCP), Reasoning models, vector databases, real-time audio, and more. Key Technologies: - .NET 10 with Aspire 13.0.1 for orchestration - Blazor for UI - Azure OpenAI (GPT-4o, GPT-4o-mini, embeddings) - Microsoft.Extensions.AI (MEAI) IChatClient / IEmbeddingGenerator abstractions - Vector databases (In-memory via CommunityToolkit.VectorData,…
- Pipes a download into a shell
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- copilot-instructions.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
31 rules. About 2 are common, 19 are distinctive, and 10 are very specific to this project.
≈2
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 88
All service endpoints are auto-wired and displayed in the dashboard
- Common: line 125
No manual secret management needed
- Very specific: line 150
Test projects follow the pattern <ProjectName>.Tests:
- Distinctive: line 171
Follow existing test patterns when adding new tests
- Very specific: line 172
Ensure tests pass before committing: dotnet test
- Distinctive: line 194
Follow C# and .NET 10 best practices
- Distinctive: line 195
Use modern C# features (top-level statements, nullable reference types, file-scoped namespaces)
- Distinctive: line 196
Follow async/await patterns consistently
- Distinctive: line 197
Use dependency injection for service registration
- Distinctive: line 198
Document public APIs and complex logic with XML comments
- Distinctive: line 199
Keep code accessible for beginners - add explanatory comments where helpful
- Very specific: line 352
Use the aspire secret CLI (or scripts/Set-AzureOpenAISecrets.ps1) for local development
- Distinctive: line 353
Use Azure Managed Identity for production (automatically configured by azd)
- Common: line 358
All scenarios use secure credential management
- Distinctive: line 361
Follow Azure OpenAI security guidelines
- Distinctive: line 362
Use HTTPS endpoints for all Azure services
- Distinctive: line 366
Use Virtual Networks for production deployments
- Very specific: line 399
All tests must pass: dotnet test
- Distinctive: line 401
Update relevant documentation (README files, XML comments)
- Distinctive: line 402
Add tests for new features
- Distinctive: line 403
Follow existing patterns and conventions
- Distinctive: line 404
Keep changes focused and minimal
- Distinctive: line 411
All CI checks must pass
- Very specific: line 446
Solution: Start Docker Desktop or Podman service before running dotnet run
- Very specific: line 452
Solution: Ensure azd auth login is authenticated and subscription has correct permissions
- Very specific: line 455
Solution: Run dotnet restore and dotnet build before dotnet test
- Very specific: line 473
Use find or grep to locate files across scenarios:
- Very specific: line 479
Check copilot-instructions.md for additional coding guidelines
- Very specific: line 491
Start with 01-SemanticSearch scenario to understand the base architecture
- Distinctive: line 494
Use Application Insights for production monitoring
- Distinctive: line 495
Test locally before deploying to Azure to save costs
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Project Overview
eShopLite is a modular Aspire-based reference eCommerce platform demonstrating advanced AI, search, and orchestration patterns. This is a scenario-driven monorepo where each scenario in scenarios/ is a self-contained solution showcasing different capabilities like Semantic Search, Model Context Protocol (MCP), Reasoning models, vector databases, real-time audio, and more.
Key Technologies:
- .NET 10 with Aspire 13.0.1 for orchestration
- Blazor for UI
- Azure OpenAI (GPT-4o, GPT-4o-mini, embeddings)
- Microsoft.Extensions.AI (MEAI)
IChatClient/IEmbeddingGeneratorabstractions - Vector databases (In-memory via CommunityToolkit.VectorData, Azure AI Search, Chroma DB, SQL Server 2025)
- Model Context Protocol (MCP) for agent interactions
- Microsoft Agent Framework (MAF) for concurrent agent orchestration
- Azure services (Container Apps, AI Search, Application Insights, Functions)
- Docker/Podman for containerized services
Architecture: Each scenario is a complete, runnable Aspire solution with an eShopAppHost orchestrating multiple services (APIs, databases, UI). Services are reused across scenarios, making this a true monorepo with shared components.
Setup Commands
Prerequisites Installation
Install the following prerequisites:
# Install .NET 10 SDK
# Download from: https://dotnet.microsoft.com/download/dotnet/10.0
# Install Azure Developer CLI
# macOS/Linux:
curl -fsSL https://aka.ms/install-azd.sh | bash
# Windows (PowerShell):
# powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' | Invoke-Expression"
# Install Docker Desktop or Podman
# Docker: https://www.docker.com/products/docker-desktop/
# Podman: https://podman.io/
# Install Aspire CLI
dotnet tool install --global Aspire.Cli
# Verify installations
dotnet --version # Should be 10.0 or higher
azd version
docker --version # or podman --versionClone and Navigate
# Clone the repository
git clone https://github.com/Azure-Samples/eShopLite.git
cd eShopLite
# Navigate to a specific scenario (e.g., Semantic Search)
cd scenarios/01-SemanticSearchDevelopment Workflow
Running a Scenario Locally
Each scenario is designed to run independently. The general pattern:
# Navigate to the scenario's AppHost
cd scenarios/<scenario-name>/src/eShopAppHost
# Run the solution
dotnet run
# The Aspire Dashboard will open in your browser
# Access URLs for services (Store, Products API, etc.) will be displayed in the consoleExample for Semantic Search:
cd scenarios/01-SemanticSearch/src/eShopAppHost
dotnet runWhat happens:
- Aspire orchestrates all services (Store UI, Products API, databases)
- Aspire Dashboard opens at
http://localhost:15888(or similar) - Store UI is available at a dynamically assigned port (check console output)
- All service endpoints are auto-wired and displayed in the dashboard
Hot Reload and Watch Mode
.NET 10 includes hot reload by default. Code changes in Blazor and API projects will auto-refresh without full restart.
Configuration and Secrets
Local development requires Azure OpenAI credentials:
Set AppHost parameter secrets with the Aspire CLI (parameter-based approach):
Easiest: run
scripts/Set-AzureOpenAISecrets.ps1from the repo root to set the four common values for every scenario at once (-DryRunpreviews). Or set them per scenario with theaspire secretcommand:
# Set Azure OpenAI parameters (required for most scenarios) — point --apphost at the scenario's AppHost
aspire secret set Parameters:AzureOpenAIEndpoint "https://<your-endpoint>.openai.azure.com/" --apphost scenarios/<scenario-name>/src/eShopAppHost/eShopAppHost.csproj
aspire secret set Parameters:AzureOpenAIApiKey "<your-key>" --apphost scenarios/<scenario-name>/src/eShopAppHost/eShopAppHost.csproj
aspire secret set Parameters:AzureOpenAIDeploymentName "gpt-4.1-mini" --apphost scenarios/<scenario-name>/src/eShopAppHost/eShopAppHost.csproj
aspire secret set Parameters:AzureOpenAIEmbeddingsDeploymentName "text-embedding-3-small" --apphost scenarios/<scenario-name>/src/eShopAppHost/eShopAppHost.csproj
# Scenario-specific extras:
# 03-RealtimeAudio: also set Parameters:AzureOpenAIRealtimeDeploymentName
# 05-deepseek: also set Parameters:DeepSeekEndpoint, Parameters:DeepSeekApiKey, Parameters:DeepSeekDeploymentName
# 11-GitHubModels (local): set Parameters:GitHubModelsToken instead of the AOAI params- Or configure via Aspire Dashboard at first run:
- On first run, Aspire Dashboard will prompt for missing parameters
- Enter values in the dashboard UI
- Values are stored as user secrets automatically
For Azure deployment via azd:
- Configuration is handled automatically
- Resources are provisioned with Managed Identity
- No manual secret management needed
Testing Instructions
Run All Tests
From the repository root or scenario root:
# Run all tests in the repository
dotnet test
# Run tests for a specific scenario
cd scenarios/01-SemanticSearch/src
dotnet test
# Run tests with verbose output
dotnet test --verbosity normal
# Run tests with coverage (if configured)
dotnet test --collect:"XPlat Code Coverage"Test Projects
Test projects follow the pattern <ProjectName>.Tests:
Products.Tests- Tests for Products APIStore.Tests- Tests for Store UI
Example - Run specific test project:
cd scenarios/01-SemanticSearch/src/Products.Tests
dotnet testExample - Run specific test by name:
dotnet test --filter "FullyQualifiedName~SemanticSearchTests"Testing Patterns
- Unit tests use xUnit framework
- Tests are located alongside the projects they test
- Follow existing test patterns when adding new tests
- Ensure tests pass before committing:
dotnet test
Code Style
Formatting and Linting
Before each commit:
# Format all C# code (required)
dotnet format
# Verify formatting without making changes
dotnet format --verify-no-changes
# Format specific solution
cd scenarios/01-SemanticSearch/src
dotnet format eShopLite-Aspire.slnxCoding Conventions
- Follow C# and .NET 10 best practices
- Use modern C# features (top-level statements, nullable reference types, file-scoped namespaces)
- Follow async/await patterns consistently
- Use dependency injection for service registration
- Document public APIs and complex logic with XML comments
- Keep code accessible for beginners - add explanatory comments where helpful
File Organization
- Each scenario has its own
src/directory with all projects - Shared entities:
DataEntities,VectorEntities,SearchEntities,CartEntities - Service projects:
Products(API),Store(Blazor UI) - Orchestration:
eShopAppHost(Aspire host) - Configuration:
eShopServiceDefaults(shared Aspire settings)
Naming Conventions
- Projects: PascalCase (e.g.,
Products,VectorEntities) - Aspire resource names: lowercase (e.g.,
products,store,sql) - Configuration sections: Follow .NET conventions (e.g.,
ConnectionStrings)
Build and Deployment
Build Commands
# Build entire repository
dotnet build
# Build specific scenario
cd scenarios/01-SemanticSearch/src
dotnet build
# Build specific project
cd scenarios/01-SemanticSearch/src/Products
dotnet build
# Build in Release mode
dotnet build --configuration ReleaseLocal Development Build
# Clean and rebuild
dotnet clean
dotnet build
# Restore dependencies
dotnet restoreDeploy to Azure
Using Azure Developer CLI (azd):
# Navigate to the eShopAppHost directory (where azure.yaml is located)
cd scenarios/01-SemanticSearch/src/eShopAppHost
# Login to Azure (first time only)
azd auth login
# Provision and deploy all resources
azd up
# You'll be prompted for:
# - Environment name (e.g., "eshoplite")
# - Azure subscription
# - Azure region (e.g., "eastus2")
# After successful deployment, URLs will be displayed in console outputWhat azd up does:
- Creates Azure resource group
- Provisions Azure OpenAI, Container Apps, AI Search, Application Insights, etc.
- Builds and containerizes services
- Deploys to Azure Container Apps
- Configures Managed Identity for secure access
Other useful azd commands:
# Deploy code changes without reprovisioning
azd deploy
# Tear down all Azure resources
azd down
# View environment configuration
azd env get-values
# Monitor deployed app
azd monitorEnvironment Configurations
- Local: Uses Docker containers, user secrets, local Aspire Dashboard
- Azure: Uses Azure Container Apps, Managed Identity, Azure Application Insights
Monorepo Navigation
Scenario Structure
scenarios/
├── 01-SemanticSearch/ # Keyword + semantic search with in-memory vector DB
├── 02-AzureAISearch/ # Azure AI Search integration
├── 03-RealtimeAudio/ # GPT-4o Realtime Audio API
├── 04-chromadb/ # Chroma DB vector database
├── 05-deepseek/ # DeepSeek-R1 reasoning model
├── 06-mcp/ # Model Context Protocol servers/clients
├── 07-AgentsConcurrent/ # Multi-agent orchestration
├── 08-Sql2025/ # SQL Server 2025 vector search
├── 09-AzureAppService/ # Azure App Service deployment
├── 10-A2ANet/ # Agent-to-Agent (A2A) protocol
├── 11-GitHubModels/ # GitHub Models integration
├── 12-AzureFunctions/ # Azure Functions façade
└── 14-MAFDevUI/ # MAF Development UIWorking with Multiple Scenarios
Each scenario is independent and self-contained:
- Has its own
src/directory with all projects - Has its own
azure.yamlfor deployment - Has its own README.md with specific instructions
- Shares common project patterns (Products, Store, Entities)
To switch scenarios:
# Stop current scenario (Ctrl+C)
# Navigate to new scenario
cd ../02-AzureAISearch/src/eShopAppHost
dotnet runTo work on multiple scenarios simultaneously:
- Each scenario runs on different ports (managed by Aspire)
- Can run multiple scenarios in separate terminal windows
- Each has its own Aspire Dashboard instance
Scenario-Specific Commands
Each scenario's README contains specific setup instructions. Always check:
cd scenarios/<scenario-name>
cat README.mdSecurity Considerations
Authentication and Secrets
- Never commit secrets or API keys to source control
- Use the
aspire secretCLI (orscripts/Set-AzureOpenAISecrets.ps1) for local development - Use Azure Managed Identity for production (automatically configured by azd)
- Azure OpenAI keys are stored in user secrets or Key Vault
Security Best Practices
- All scenarios use secure credential management
- GitHub Actions include security scanning (see
.github/workflows/codeql.yml) - Enable GitHub secret scanning in your fork
- Follow Azure OpenAI security guidelines
- Use HTTPS endpoints for all Azure services
Recommended Additional Security
- Use Virtual Networks for production deployments
- Enable Azure Container Apps firewall
- Implement rate limiting for APIs
- Review Azure security baselines
Pull Request Guidelines
Before Submitting PR
# Format code
dotnet format
# Run all tests
dotnet test
# Ensure clean build
dotnet build --configuration ReleasePR Title Format
[Component/Scenario] Brief description
Examples:
[01-SemanticSearch] Add product filtering feature
[Products API] Fix vector search performance
[Documentation] Update setup instructionsPR Requirements
- All tests must pass:
dotnet test - Code must be formatted:
dotnet format --verify-no-changes - Update relevant documentation (README files, XML comments)
- Add tests for new features
- Follow existing patterns and conventions
- Keep changes focused and minimal
Review Process
- CLA must be signed (automated via bot)
- Security scans must pass (CodeQL, secret scanning)
- At least one reviewer approval required
- All CI checks must pass
Additional Notes
Common Commands Quick Reference
# Format code
dotnet format
# Build solution
dotnet build
# Run tests
dotnet test
# Run scenario
cd scenarios/<name>/src/eShopAppHost && dotnet run
# Deploy to Azure
cd scenarios/<name>/src/eShopAppHost && azd up
# Set secrets (Aspire parameter-based approach) — or run scripts/Set-AzureOpenAISecrets.ps1
aspire secret set Parameters:AzureOpenAIEndpoint "<your-endpoint>" --apphost scenarios/<name>/src/eShopAppHost/eShopAppHost.csproj
aspire secret set Parameters:AzureOpenAIApiKey "<your-key>" --apphost scenarios/<name>/src/eShopAppHost/eShopAppHost.csproj
aspire secret set Parameters:AzureOpenAIDeploymentName "gpt-4.1-mini" --apphost scenarios/<name>/src/eShopAppHost/eShopAppHost.csproj
aspire secret set Parameters:AzureOpenAIEmbeddingsDeploymentName "text-embedding-3-small" --apphost scenarios/<name>/src/eShopAppHost/eShopAppHost.csprojTroubleshooting
Issue: Azure OpenAI parameters are missing
- Solution: Set user secrets as described in Configuration section
Issue: Docker/Podman not running
- Solution: Start Docker Desktop or Podman service before running
dotnet run
Issue: Port conflicts
- Solution: Aspire automatically assigns ports. Check Aspire Dashboard for actual URLs
Issue: Azure deployment fails
- Solution: Ensure
azd auth loginis authenticated and subscription has correct permissions
Issue: Tests failing after changes
- Solution: Run
dotnet restoreanddotnet buildbeforedotnet test
Performance Considerations
- Vector searches are compute-intensive; consider caching strategies
- Azure OpenAI has rate limits; implement retry logic for production
- Aspire Dashboard adds overhead; disable telemetry for production builds if needed
- SQL Server 2025 vector indexes improve performance for large datasets
Useful Resources
- Aspire Documentation
- Azure OpenAI Service Documentation
- Azure Developer CLI (azd) Documentation
- Generative AI for Beginners .NET
Quick Navigation Tips
- Use
findorgrepto locate files across scenarios:find . -name "*.csproj" | grep Products grep -r "SemanticSearch" --include="*.cs" - Each scenario has a
docs/folder with detailed technical documentation - Check
copilot-instructions.mdfor additional coding guidelines - Review scenario READMEs for specific configuration requirements
CI/CD Integration
- GitHub Actions workflows are in
.github/workflows/ - CodeQL security scanning runs automatically on PRs
- Profanity filter and documentation link validation run on commits
- Welcome bot greets new contributors
Development Tips
- Start with
01-SemanticSearchscenario to understand the base architecture - Each scenario builds on concepts from previous ones
- Aspire Dashboard provides real-time telemetry and logs
- Use Application Insights for production monitoring
- Test locally before deploying to Azure to save costs
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

