Examples: Directus + Next.js Scenarios
Complete walkthroughs for building common application types with this stack. Each scenario shows the full flow from the Directus data model to rendered Next.js pages, using the rules of directus-to-nextjs (tagged reads, no token in asset URLs) and the pipeline of deployment.
Available Scenarios
| Scenario | Description | Key Patterns |
|---|---|---|
| Blog | Content blog with posts, authors, and categories | M2O and M2M relations, images, tagged reads, SEO metadata, RSS feed |
| Product Catalog | E-commerce catalog with products, categories, and filtering | Decimal fields, search params, typed filters, image gallery, uncached search |
How to Use
- Pick the scenario closest to what you are building
- Read the full walkthrough in
references/scenarios/ - Adapt the collections, fields, and page structure to your needs
- Follow the
full-featuretemplate for each new feature you add
Each scenario includes:
- Directus collection schema (fields, relations, permissions)
- TypeScript interfaces (or a pointer to the shared ones in
directus-dev) - Next.js page code (listing, detail, metadata)
- Image handling patterns
- The revalidation strategy: which tags, which collections the Flow lists