How synapsecodeonline/ofertacoradar works
Ofertaço Radar aggregates affiliate products, coupons and offers into a searchable Brazilian shopping catalog. The main visitor journey is browsing and filtering the catalog, opening a product, then following an affiliate redirect that records a click. Separately, scheduled source synchronization imports and validates offers before storing them for the catalog. The map also preserves the documented admin, analytics, SEO/feed and Instagram-kit capabilities. Some routes and scheduled-job implementations were not sampled; those branches are included only where the README documents them.
Main entry points: db.ts Product and event store · syncer.ts Source synchronization · HomeExperience.tsx Catalog experience · route.ts Affiliate redirect
Components 31
Catalog experience
- Catalog page
src/app/page.tsx - Catalog experience
src/components/HomeExperience.tsx - Search and filters
src/components/SearchBar.tsx - Category taxonomy
src/lib/categories.ts - Product card
src/components/ProductCard.tsx - UI icons
src/components/Icons.tsx - Hash navigation
src/components/HashLink.tsx
Product and conversion
- Product detail
src/app/produto/[id]/page.tsx - Affiliate redirect
src/app/ir/[id]/route.ts - Tracked-link shortener
src/lib/shortener.ts - Product and event store
src/lib/db.ts
Offer ingestion
- Source synchronization
src/lib/syncer.ts - Amazon source
src/lib/amazon.ts - Awin source
src/lib/awin.ts - Mercado Livre source
src/lib/mercadolivre.ts - Lomadee feed
src/lib/feed.ts
Admin and analytics
- Admin dashboard
src/app/admin/page.tsx - Admin endpoints
src/app/api/admin/sync/route.ts - Admin authorization
src/lib/admin.ts - Pageview tracking
src/app/api/pv/route.ts - Click tracking
src/app/ir/[id]/route.ts
Distribution and SEO
- Instagram content kit
src/app/api/instagram/kit/route.ts - Social card image
src/app/api/card/[id]/route.tsx - Google Shopping feed
src/app/feed/google.xml/route.ts - Sitemap index
src/app/sitemap.xml/route.ts - Page sitemap
src/app/sitemaps/pages/route.ts
Other components
- Shopper
- Google Merchant Center
- Affiliate merchants
- Scheduled triggers
- Supabase Auth
Connections 34
- Shopper → Catalog page: browses
- Catalog page → Catalog experience: renders
src/components/HomeExperience.tsx - Catalog experience → Product and event store: queries catalog
src/components/HomeExperience.tsx - Catalog experience → Search and filters: renders
src/components/HomeExperience.tsx - Catalog experience → Product card: renders
src/components/HomeExperience.tsx - Catalog experience → Category taxonomy: filters by category
src/components/HomeExperience.tsx - Search and filters → Hash navigation: scrolls after navigation
src/components/SearchBar.tsx - Product card → UI icons: renders
src/components/ProductCard.tsx - Shopper → Product detail: opens product
- Product detail → Product and event store: loads product
- Product detail → Affiliate redirect: links to offer
- Shopper → Affiliate redirect: follows offer link
- Affiliate redirect → Product and event store: reads product and records click
src/app/ir/[id]/route.ts - Affiliate redirect → Tracked-link shortener: requests tracked URL
src/app/ir/[id]/route.ts - Affiliate redirect → Affiliate merchants: redirects to merchant
- Scheduled triggers → Source synchronization: triggers sync
- Source synchronization → Amazon source: runs Amazon sync
src/lib/syncer.ts - Source synchronization → Awin source: runs Awin sync
src/lib/syncer.ts - Source synchronization → Mercado Livre source: runs Mercado Livre sync
src/lib/syncer.ts - Source synchronization → Lomadee feed: fetches Lomadee data
src/lib/syncer.ts - Source synchronization → Product and event store: updates catalog
src/lib/syncer.ts - Admin dashboard → Supabase Auth: requires login
- Admin dashboard → Admin endpoints: initiates sync
- Admin endpoints → Admin authorization: checks access
- Admin endpoints → Source synchronization: starts sync
- Pageview tracking → Product and event store: records pageview
src/app/api/pv/route.ts - Click tracking → Product and event store: records click
src/app/ir/[id]/route.ts - Instagram content kit → Product and event store: selects products
- Instagram content kit → Social card image: provides card URL
- Social card image → Product and event store: loads product
src/app/api/card/[id]/route.tsx - Google Shopping feed → Product and event store: reads active products
src/app/feed/google.xml/route.ts - Google Shopping feed → Google Merchant Center: publishes feed
- Sitemap index → Product and event store: counts active products
src/app/sitemap.xml/route.ts - Sitemap index → Page sitemap: lists page sitemap