Files
The-transit-Project/.github/agents/azure-deploy/prepare/references/naming-patterns.md
T
Sven laptop 635a130f0b
Build and Push Docker Images / detect-changes (push) Successful in 11s
Build and Push Docker Images / build-auth-api (push) Successful in 1m0s
Build and Push Docker Images / build-employee-api (push) Successful in 1m2s
Build and Push Docker Images / build-transit-api (push) Successful in 1m1s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m5s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m13s
Build and Push Docker Images / build-monitoring-ui (push) Successful in 1m15s
Build and Push Docker Images / deploy-test-node (push) Successful in 3s
──────
### Summary of Changes
  1. Documentation Consolidation:
      • Relocated the docs/ folder and all repository .md files (README.md, DEPLOYMENT.md, DOCKER_README.md,
      DOMAINS_README.md, GETTING_STARTED.md, CI_CD_PORTAINER_GUIDE.md, ADMIN_DEPLOYMENT_SUMMARY.md,
      SECURITY_PRIVATE_FILES.md, handoff.md, azure-project-plan.md, plus service-specific READMEs) into .
      • Updated document links in README.md.
  2. AI Agent Project Map:
      • Created PROJECT_MAP.md in the project root containing complete architecture diagrams, service specs, ports, DB
      schemas, environment variables, and developer workflows.
      • Added PROJECT_MAP.md to .gitignore.
  3. Monitoring UI & Infrastructure Integration:
      • Added monitoring_ui service to docker-compose.yml (port 5175).
      • Configured Gitea workflow docker-build.yml for monitoring_ui builds.
      • Added CORS middleware headers in index.js.
      • Added nginx.conf copy step in Dockerfile.

  ──────
  ### Recommended Commit Message

    docs: consolidate project documentation into monitoring_ui and add agent project map

    - Move all markdown documentation files and docs/ folder into monitoring_ui/docs/
    - Update documentation hub index (monitoring_ui/docs/README.md) with relative paths
    - Generate comprehensive AI agent reference map (PROJECT_MAP.md) in repository root
    - Add PROJECT_MAP.md and monitoring_ui build output/env overrides to .gitignore
    - Integrate monitoring_ui service into docker-compose.yml and Gitea CI workflow
    - Configure CORS handling in employee_api for monitoring dashboard access
    ──────
  ### Alternative Short Commit Message

    refactor(docs): move docs to monitoring_ui and create AI agent PROJECT_MAP.md
2026-09-20 23:33:55 +02:00

5.0 KiB

Important: This skill provides guidance and recommended instructions to assist the AI system. Outputs are not guaranteed to be complete, correct, secure, or applicable to every scenario. Results should be reviewed and validated by a human before being applied. The AI model may choose not to follow all instructions exactly, and additional verification may be required.

Naming Patterns

Per-resource naming rules for AppOnboard-generated Azure resources. Apply in Step 7 (Generate naming).

Reference: Azure naming conventions — link, don't duplicate. Check docs for updates.

Default Pattern

{abbreviation}-{resourcePrefix}

Where resourcePrefix = {project}-{env}-{suffix} (generated once in prepare Step 7, stored in prepare-plan.json.naming.resourcePrefix).

  • {project} — app name from context.json.app.name (lowercase, alphanumeric + hyphens)
  • {env} — dev / staging / prod (from intent or default dev)
  • {suffix} — first 4 chars of session UUID (e.g., a1d5). Generated once, stored in naming.suffix
  • {abbreviation} — short service prefix from the table below (e.g., app, st, rg)

Examples with resourcePrefix = myapp-dev-a1d5:

  • Resource Group: rg-myapp-dev-a1d5
  • App Service: app-myapp-dev-a1d5
  • Storage: stmyappdeva1d5 (alphanumeric only)

⛔ No redundancy. The resource name is {abbr}-{resourcePrefix} — NOT {project}-{abbr}-{project}-{env}-{suffix}. The project name appears ONCE in the prefix.

⛔ Scaffold reads naming from the plan — does NOT generate or modify resource names.

Override via context.json.overrides[] with key: "naming.pattern".

Per-Resource Rules

Resource Abbreviation Max Length Allowed Chars Globally Unique? Example
Resource Group rg 90 Alphanumeric, hyphens, underscores, periods, parens No (but include suffix to avoid cross-session collisions) rg-myapp-dev-a1d5
App Service app 60 Alphanumeric, hyphens Yes app-myapp-dev-a1d5
Container App ca 32 Lowercase alphanumeric, hyphens No (within env) ca-myapp-dev-a1d5
Container Registry cr 50 Alphanumeric only Yes crmyappdeva1d5
Azure SQL Server sql 63 Lowercase alphanumeric, hyphens Yes sql-myapp-dev-a1d5
Cosmos DB cosmos 44 Lowercase alphanumeric, hyphens Yes cosmos-myapp-dev-a1d5
Storage Account st 24 Lowercase alphanumeric only Yes stmyappdeva1d5
Log Analytics log 63 Alphanumeric, hyphens No (within RG) log-myapp-dev-a1d5
App Insights appi 260 Most chars No (within RG) appi-myapp-dev-a1d5
Service Bus sb 50 Alphanumeric, hyphens Yes sb-myapp-dev-a1d5
Functions func 60 Alphanumeric, hyphens Yes func-myapp-dev-a1d5
Static Web Apps swa 40 Alphanumeric, hyphens No (suffix still required — Rule 1) swa-myapp-dev-a1d5
Redis Cache redis 63 Alphanumeric, hyphens Yes redis-myapp-dev-a1d5

CAF deviation: Azure Cloud Adoption Framework uses sbns for Service Bus namespace. AppOnboard uses sb for brevity — either is acceptable.

Rules

  1. ALL resources get the {suffix} — including resource groups. This prevents cross-session naming collisions when the same app is deployed multiple times. The suffix is a 4-char random string generated once per session.
  2. Container Registry + Storage Account: strip hyphens (alphanumeric only). ⛔ Mechanical transform — do NOT re-derive char-by-char: ('cr' + resourcePrefix).replace(/-/g,'').toLowerCase(), truncate to ≤50 (ACR) / ≤24 (Storage). Worked example: resourcePrefix = bezkoder-dev-18a3 → cr + bezkoderdev18a3 → crbezkoderdev18a3. Copy the pattern; do not spell out the concatenation.
  3. Validate length after substitution — Storage Account and Container App (24 / 32 chars, alphanumeric) are the tightest constraints. Budget for {project}: 24 - len(abbreviation) - len(env) - len(suffix) - 3 - 2 (separators + healing reserve). For st + dev (Storage strips hyphens): ~10 chars max. The 2-char reserve ensures room for a healing suffix (e.g., edd6 → edd602) on region fallback. Truncation when over budget:
    1. Truncate at the nearest hyphen boundary within budget (e.g., broken-web-app at 10 → broken-web)
    2. If no hyphen within budget: hard truncate, no trailing hyphen
    3. Verify truncated name doesn't collide with reserved words (Rule 4)
    4. Recompute ALL resource names with the truncated project — do NOT mix long and short names
  4. Never use reserved words as resource names (admin, login, root, test)
  5. Populate naming.resources[] in prepare-plan.json with concrete names after validation