How redward42/datadiet works
Data Diet is a recipe-nutrition dashboard. Users browse a Spoonacular recipe list, preview nutrition visualizations, and open a recipe’s unique detail URL for ingredients and instructions. The dashboard and detail page independently request recipe data; both reuse the sidebar and chart components. The README documents the main user features, while the sampled page code shows the API requests, rendering, and navigation. No separate backend or persistent store is shown.
Main entry points: Dashboard.tsx Recipe dashboard · DetailView.tsx Recipe detail · routes.tsx Page routes · Sidebar.tsx Navigation sidebar
Components 9
App and routing
- App entry
src/App.tsx - Page routes
src/routes.tsx
Recipe experience
- Recipe dashboard
src/pages/Dashboard.tsx - Recipe detail
src/pages/DetailView.tsx - Navigation sidebar
src/components/Sidebar.tsx
Nutrition visualizations
- Daily recommendation chart
src/components/Barchart.tsx - Macro distribution chart
src/components/Piechart.tsx
Other components
- User
- Spoonacular API
Connections 16
- App entry → Page routes: renders
src/App.tsx - Page routes → Recipe dashboard: routes to
src/routes.tsx - Page routes → Recipe detail: routes to
src/routes.tsx - User → Recipe dashboard: browses
README.md - Recipe dashboard → Spoonacular API: fetches recipes
src/pages/Dashboard.tsx - Spoonacular API → Recipe dashboard: returns recipes
src/pages/Dashboard.tsx - Recipe dashboard → Page routes: links to detail
src/pages/Dashboard.tsx - Recipe dashboard → Navigation sidebar: renders
src/pages/Dashboard.tsx - Recipe dashboard → Daily recommendation chart: renders
src/pages/Dashboard.tsx - Recipe dashboard → Macro distribution chart: renders
src/pages/Dashboard.tsx - User → Recipe detail: views recipe
README.md - Recipe detail → Spoonacular API: fetches details
src/pages/DetailView.tsx - Spoonacular API → Recipe detail: returns recipe
src/pages/DetailView.tsx - Recipe detail → Navigation sidebar: renders
src/pages/DetailView.tsx - Recipe detail → Daily recommendation chart: renders
src/pages/DetailView.tsx - Recipe detail → Macro distribution chart: renders
src/pages/DetailView.tsx