⚡ ~/naveed Interview Prep
⚡ Portfolio Home 👤 About Naveed Bio & Credentials 📫 Contact Naveed Get In Touch ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
← Back to All Platform Engineering & IDP Interview Questions Scenario 23 of 50 in Platform Engineering & IDP
Staff Platform Engineer Platform Engineering Developer Portals & Self-Service Unified DevEx
🎯 Target Role / Context: Principal Platform Engineer Interview · Developer Architecture

Q: Senior engineers prefer working in their terminal using a CLI, while product managers and QA engineers prefer web portals like Backstage or Port. How do you design an internal platform API that serves both interfaces without duplicating business logic and governance rules?

Architectural design of a unified, headless platform API powering both terminal CLIs and web developer portals with consistent RBAC and validation.

#Platform Engineering #DevEx #CLI #Backstage #API #Developer Experience #Comparisons
🎙️ Candidate Opening & Architectural Context
"Never build business logic directly inside Backstage frontend plugins or standalone CLI binaries. Architect a headless 'Platform API' (in Go or TypeScript) exposing REST/gRPC endpoints. Both the Backstage plugin and the developer CLI (acmectl) consume the exact same authenticated API."
Advertisement
⚡ Recommended Practice Lab

Want to master this scenario in a live sandbox? KodeKloud's CKA & CKAD Hands-On Certification Track covers this exact problem with hands-on terminal drills.

🛠️ Production Runbook & Step-by-Step Resolution

Direct Answer: Never build business logic directly inside Backstage frontend plugins or standalone CLI binaries. Architect a headless 'Platform API' (in Go or TypeScript) exposing REST/gRPC endpoints. Both the Backstage plugin and the developer CLI (acmectl) consume the exact same authenticated API.

1

Design OpenAPI/gRPC Platform Service Contract

Define declarative API specs for platform capabilities: POST /v1/environments, POST /v1/services, GET /v1/templates. All parameter validations, quota checks, and authorization rules reside on this central service.

# openapi.yaml snippet
paths:
  /v1/environments:
    post:
      summary: Provision ephemeral environment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentRequest'
2

Build Lightweight Developer CLI (`acmectl`) Consuming the Platform API

Write acmectl in Go using Cobra. It handles local developer identity via SSO (acmectl login) and issues authorized requests to the central Platform API.

# Developer runs in terminal:
acmectl env create --name pr-42 --ttl 4h
acmectl catalog view checkout-api
Advertisement
3

Backstage UI Plugs Into the Same Platform Backend

The Backstage frontend custom plugin acts simply as a web client to the Platform API, ensuring that whether a resource is vended via UI or CLI, the exact same policies and audit logs trigger.

Pro Tip: Design Maxim: Portals and CLIs are view layers. Your platform is the API behind them.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Build a unified developer platform by creating a headless, policy-enforced Platform API that powers both terminal CLIs and web developer portals simultaneously."
⚡ 60-Second Elevator Pitch Talking Points
  • Design platform operations as a centralized REST/gRPC API before building user interfaces.
  • Build a lightweight Go CLI (acmectl) for terminal-centric developers that queries the platform API.
  • Use Backstage as a visual client consuming the exact same backend endpoints and authorization rules.
⛔ Critical Candidate Mistakes to Avoid in This Scenario

Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:

  1. Engineering bespoke in-house developer tools instead of adopting standardized platform Golden Paths when configuring Developer Portal Designing Bespoke internal tools create long-term maintenance debt and fragmented workflows, whereas standardized Golden Paths accelerate delivery.
  2. Overlooking infrastructure cost visibility and FinOps allocation tagging across multi-tenant environments when configuring Developer Portal Designing Without granular resource tagging, engineering organizations cannot attribute cloud infrastructure costs to specific teams or business units.
  3. Failing to define explicit Service Level Objectives (SLOs) and Error Budgets to balance feature velocity with reliability when configuring Developer Portal Designing Without agreed SLOs, engineering and product teams lack an objective data-driven framework to prioritize technical debt over new features.
  4. Neglecting automated continuous drift detection between declarative configuration and deployed cloud state when configuring Developer Portal Designing Unmanaged drift accumulates over time, causing future automated deployments to fail or overwrite emergency manual adjustments.
Advertisement
Want more Platform Engineering & IDP scenarios?
Explore our complete collection of scenario-based Platform Engineering & IDP interview runbooks.
Browse All Platform Engineering & IDP Questions →