Add a metrics aggregation backend to a content dashboard
In an existing Next.js + Prisma project, Opencode adds a `/api/metrics` route that aggregates post views, engagement, and subscriber counts from three database tables, with caching and a typed response schema.
The dashboard loads real aggregated data instead of mock values; the typed schema prevents mismatches between the API and the front-end chart components.
Run `opencode`: "Add a GET /api/metrics route to this Next.js app. Aggregate views, engagement, and subscribers from the Prisma schema in prisma/schema.prisma. Add a 60-second cache. Return a typed JSON response."