Interactive nutrition and meal-budget calculators are often over-engineered with backend APIs, database queries, and heavy state-management libraries. When building a fast-food menu planner, though, menu items, portion sizes, prices, and macronutrient counts rarely change minute-to-minute—making a static-first Astro architecture ideal.
1. Build-Time Data via Static JSON
Instead of fetching menu items at runtime, all catalog entries live in a typed calculator-items.json asset bundled during the Astro build. Each record stores a compact slug , display name, available sizes , unit price, calories, protein, and allergens. Serving this as static JSON keeps Time to First Byte near zero and eliminates database latency.
2. Selective Client-Side Hydration
Astro renders the page shell, SEO metadata, and initial category layout as pure HTML/CSS with zero JavaScript overhead.…