BastionGov
Federal contract data from SAM.gov and USAspending in plain English, with the source and pull time on every number.
- Status
- Live in production since August 2026, with live Stripe billing.
- Stack
- Python, FastAPI, Next.js 15, Postgres 16, Redis 7, Caddy, Docker, Stripe, Sentry
- Tests
- 3,069 passing (1 skipped)
- Links
- bastiongov.com
The problem
Federal spending data is public, but it is spread across SAM.gov and USAspending in formats built for government systems, not for small businesses.
Products in this space often go further and sell forecasts. That creates legal risk: a number presented as fact can become a warranty, and a stale figure credited to a federal source misstates what the government published. BastionGov shows the records themselves and nothing it can't source.
What I built
A retrieval-only backend
A FastAPI backend written from scratch to fetch and display records. It computes no scores, rankings, or forecasts. The line is drawn in the architecture, not patched on with a filter.
A source on every field
Every value on screen names the federal system it came from and when it was pulled.
Scheduled imports
SAM.gov contract awards, SAM.gov entity registrations, and USAspending, pulled on a schedule and stored as one row per award.
Live billing
Stripe subscriptions with checkout, webhook handling, prorated upgrades, downgrades at period end, and refunds within a set window.
Language checks on every commit and response
More than 40 pre-commit hooks scan public copy for risky wording, and a response check runs on every API response the same way. Both normalize look-alike characters first.
Operations I run myself
A self-managed server: Caddy with automatic TLS, four API workers, Postgres and Redis in Docker, migrations on startup, daily backups kept 30 days, and Sentry for errors.
How it fits together
Shaded steps protect accuracy. Caddy handles TLS in front, Redis handles sessions and rate limits, and Stripe handles billing.
Results so far
- Live
at bastiongov.com since August 2026.
- 3,069
automated tests passing on the latest full run.
- 333
total small-business set-aside awards, filtered from 3,575 award notices for the homepage feed, each labeled with its set-aside type.
- 76
industry pages (NAICS codes) published in the sitemap.
Not built yet
- Shareable record pages for individual companies are designed, not built.