Mar 13, 2025 · learning
YC Directory
A startup directory platform with GitHub auth, Sanity-backed content modeling, searchable listings, markdown pitch submissions, and in-app Studio authoring.
- Next.js
- TypeScript
- NextAuth
- SanityCMS
- Zod
- Tailwind CSS
- Sentry
> details
I built this solo to combine CMS-driven content workflows with modern App Router patterns, server actions, and typed query contracts.
Highlights
- Implemented NextAuth GitHub login with Sanity author provisioning on first sign-in.
- Added JWT/session callback enrichment so authenticated session state includes linked Sanity author ID.
- Built searchable startup listing page with GROQ queries filtered by title/category/author.
- Implemented startup submission flow using server actions, slug generation, and Sanity write client persistence.
- Added Zod async validation that verifies submitted image URLs resolve to image content types.
- Built startup detail pages with markdown pitch rendering and editor picks integration from Sanity playlists.
- Implemented view tracking using post-response
after()patch updates to increment startup view counters. - Added user profile pages that aggregate startups authored by a given creator.
- Embedded Sanity Studio at
/studio/[[...tool]]with custom structure for authors, startups, and playlists.
Overview
YC Directory is a content-driven startup listing platform where discovery and submissions are managed through a Sanity-backed editorial workflow.
The project combines app-side UX with a structured CMS model and authoring environment.
Auth And Author Identity
GitHub login is handled by NextAuth. During sign-in, the app ensures a matching author document exists in Sanity and stores that author reference in the session token.
This creates a direct bridge between user auth and CMS ownership.
Listing And Search Experience
The home page loads startups via GROQ and supports query-based filtering across startup title, category, and author metadata.
This keeps discovery fast while still relying on CMS-native content structures.
Submission Workflow
Startup submission is handled through a server action that validates fields, slugifies title, checks image URL content type, and persists the document to Sanity.
Pitch content is authored in markdown and rendered on detail pages.
Editorial Layer
The app includes editor picks through a playlist model and embeds Sanity Studio directly inside the Next.js route tree.
Custom studio structure keeps author/startup/playlist management clean for content operators.
Engagement Signals
Startup detail pages display and increment view counts through a write patch executed after response handling.
Why This Project Matters
YC Directory demonstrates a complete content-product stack: auth-driven author identity, CMS-backed data modeling, typed fetch/write workflows, and in-app editorial tooling.