Files
sentryagent-idp/openspec/changes/phase-4-developer-growth/specs/developer-portal/spec.md
SentryAgent.ai Developer b0f70b7ac4 feat(openspec): Phase 4 Developer Growth & Go-to-Market Readiness
OpenSpec change: phase-4-developer-growth (spec-driven, 4/4 artifacts)

6 workstreams, 90 implementation tasks, delivery sequence:
WS1 → WS2 + WS3 (parallel) → WS4 → WS5 → WS6

Workstreams:
1. Production Hardening — ioredis rate limiting, DB pool tuning, /health/detailed, k6 load tests
2. Developer Portal — Next.js 14, Swagger UI explorer, onboarding wizard, pricing/SDK pages
3. CLI Tool — sentryagent npm CLI, 5 commands, shell completion
4. Agent Marketplace — public searchable registry powered by existing agent/DID infrastructure
5. GitHub Actions — register-agent + issue-token Actions via OIDC (no stored secrets)
6. Billing & Usage Metering — Stripe Checkout, webhook-driven state, free tier enforcement

New capabilities (8 specs): production-hardening, developer-portal, cli-tool,
agent-marketplace, github-actions, billing-metering (+delta: web-dashboard, monitoring)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 04:00:34 +00:00

3.4 KiB

ADDED Requirements

Requirement: Public developer portal is a standalone Next.js 14 application

The system SHALL provide a public developer portal at portal/ — a standalone Next.js 14 application with Tailwind CSS. The portal SHALL be deployable independently of the API (to Vercel, Cloudflare Pages, or any static host). The portal SHALL communicate with the API exclusively via the public REST API at NEXT_PUBLIC_API_URL. No server-side API secrets SHALL be stored in the portal.

Scenario: Portal builds and exports successfully

  • WHEN npm run build is executed in portal/
  • THEN the build completes without errors and produces a deployable out/ or .next/ directory

Scenario: API URL is configurable via environment variable

  • WHEN NEXT_PUBLIC_API_URL=https://api.sentryagent.ai is set and the portal is built
  • THEN all API calls in the portal use that base URL

Requirement: Interactive API explorer is embedded in the portal

The portal SHALL embed a Swagger UI (swagger-ui-react) loaded from the existing OpenAPI spec at /openapi.json (served by the Express API). The explorer SHALL allow unauthenticated browsing of all endpoints and authenticated execution using a Bearer token entered by the user.

Scenario: API explorer loads the OpenAPI spec

  • WHEN a user visits /api-explorer
  • THEN Swagger UI loads and renders all endpoints from the OpenAPI spec without errors

Scenario: User executes authenticated request in explorer

  • WHEN a user enters a Bearer token in the Swagger UI Authorize dialog and executes GET /agents
  • THEN the request is sent with Authorization: Bearer <token> and the response is displayed

Requirement: Agent registration onboarding wizard guides new users

The portal SHALL provide a guided wizard at /get-started covering: (1) sign up / log in, (2) create first agent, (3) generate credentials, (4) copy code snippet for their preferred SDK (Node.js, Python, Go, Java). The wizard SHALL complete in ≤ 4 steps.

Scenario: Wizard completes agent registration

  • WHEN a new user completes all wizard steps
  • THEN an agent is registered via the API, credentials are generated, and a ready-to-run code snippet is displayed

Scenario: SDK code snippet matches selected language

  • WHEN a user selects "Python" as their preferred SDK in step 4
  • THEN the displayed code snippet uses the Python SDK (sentryagent-idp) syntax

Requirement: Free tier documentation page explains limits and upgrade path

The portal SHALL include a /pricing page documenting free tier limits (10 agents, 1,000 API calls/day), the paid tier capabilities (unlimited agents, higher rate limits, SLA), and a clear call-to-action to upgrade via Stripe Checkout. The page SHALL not require authentication to view.

Scenario: Pricing page is publicly accessible

  • WHEN an unauthenticated user visits /pricing
  • THEN the page renders with free tier limits and upgrade CTA without requiring login

The portal SHALL include an /sdks page listing all four officially supported SDKs (Node.js, Python, Go, Java) with: package name, installation command, a minimal working example, and a link to the SDK repository.

Scenario: SDK page displays all four SDKs

  • WHEN a user visits /sdks
  • THEN all four SDKs are listed with installation commands and code examples