Releases: abdullah85/metallictrends
Releases · abdullah85/metallictrends
Release list
v0.3.0 — Package restructure, backfill reliability fix, and landing page polish
Package restructured into a src/ layout, a recurring metals.dev backfill crash tracked down and
fixed, structured observability added for backfill and GitHub sync attempts, and the landing page's
brand mark and B2B section reworked.
Added
- Landing page favicon (
web/assets/favicon.svg/.png) and a matching header wordmark — a single
inline SVG reading "MT MetallicTrends" in a gold gradient, avoiding raster-scaling artifacts. - "Chart" link in the footer nav, alongside Pricing and Webmasters.
GET /auto-backfills stale metal prices on each load viamaybe_backfill(), instead of relying
solely on a manual CLI run, throttled to at most 1 attempt per day spaced across the day.error_detailcolumn onbackfill_attemptsand a newgithub_sync_logtable recording the outcome
of every DB-to-GitHub sync, so failures are diagnosable from the DB itself instead of only server logs.sync/github.py(formerlydb_sync.py) pushes the SQLite DB to GitHub after writes and restores it
on startup — a persistence workaround for Render's free-tier disk, which is otherwise wiped on every
redeploy.metallictrends-backfill/metallictrends-backupconsole-script entry points.
Changed
- Restructured the project into a
src/metallictrends/package layout (ingestion/,sync/,api/),
replacing the flat top-level modules. needs_backfilltolerates a 1-day gap between the latest stored date and today, and
backfill_recent's catch-up window now ends on yesterday rather than today — metals.dev may not have
published the latest day's data yet.push_db_to_githuband homepage backfill attempts are both capped at 1 attempt per day; corrected the
defaultGITHUB_BRANCH.- Reworded B2C/Pricing landing-page copy to match the chart's actual current features instead of
unbuilt ones. - Broadened the B2B section from a "jewellery store" framing to "webmasters" running any site relevant
to gold/silver/other metal rates (jewellery, bullion, finance/investment) — renamed the nav/footer
link, plan card, and section heading accordingly.
Fixed
_require_same_originfalls back to checking theRefererheader's origin whenSec-Fetch-Siteis
absent, fixing legitimate same-origin requests that were incorrectly rejected with a 403.fetch_timeseriesraises a clearMetalsApiErroron a null/emptyratespayload from metals.dev,
instead of crashing downstream with a bareAttributeError— previously hit on every homepage load
whose catch-up window included today.
v0.2.0 — Interactive chart & server-rendered landing page
Landing page rebuilt around a single interactive, multi-range price chart and served directly
from FastAPI with server-rendered live data, replacing the earlier React portfolio-tracker
prototype.
Added
web/index.html— self-contained landing page built around a single interactive price chart:
metal selector (gold/silver/platinum/palladium), preset and custom date ranges, a USD/₹ unit
toggle, permanent x/y axis labels with gridlines, and a speech-bubble-style hover readout showing
the price and date for any point on the line.api.py—/api/metals,/api/prices/{metal},/api/fx/{currency}, and/api/widget/{metal}
HTTP endpoints serving data from the SQLite store.GET /api/prices/{metal}acceptsstart/enddate-range params (uncapped) alongside the capped
dayswindow, powering the landing page's full-history range picker (1W through ALL).GET /api/fx/{currency}— daily FX rate history (uncappedstart/end), so the site can convert
the full price history to INR using each day's actual rate instead of one approximated rate.GET /is now a proper FastAPI route (Jinja2,api.py's_latest_meta) instead of a static file:
the hero ingot's price, batch date, "last update" date, and the trust-strip's day count are
computed straight from the database at request time, so the page never carries a placeholder
value for them.web/assets/style.css,web/assets/script.js,web/assets/hero-preview.png— the page's CSS,
JS, and hero screenshot, previously inlined intoindex.html(including as base64 data URIs for
fonts and the hero image), extracted into their own linked files. Cutindex.htmlfrom ~210KB to
~44KB.render.yamlfor deploying the API to Render.
Changed
- Locked
/api/metals,/api/prices, and/api/fxto same-origin requests. - INR prices now use the real daily USD→INR rate for each date, instead of a single rate derived
from the latest day and applied across the whole history. index.htmlnow declares a proper<!DOCTYPE html>/<html>/<head>/<body>document structure
with a charset and viewport meta tag, instead of a bare fragment with neither — the missing
viewport tag meant mobile browsers were rendering the page at desktop width and scaling it down.
Removed
frontend/— the React + Vite portfolio tracking tool (buy/sell logging, CSV import/export against
spot price) and its built outputweb/portfolio/, along with the inline modal used to open it from
the landing page and theGET /api/prices/{metal}/on/{on_date}endpoint that only existed to
support it. Simplifies the product surface for the current go-to-market plan.
Fixed
- Added
UNIQUEconstraints on schema tables and reusedinit_dbin tests to prevent duplicate rows.
v0.1.0 — Initial Release
MetallicTrends v0.1.0 — Initial Release
The first release of MetallicTrends: a resumable data ingestion pipeline for
daily precious metals prices (gold, silver, platinum, palladium) from the
metals.dev API, stored in a local SQLite database.
Highlights
- metals.dev API client — fetches daily timeseries price data, automatically
respecting the API's 30-day-per-request window limit (#1, #7) - SQLite database layer — stores metal prices and FX rates, with per-window
checkpoint tracking (#3, #6) - Resumable backfill orchestrator — splits any date range into 30-day chunks
and resumes from the last successful window after an interruption, without
re-fetching data (#2, #8) - Backup & export utility — timestamped SQLite backups and CSV export of
price records for portability (#4) - Test suite — unit tests for the client, database layer, and backfill
orchestrator using mocked HTTP responses, so no API quota is consumed (#6, #7, #8) - Docs — setup instructions, usage examples, and sample query output in the README
What's included
client.py— metals.dev API clientdb.py— SQLite persistence layerrun.py— backfill orchestrator / CLI entrypointbackup.py— database backup and CSV export CLIqueries/— example SQL queriestests/— unit test suite
Full Changelog: https://github.com/abdullah85/metallictrends/commits/v0.1.0