ignitionstack.pro v1.0 is out! Read the announcement →
Skip to Content

Recommendations Hub

The /[locale]/recommendations route showcases curated tools/books/courses with affiliate disclosures. This page explains the data flow, components, and analytics so the feature stays consistent.

Page Overview

LayerFileResponsibility
Routesrc/app/[locale]/(pages)/recommendations/page.tsxSets locale, SEO metadata, tracks Mixpanel page_view, loads categories/products via fetchRecommendationsData() and fetchRecommendationsByCategory().
Disclaimercomponents/recommendations/affiliate-disclaimer.tsxRenders disclosure + CTA.
Category Sectioncomponents/recommendations/category-section.tsxDisplays icon, description, and a grid of ProductCards.
Product Cardcomponents/recommendations/product-card.tsxShows title, description, features, price, CTA buttons (demo/buy).
Data Fetcherssrc/app/lib/data-fetchers.tsReads public/data/recommendations.json (generated by scripts/convert-data-to-json.ts).

Data Model

src/app/types/recommendation.ts defines Recommendation objects:

Categories live alongside data (categories: CategoryData[]) specifying icon names (mapped in category-section.tsx) and translation keys (Recommendations.categories.{id}.title).

Data Generation

Run:

npm run data:convert

This invokes scripts/convert-data-to-json.ts, writing public/data/recommendations.json (categories + recommendation entries). During SSR, data-fetchers.ts reads the JSON via fs; in the browser it fetches /data/recommendations.json.

Styling & Layout

Translations

All copy is translated via src/i18n/messages/{locale}.json under the Recommendations.* namespace:

Whenever you add a category:

  1. Update recommendations.json data (category + products).
  2. Add translation entries for the new category.
  3. Provide an icon (iconMap in category-section.tsx).

Analytics & SEO

Extending the Feature

Testing

Keep this page updated when new recommendation categories launch or when the underlying data pipeline changes (e.g., moving from static JSON to Supabase tables).