Skip to content

ChatGPT's honest critique #180

@rajat1saxena

Description

@rajat1saxena

Medialit API — Developer Experience (DX) Action Plan

1. Fix API Design (Highest Priority)

  • Convert read endpoints to proper REST:
    • POST /media/getGET /media
    • POST /media/get/{id}GET /media/{id}
  • Use HTTP semantics correctly:
    • GET = fetch
    • POST = create
    • DELETE = delete
  • Standardize naming:
    • Avoid /get, /create in paths
  • Add consistent query params:
    • sort, order, filter

Why: REST consistency improves predictability and usability for developers :contentReference[oaicite:0]{index=0}


2. Improve Documentation (Biggest DX Lever)

  • Add request/response examples for every endpoint

  • Add real-world usage guides:

    • “Upload from browser”
    • “Upload from backend”
  • Document all fields clearly:

    • constraints, defaults, edge cases
  • Add error handling guide

  • Provide:

    • Postman collection
    • cURL examples
    • SDK snippets (JS, Python)

Why: Good documentation is the #1 driver of developer adoption and onboarding speed :contentReference[oaicite:1]{index=1}


3. Provide Interactive Developer Tools

  • Host Swagger UI publicly

  • Add “Try it out” functionality

  • Enable API playground with real keys (sandbox)

  • Generate SDKs:

    • TypeScript
    • Python
    • Go

Why: OpenAPI enables auto-generated SDKs and interactive testing, reducing integration friction :contentReference[oaicite:2]{index=2}


4. Improve Authentication Experience

  • Add clear auth guide:

    • API key vs signature usage
  • Provide helper SDK for signature generation

  • Add short-lived tokens for client uploads

  • Add examples:

    • secure frontend upload flow
  • Add rate limiting + headers:

    • X-RateLimit-*

5. Add Missing Core Features (Critical for Adoption)

A. Pagination & Filtering

  • Add:
    • cursor-based pagination
    • sorting
    • advanced filters

B. Webhooks (Huge DX win)

  • media.uploaded
  • media.deleted
  • media.processed

C. Async jobs (future-proof)

  • Upload → processing → status endpoint

6. Improve Media Capabilities (Product-Level DX)

  • Add transformation API:
    • resize, crop, format
  • Add URL-based transformations:
    • /media/{id}?w=300&format=webp
  • Add signed delivery URLs
  • Add CDN integration layer

7. Developer Onboarding Experience

  • Create a “Quick Start” (must be <5 min)

    • Get API key
    • Upload file
    • Fetch file
  • Provide:

    • Copy-paste examples
    • Minimal config setup
  • Add “Hello World” app:

    • Next.js / Node starter

Why: Developer experience is the sum of all interactions developers have with your API, not just endpoints :contentReference[oaicite:3]{index=3}


8. Reliability & Trust Signals

  • Add /status page
  • Define SLAs
  • Add structured error codes
  • Log request IDs (x-request-id)

9. OpenAPI Best Practices (Leverage Your Spec)

  • Keep OpenAPI as single source of truth
  • Version your API (/v1)
  • Validate spec in CI/CD
  • Ensure schema consistency

Why: OpenAPI enables automation, testing, and consistency across tools :contentReference[oaicite:4]{index=4}


10. Treat API as a Product

  • Define clear use cases:
    • “Serverless uploads”
    • “Media storage backend”
  • Add pricing / limits (if SaaS)
  • Collect developer feedback
  • Iterate based on usage

Why: APIs succeed when treated as products, not just technical interfaces :contentReference[oaicite:5]{index=5}


Priority Roadmap (Execution Order)

Phase 1 (Immediate)

  • Fix REST design
  • Add docs + examples
  • Publish Swagger UI

Phase 2 (Short-term)

  • SDKs
  • Pagination + filtering
  • Auth improvements

Phase 3 (Mid-term)

  • Webhooks
  • Transformations
  • CDN delivery

Phase 4 (Long-term)

  • Async processing
  • Advanced media pipeline

Bottom Line

To become developer-focused, this API needs to shift from:

“Functional endpoints”

to:

“A complete developer product (docs + tools + workflows)”

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions