High-level architecture
Astro + React: island architecture
Astro uses an island architecture: the page is mostly static HTML, and React components are selectively hydrated where interactivity is needed. You add theclient:load directive to a component to tell Astro to ship its JavaScript to the browser and hydrate it immediately on page load.
- Initial HTML is fast — Astro sends pre-rendered markup before any JavaScript runs.
- Only interactive components ship JS — static sections have zero client-side overhead.
- Each island is independent — components fetch their own data and manage their own state.
All data fetching happens inside React components on the client, not in Astro server code. Astro only provides the page shell and layout.
Routes
| Route | File | Components rendered |
|---|---|---|
/ | src/pages/index.astro | InflationCalculator, CurrencyConverter |
/inflacion | src/pages/inflacion.astro | InflationGraph, InflationChart |
/dolar | src/pages/dolar.astro | DollarPrices, DollarHistoryChart |
.astro file that imports and mounts its React components with client:load.
External data dependencies
ArgentinaDatos
https://api.argentinadatos.com — provides historical inflation indices (CPI) and historical dollar exchange rate data (cotizaciones).DolarAPI
https://dolarapi.com — provides live dollar prices (compra/venta) for all exchange rate types: oficial, blue, MEP, CCL, crypto, tarjeta, and mayorista.fetch().
Header and navigation
TheHeader.astro component is shared across all pages via the layout and persists across client-side navigations (using Astro’s transition:persist). It contains:
- Navigation links — Inicio (
/), Dólar (/dolar), and Inflación (/inflacion), with the current route highlighted. - Live dollar ticker — a scrolling marquee bar below the nav that shows real-time buy/sell prices for every dollar type. The ticker fetches live data from
https://dolarapi.com/v1/dolaresserver-side at render time (inside the.astrofrontmatter), meaning the prices are baked into the SSR HTML on each request.
The ticker data is fetched server-side in the Astro component, unlike the React component data which is fetched client-side. This means the ticker reflects prices at the time Vercel rendered the page, not continuously updated in the browser.
Deployment
Argentista deploys to Vercel using the@astrojs/vercel SSR adapter. Vercel runs the Astro server function, handles routing, and serves static assets from its CDN.
Vercel Analytics and Speed Insights are enabled, injecting lightweight tracking scripts into every page.