· rreck · ai  · 6 min read

One Profile, One Firehose: rfp.rrecktek.com Finds a Tennessee Nonprofit's Grants

Every weeknight rfp.rrecktek.com pulls the day's federal grant postings into a single Postgres table. This is the story of one organization's path through it — from 122,230 opportunities to the 22 grants actually worth writing.

Every weeknight rfp.rrecktek.com pulls the day's federal grant postings into a single Postgres table. This is the story of one organization's path through it — from 122,230 opportunities to the 22 grants actually worth writing.

Every weeknight at 17:45 UTC a cron job on the production host wakes up, calls the grants.gov Search API, and pages through every federal grant the government is currently advertising. On the most recent run it pulled down 1,847 notices and upserted them — keyed on notice id, so a re-posted opportunity updates in place rather than duplicating — into a single PostgreSQL table that now holds 122,230 rows. That table is the raw material behind rfp.rrecktek.com. This is the story of one organization’s path through it: from 122,230 opportunities to the 22 grants actually worth writing.

The organization is Back2Basics, a small Tennessee nonprofit. Put simply: it helps people recover from addiction and rebuild stable lives — faith-based, community-rooted work with families and young people. Federal money exists for exactly that work; the difficulty was never the supply of grants but finding the few that fit before their deadlines pass. Every figure that follows is read from the running system, snapshot 2026-07-10.

The flow is four moves, and the rest of this post is those four moves in order: mirror the entire federal grant feed into a local database, describe the organization in terms that data understands, score every open grant against that description, and triage what survives into a ranked shortlist.

Workflow: grants.gov nightly ingest into Postgres, through rfp.rrecktek.com profile matching, to a tiered shortlist

Mermaid source for this diagram
flowchart TB
    A[grants.gov Search API<br/>nightly ingest · 17:45 UTC · 1,847 fetched] -->|upsert on notice id| B[(opportunities table · Postgres — 122,230 rows)]
    B --> C[rfp.rrecktek.com · FastAPI + React]
    C --> D[Organization profile · Back2Basics TN · 4 NAICS codes]
    D --> E[Scored SQL matcher · keyword rubric]
    E --> F{2,695 open + forecast · threshold ≥ 6 → 60 qualify}
    F --> G1[Tier 1 — 22 · apply now]
    F --> G2[Tier 2 — 5 · adjacent]
    F --> G3[Tier 3 — 30 · watchlist]
    F --> G4[Excluded — 3 · ineligible]

The firehose

grants.gov is already public and machine-readable; the problem is its shape. The site is built for a human typing keywords into a search box, one query at a time, with no memory of what an organization is or what it looked at yesterday. rfp.rrecktek.com inverts that. Instead of querying grants.gov on demand, it mirrors the whole feed locally — every posted and forecasted opportunity, refreshed nightly — so the questions can be asked in SQL against a table that sits still long enough to be reasoned about. A FastAPI service and a React front end sit on top; underneath, the 122,230-row opportunities table is the thing that matters.

Mirroring the feed also makes gaps visible. Each nightly run writes a structured record of what it fetched, so a night that pulls nothing is an event rather than a silence — the same telemetry surfaced a replication fault the same week this shortlist was built.

Describing an organization in four numbers

Before the table can be filtered, the organization has to be described in terms the data understands. rfp.rrecktek.com represents an organization as a set of NAICS codes — the federal industry classification. Back2Basics is four of them: 813110, religious organizations; 621330, offices of mental-health practitioners; 624190, individual and family services; and 813410, civic and social organizations. Together they draw a fairly precise silhouette of a faith-based nonprofit doing recovery and community work. Selecting them is one click in the front end, and it is the only thing that has to change to point the whole machine at a different organization: the same quick-select already holds profiles for rrecktek LLC, AABAI, and Connect Our Kids sitting beside Back2Basics.

Teaching SQL what a grant is about

Here the tidy plan meets a wrinkle. Contract solicitations carry NAICS codes; grants, mostly, do not. Filtering the grant feed by the organization’s four codes would return almost nothing. So the profile is translated a second time — from industry codes into the language grants actually use — as a scoring rubric that runs as a single SQL query over each opportunity’s title and description:

SignalWherePoints
Addiction / recovery / behavioral-health termstitle+6
Same termsdescription+3
Reentry / youth / mentoring / family-services termstitle+4
Same termsdescription+2
Faith-based / community-organization eligibility languagedescription+2
Funder affinity (SAMHSA, HRSA, ACF, OJP, CDC)agency+2

Weighting the title above the description matters: a grant about recovery says so in its name, while one that merely mentions it in passing scores lower and falls away. Restricted to open or future deadlines and a threshold of six points, the rubric reduces the 2,695 open and forecasted grants to 60 that qualify. By funder, the survivors cluster where the mission does: SAMHSA 25, NIH 19, HRSA 7, ACF 3, and 6 others.

Reading the shortlist

Sixty is a list a person can read, but a score only measures relevance — not whether Back2Basics can actually apply. That is a second, human question, and it splits the 60 cleanly. Twenty-two land in Tier 1: open synopses from SAMHSA, HRSA, and ACF where community nonprofits are eligible applicants and the fit is direct — youth treatment and recovery services, medication-assisted treatment, drug-court capacity, mobile crisis teams, planning grants for Certified Community Behavioral Health Clinics. The highest scorer, at 15 points, is SAMHSA’s Behavioral Health Partnerships for Early Diversion of Adults and Youth, with a deadline of July 15, 2026.

Five more are Tier 2 — eligible but mission-adjacent, like infant mental health or law-enforcement wellness, better approached as a partner than a lead applicant. Thirty are Tier 3, a watchlist: seventeen forecasts with no deadline posted yet, plus NIH research mechanisms a service nonprofit can join only as a community partner site, not as principal investigator. And three the rubric matched but triage removed entirely — tribal set-aside programs, where the subject matter fits perfectly and the organization is simply not an eligible entity. That last group is the argument for keeping triage separate from scoring: relevance and eligibility are different facts, and conflating them puts an organization on a path it cannot finish.

Three weeks in July

The shortlist has a clock on it. Of the 43 opportunities carrying a dated deadline, 27 fall in July 2026. No small nonprofit writes twenty-seven federal proposals in three weeks, so the honest output of the pipeline is not “here are 22 grants” but “here are one or two to write now” — starting with the July 15 SAMHSA target — “and here are seventeen forecasts to prepare boilerplate for before they open.”

The numbers

StageCount
Opportunities in table (grants.gov)122,230
Fetched on most recent nightly run1,847
Open + forecasted grants scored2,695
Qualified (score ≥ 6)60
Tier 1 — apply now22
Tier 2 — adjacent5
Tier 3 — watchlist30
Excluded — ineligible3
Top target score15

One engine, many profiles

None of the machinery above is specific to Back2Basics. The matcher is one SQL file run against the same table the website serves; the only inputs that describe this particular organization are four NAICS codes and a short list of keyword groups. Swap those, and the identical pipeline — nightly ingest, local mirror, scored query, tiered triage — produces a different organization’s shortlist without a line of new code. The profiles for rrecktek LLC, AABAI, and Connect Our Kids already sit beside Back2Basics in the same quick-select, waiting for the same firehose.