import { sql } from "@/db"; import { CollectionsEditor } from "@/components/admin/collections-editor"; export default async function Collections() { const cols = await sql`SELECT c.slug, c.title, c.description, c.published, (SELECT coalesce(jsonb_agg(jsonb_build_object('tool', t.slug, 'blurb', ci.blurb) ORDER BY ci.position), '[]') FROM collection_items ci JOIN tools t ON t.id=ci.tool_id WHERE ci.collection_id=c.id) AS items FROM collections c ORDER BY c.sort_order, c.title`; return

Collections

Curated guides. Items are tool slugs with an optional blurb explaining why the tool is in the stack.

; }