How meimberg-io/io.meimberg.recipes works
Purpose and Runtime
This is a Next.js 15 App Router application that presents a Notion-backed recipe collection as a restaurant-style menu. It runs as a React 18/TypeScript server-rendered application with client-side interactive components, styled through global CSS/Tailwind. Container deployment is supported by Dockerfile, docker-compose.yml, and docker-compose.prod.yml.
Application Entry and Route Structure
The root shell and landing page are src/app/layout.tsx and src/app/page.tsx. Recipe discovery is organized around category and recipe-detail routes:
• src/app/[category]/page.tsx renders category-specific menu views.
• src/app/recipes/[slug]/page.tsx renders an individual recipe.
• src/app/robots.ts provides crawler directives.
• src/app/api/sitemap.xml/route.ts generates the sitemap endpoint.
Notion Data Boundary
Notion is the authoritative external content system. The integration layer isolates Notion API access and translates Notion records into application recipe types:
• src/lib/notion.ts
• src/lib/notion-recipe.ts
• src/types/recipe.ts
Page routes and API handlers should consume this normalized recipe model rather than directly coupling UI code to Notion response shapes. Credentials are supplied via environment variables, modeled by env.example.
Recipe Query and Delivery APIs
The app exposes server-side endpoints for recipe consumers and operational integration:
• src/app/api/recipes/route.ts lists recipes.
• src/app/api/recipes/[id]/route.ts retrieves a recipe by identifier.
• src/app/api/revalidate/route.ts supports cache/content invalidation.
• src/app/api/test-notion/route.ts validates Notion connectivity.
These handlers form the primary server boundary between browser/UI consumers and Notion-backed data retrieval.
Presentation Pipeline
Recipe data flows from route-level server components into reusable menu components:
• src/components/RecipeGrid.tsx
• src/components/RecipeCard.tsx
• src/components/RecipeModal.tsx
• src/components/NotionContent.tsx
NotionContent.tsx and RichText.tsx render structured rich content; recipe cards/grids provide collection navigation; the modal supports focused recipe presentation. Client variants such as src/components/RecipeGridClient.tsx and src/components/CategoryTabsClient.tsx own browser-side interaction boundaries.
Navigation, Taxonomy, and Shared Layout
Recipe classification and navigation are centralized rather than embedded in pages:
• src/config/categories.ts
• src/config/navigation.ts
• src/components/CategoryTabs.tsx
• src/components/Header.tsx
• src/components/Footer.tsx
Category routes use this taxonomy to select/filter content consistently. Header/footer and tabs provide the shared menu shell across routes.
External Media, Analytics, and Operations
Remote image delivery is mediated by src/app/api/image-proxy/route.ts, creating a controlled boundary for externally hosted recipe imagery. Analytics are client-side through src/components/util/MatomoTracker.tsx; Matomo is an external service dependency when configured. Deployment automation is defined in .github/workflows/deploy.yml, with operational guidance in docs/DEPLOYMENT.md.
Main entry points: notion.ts Notion gateway · recipe.ts Recipe model · RecipeGrid.tsx Recipe menu components · page.tsx Category page
Components 20
App Routes
Next.js App Router entry points and server endpoints.
- Root shell
src/app/layout.tsx - Menu discovery pages · Landing and category menu views.
src/app/page.tsx - Recipe detail page
src/app/recipes/[slug]/page.tsx - Category page
src/app/[category]/page.tsx - Recipe APIs · List and identifier-based recipe delivery.
src/app/api/recipes/route.ts - Operational APIs · Revalidation and Notion connectivity endpoints.
src/app/api/revalidate/route.ts - Crawler metadata · Robots directives and generated sitemap.
src/app/robots.ts - Image proxy · Controlled delivery of remote recipe images.
src/app/api/image-proxy/route.ts
Recipe Data
Normalized Notion content access boundary.
- Notion gateway · Fetches Notion content and maps API records.
src/lib/notion.ts - Recipe mapper · Translates Notion records into recipe models.
src/lib/notion-recipe.ts - Recipe model
src/types/recipe.ts
Menu UI
Shared server and client presentation components.
- Taxonomy and navigation · Central category classification and menu navigation.
src/config/categories.ts - Recipe menu components · Grid, cards, modal, and rich Notion content rendering.
src/components/RecipeGrid.tsx - Interactive menu UI · Browser-side grid and category tab interactions.
src/components/RecipeGridClient.tsx - Shared menu chrome · Header, footer, and category navigation tabs.
src/components/Header.tsx - Matomo tracker
src/components/util/MatomoTracker.tsx
External Services
- Notion · Authoritative recipe content system.
- Matomo
- Remote image hosts
- Container deployment · Docker deployment with CI automation.
Dockerfile
Connections 21
- Root shell → Shared menu chrome: renders
- Root shell → Matomo tracker: loads
- Menu discovery pages → Recipe menu components: renders
- Category page → Taxonomy and navigation: selects category from
- Category page → Recipe menu components: renders
- Recipe detail page → Recipe menu components: renders detail with
- Shared menu chrome → Taxonomy and navigation: uses
- Recipe menu components → Interactive menu UI: delegates interactions to
- Menu discovery pages → Recipe model: consumes
- Category page → Recipe model: consumes
- Recipe detail page → Recipe model: consumes
- Recipe APIs → Recipe model: returns
- Recipe APIs → Notion gateway: queries
- Operational APIs → Notion gateway: validates and revalidates
- Crawler metadata → Notion gateway: derives recipe URLs from
- Notion gateway → Notion: calls API
- Notion gateway → Recipe mapper: maps records through
- Recipe mapper → Recipe model: produces
- Image proxy → Remote image hosts: fetches
- Matomo tracker → Matomo: sends events to
- Container deployment → Root shell: runs application