How redward42/data-diet-app works
Data Diet is a React app for searching Spoonacular recipes and viewing nutrition information. The user submits a food query and can toggle ingredient exclusions; the app fetches a recipe and displays its nutrient summary and macro chart. The README describes broader dashboard filtering, but the sampled App implementation instead handles a single recipe and ingredient exclusions. The chart implementation and app/API interactions are visible in the excerpts; the API itself is external.
Main entry points: App.tsx Search and recipe details · BarChart.tsx Macro bar chart · main.tsx React entry point
Components 6
Recipe app
- React entry point
src/main.tsx - Search and recipe details
src/App.tsx
Nutrition visualization
- Macro bar chart
src/components/BarChart.tsx
External services
- Spoonacular API
- Recharts
Other components
- User
Connections 6
- User → Search and recipe details: searches and filters
src/App.tsx - React entry point → Search and recipe details: mounts
src/main.tsx - Search and recipe details → Spoonacular API: fetches recipes
src/App.tsx - Spoonacular API → Search and recipe details: returns results
src/App.tsx - Search and recipe details → Macro bar chart: passes macro values
src/App.tsx - Macro bar chart → Recharts: renders with
src/components/BarChart.tsx