con un clic
data-api-builder-demo
Operational guide for building and maintaining DAB quickstart demos. Use when creating a new quickstart, renaming folders, validating structure, or preparing a demo for presentation.
Menú
Operational guide for building and maintaining DAB quickstart demos. Use when creating a new quickstart, renaming folders, validating structure, or preparing a demo for presentation.
Guide for .NET Aspire orchestration of SQL Server + Data API Builder + SQL Commander + MCP Inspector. Use when asked to create an Aspire-based DAB environment.
Add MCP Inspector to a .NET Aspire AppHost for debugging MCP servers like Data API Builder. Use when asked to inspect MCP traffic, debug MCP connections, or add MCP Inspector to Aspire.
Deploy Data API Builder to Azure Container Apps with Azure SQL, ACR, and azd. Use when asked to deploy DAB to Azure, create Bicep for DAB, or set up cloud API hosting.
Deploy MCP Inspector to Azure Container Apps with nginx reverse proxy for same-origin routing. Use when asked to deploy Inspector to Azure, containerize Inspector, or preconfigure Inspector UI for cloud.
Guide for creating and auditing GitHub Copilot Agent Skills. Use this when asked to create new skills, understand skill structure, or improve existing skills.
Data API Builder CLI commands for init, add, update, export, and start. Use when asked to create a dab-config, add entities, configure REST/GraphQL endpoints, or run DAB locally via CLI.
| name | data-api-builder-demo |
| description | Operational guide for building and maintaining DAB quickstart demos. Use when creating a new quickstart, renaming folders, validating structure, or preparing a demo for presentation. |
This skill captures lessons learned from building the DAB quickstart series. Follow these rules when creating, modifying, or validating any quickstart project.
Every quickstart follows this canonical layout:
quickstart<N>/
├── quickstart<N>.sln # Solution file
├── azure.yaml # azd entry point
├── database.sql # Legacy flat schema (keep for reference)
├── README.md # Quickstart documentation
├── .gitignore # Must exclude .env, **\bin, **\obj
├── .config/
│ └── dotnet-tools.json # Tool manifest (dab, sqlpackage)
├── .vscode/
│ └── mcp.json # MCP server config for Copilot
├── aspire-apphost/ # .NET Aspire orchestration
│ ├── Aspire.AppHost.csproj
│ └── Program.cs
├── data-api/ # DAB configuration + Dockerfile
│ ├── dab-config.json
│ └── Dockerfile
├── database/ # SQL Database Project
│ ├── database.sqlproj
│ ├── database.publish.xml
│ ├── Tables/*.sql
│ └── Scripts/PostDeployment.sql
├── mcp-inspector/ # MCP Inspector containerization (for Azure)
│ ├── Dockerfile
│ ├── entrypoint.sh
│ └── nginx.conf
├── web-app/ # Frontend (nginx-served static files)
│ ├── index.html
│ ├── app.js
│ ├── config.js
│ ├── dab.js
│ ├── styles.css
│ └── Dockerfile
└── azure-infra/ # Azure deployment (Bicep + scripts)
├── main.bicep
├── resources.bicep
└── post-provision.ps1
| Folder | Name | Rationale |
|---|---|---|
| Aspire orchestration | aspire-apphost | Lowercase, hyphenated — matches skill naming |
| DAB config | data-api | Describes what it is, not the tool |
| Database project | database | Standard SQL project location |
| MCP Inspector | mcp-inspector | Full name, not abbreviated |
| Web frontend | web-app | Distinguishes from web API |
| Azure infrastructure | azure-infra | Clarifies it's infrastructure, not app code |
Rules:
aspire-apphost, not Aspire.AppHost).csproj file name inside can differ from the folder nameWhen renaming any folder, always update all references. Files that commonly contain folder paths:
| File | What to check |
|---|---|
*.sln | Project path in Project(...) line |
azure.yaml | infra.path and hooks.*.run paths |
aspire-apphost/Program.cs | Path.Combine(root, ...) references |
azure-infra/post-provision.ps1 | Copy-Item, file path strings |
aspire-apphost/*.csproj | <ProjectReference> paths |
README.md | Folder references (usually none — keep READMEs path-free) |
After every rename:
\bold-name[/\\] and "old-name"Remove-Item -Recurse obj, bin; dotnet buildTip:
obj/andbin/contain cached paths. Always delete them after renames and rebuild.
Each quickstart README follows this structure:
# Quickstart N: <Auth Topic>dotnet tool restore, aspire run)azd auth login, azd up)README rules:
nvarchar not nvarchar(200)dab-config.json and BicepThe quickstarts form a progressive series. Each one adds complexity:
| QS | Auth Pattern | Delta from Previous |
|---|---|---|
| 1 | SQL Auth everywhere | Baseline |
| 2 | Managed Identity (API→SQL) | Replaces SQL Auth on the DB hop |
| 3 | Entra ID infrastructure | Adds app registrations, no user login yet |
| 4 | User login + DAB policy | Adds frontend auth, per-user filtering |
| 5 | Row-Level Security | Moves filtering into SQL |
Cross-quickstart rules:
database/ SQL Database Project is the single source of truth for schemaRun through this before any presentation or PR:
cd quickstart<N>
dotnet tool restore
dotnet build aspire-apphost/Aspire.AppHost.csproj
Must complete with 0 errors, 0 warnings.
# Verify all expected folders exist
$expected = @('aspire-apphost', 'data-api', 'database', 'mcp-inspector', 'web-app', 'azure-infra')
$expected | ForEach-Object { if (!(Test-Path $_)) { Write-Warning "Missing: $_" } }
# Verify critical files exist
$files = @(
'azure.yaml',
'quickstart<N>.sln',
'README.md',
'.gitignore',
'data-api/dab-config.json',
'data-api/Dockerfile',
'database/database.sqlproj',
'aspire-apphost/Aspire.AppHost.csproj',
'aspire-apphost/Program.cs',
'azure-infra/main.bicep',
'azure-infra/resources.bicep',
'azure-infra/post-provision.ps1'
)
$files | ForEach-Object { if (!(Test-Path $_)) { Write-Warning "Missing: $_" } }
# Check for stale folder references
$staleNames = @('Aspire.AppHost', '/api/', '/web/', '/azure/', '/inspector/')
$staleNames | ForEach-Object {
$hits = Get-ChildItem -Recurse -Include *.cs,*.yaml,*.sln,*.ps1,*.csproj | Select-String -Pattern $_ -SimpleMatch
if ($hits) { Write-Warning "Stale reference to '$_' found:"; $hits | ForEach-Object { Write-Warning " $_" } }
}
Before committing, verify .gitignore is correct and no build artifacts will leak into the repo.
Required ignore patterns:
.env
.azure-env
.azure/
dab-config.*.json
**/bin
**/obj
node_modules/
web-deploy-temp/
api-deploy-temp/
web-deploy.zip
CRITICAL: Use
**/binand**/obj(notbin/andobj/) — the root-only pattern misses nested project folders likeaspire-apphost/bin/.
Count untracked files before committing:
# Show how many files git will add
$untracked = git ls-files --others --exclude-standard
Write-Host "Untracked files: $($untracked.Count)"
$untracked
Review the list — every file should be legitimate source. If you see bin/, obj/, .env, or deploy temp folders, fix .gitignore before committing. A typical quickstart has ~20-25 source files; significantly more suggests a missing ignore pattern.
obj/ and bin/ cache absolute paths from before the renameobj/ and bin/, rebuildazd up can't find Bicepazure.yaml still points to old infra.pathpath and run fields in azure.yaml.sln has old folder path in Project(...) lineCopy-Item or file paths reference old folder namespost-provision.ps1 for all folder referencesPath.Combine(root, "api", ...) still uses old pathPath.Combine calls in Program.csconfig.js wasn't regenerated after Azure deployment changesconfig.js| Skill | Use For |
|---|---|
aspire-data-api-builder | Local Aspire orchestration |
docker-data-api-builder | Local Docker Compose orchestration |
azure-data-api-builder | Azure deployment (Bicep, azd, ACR) |
data-api-builder-config | DAB config file reference |
data-api-builder-cli | DAB CLI commands |
data-api-builder-mcp | MCP endpoint setup |
aspire-mcp-inspector | Local MCP Inspector in Aspire |
azure-mcp-inspector | Azure MCP Inspector deployment |
aspire-sql-commander | Local SQL Commander in Aspire |
azure-sql-commander | Azure SQL Commander deployment |
aspire-sql-projects | SQL Database Projects in Aspire |
creating-agent-skills | How to create new skills |