AxioStats: Versioned Data & Serverless Static API
Real data infrastructure: Git-versioned snapshots, server-rendered SVG charts, a static JSON API with CORS and Stripe-gated access.
The Source of Truth, Versioned
AxioStats is a data infrastructure that treats information as code: every dataset lives as a versioned JSON snapshot inside the repository, refreshed by a real download pipeline (scripts/refresh-data.mjs) that queries sources such as FRED, the npm registry or Wikimedia. Nothing is hand-crafted: when a number changes, the change is recorded, auditable and reviewable in Git like any other line of code.
The data model is strict: a dataset = domain × engine. The system distinguishes five domains (macroeconomics, markets, developer ecosystem, artificial intelligence and media) and maintains reference datasets such as interest rates, inflation, npm/PyPI frameworks, LLM leaderboards or API latency.
Server-First Rendering with SolidJS Islands
Built on Astro 7, content is delivered as static HTML with zero blocking JavaScript; interactivity hydrates only where it exists:
- CommandPalette (SolidJS): global search with
Ctrl+K, categorized and with shortcuts. - DatasetTools: export of each dataset to CSV, JSON and PNG, a
curlsnippet of the API and an embed code. - ChartCompare: a dual indexer (”+ Compare”) that loads two series and aligns their axes.
- Poll (SolidJS): local persistence, dark/light theme and a mobile menu closing on
Escape.
Every island ships colocated tests executed with Vitest + @solidjs/testing-library under jsdom.
Charts Without Libraries
Dataset charts are drawn as server-generated SVG (DatasetChart.astro) with not a single charting dependency on the client: the HTML arrives with the curve already drawn, costing 0 KB of JavaScript to render data.
Static API with CORS
Each dataset exposes a read-only static API at /api/datasets/<id>.json with CORS headers, generated at build time. Serializers (CSV, JSON, tables) and the executive summary derived from real data are covered by unit tests.
SEO and Distribution
Every dataset generates its own 1200×630 OpenGraph card (public/og/) in EN and ES, the sitemap emits real <lastmod> values derived from versioned content (never the build time), and the base includes hreflang, JSON-LD, an RSS blog and an RFC 9116 security.txt.
Monetization and Access (Edge Billing)
Premium data access is enforced at the edge: Cloudflare Functions expose checkout.ts and stripe-webhook.ts against Stripe, while keys.ts manages API keys verified against Supabase (authentication) and the Drizzle schema. The free plan is a deliberate product decision; the paid tier unlocks Pro access without breaking the public data model.
Millimetric Internationalization
EN is the default language and ES is an exact route mirror (/ and /es/...) fed by typed dictionaries with mirrored keys, so no string ever desynchronizes between languages.
AxioStats is not a decorative dashboard: it is a data pipeline where every observation has provenance, every chart weighs zero on the client, and every access is controllable.