SoftwareResearch/g2dm-research
G2DM Product Fitment Research Tool
Automates your G2 Digital Markets category research: pick a category, set the Special Considerations (include/exclude rules), paste your product rows, and get back qualify/reject decisions — each with a written reason and a clickable evidence trail — in the exact column order of your sheet.
The engine is Claude (`claude-opus-4-8`) with live web search + web fetch. It reads only the official vendor website to judge category fit, lifecycle (acquired/discontinued), Standalone-vs-Suite, and USD pricing. The verbatim <title> and <meta description> are extracted deterministically from the page.
Setup (one time)
- Get an Anthropic API key: https://console.anthropic.com → Settings → API Keys.
- In this folder, create your key file:
cp .env.example .env
# then edit .env and paste your key after ANTHROPIC_API_KEY=Run
./run.shIt creates a virtual environment, installs dependencies, and starts the app on a production server (gunicorn) at http://127.0.0.1:5057, opening your browser.
If.envcontainsAPP_PASSWORD, the app asks for a login (usernameteam, that password) even locally — that's the same gate used when hosting. Remove theAPP_PASSWORDline from.envto run locally without a prompt.
To share it with your team for free, see [HOSTING.md](HOSTING.md).
How to use
Research tab
- Category (e.g.
Payment Processing) and Market (default US). - Special Considerations — your include/exclude rules. Click Review these rules to have the AI critique and suggest improvements before you run.
- Products — paste rows from your sheet, one product per line, tab- or comma-separated, in the order Vendor, Product, URL, Prior status:
PayPal PayPal https://www.paypal.com Pre-qualified
Stripe Stripe https://stripe.com Pre-qualified- Run research. Watch live progress; click any row to expand its evidence.
- Export:
- Copy for Sheets — copies the fillable columns (tab-separated, no header) so you can paste straight into your sheet's columns.
- CSV / XLSX — full standalone file with headers and input columns.
Rows flagged ⚠️ are outliers (low confidence, or the signals-based and independent checks disagreed) — review those by hand.
Considerations Reviewer tab
Paste one or many categories to review their rules at once, using Category :: rules, separated by blank lines. You get an assessment, a list of issues, and a clean rewrite you can copy.
Files
app.py— Flask routes + streaming progress + XLSX export + password gate + health checkresearch_engine.py— per-product Claude research + JSON parsing + concurrency + retriesconsiderations.py— Special Considerations reviewerhtml_extract.py— verbatim title/meta extractionprompts.py— the research methodology + reviewer promptsstatic/— the web UIgunicorn.conf.py— shared production server config (local + hosted)run.sh— local production launcher ·serve_public.sh— instant free public linkDockerfile/Procfile— for free hosting (seeHOSTING.md)
Notes
- Runs locally; your key stays on your machine. Structured so it can be hosted for the team later.
- Decisions use vendor sites only; third-party/review sites are excluded, and add-ons / plugins / integration-only products are rejected, per the methodology.
