Back to catalogue
Project
Magazine Archive
Integrated Sanity CMS into a team Next.js newsroom: 9 schema types, an embedded Studio, a 489-line seed script, and magazine pages with an inline PDF viewer.
How it’s builtHow it’s built
Magazine Archive · Sanity CMS integration and magazine archive for a Next.js newsroom
On a team newsroom site (4 of 45 commits mine), I integrated Sanity CMS: 9 schema types including articles, events, magazines and four page singletons, an embedded Studio, a 489-line seed script, and magazine listing and detail pages with an inline PDF viewer and download. I also added an event registration modal.
- commits authored by me
- 4 of 45
- Sanity schema types he added
- 9
- lines added (excluding lockfiles)
- ~4,400
- line Sanity seed script
- 489
Technology and what it does here
- Next.js (App Router)
- Magazines listing and [slug] detail routes with notFound handling
- Sanity
- Schemas, desk structure, GROQ queries and embedded Studio at /cms
- TypeScript
- Typed Sanity documents in src/sanity/types.ts
- MongoDB
- Registrations, subscribers and messages via src/lib/mongodb.ts (added in his Sanity commit)
- Tailwind CSS
- Styling for MagazinesClient and MagazineShowcase components
Implementation details
- Magazine detail page renders the PDF inline in an iframe and offers a download link built from the Sanity file URL.
- Commit 285926b extended the revalidation route so magazine edits refresh cached pages.
Technologies
- Next.js
- Sanity
- Publishing
