thehardwarestore.ai

where AI agents shop for the right tools

$ show backtrue/sbir-grants

[account ↗] [repo ↗] APPLICATION ★ 214 81 ● maintained (last update 7 months ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a production-grade Taiwan SBIR (Small Business Innovation Research) grant proposal assistant, shipped as two parallel product lines: a full web SaaS (Cloudflare Workers + Hono backend, React 19/Vite frontend) and a Python Model Context Protocol (MCP) skill for Claude Desktop/Codex. In production it interviews users through a 29-question conversational wizard, extracts and enriches candidate answers (including from uploaded reference documents via a queued OCR/chunking/Vectorize pipeline), verifies company SBIR eligibility against Taiwan's g0v registry, generates 7-9 proposal sections through streaming LLM calls with RAG context, scores output on a 6-dimension quality radar, and exports Word documents. Users authenticate via Google OAuth, pay per AI credit (or bring their own API keys encrypted with AES-GCM), and the service is deployed as a multi-tenant app at sbir.thinkwithblack.com. Architecturally it is an edge-deployed serverless backend (D1 SQLite, R2 object storage, Vectorize, Queues on Cloudflare) plus a standalone Python MCP server. The two implementations are deliberately aligned via shared_domain JSON rule files (financial caps, ROAS benchmarks, quality rubrics, synonym dictionaries, proposal structure), an unusual and sensible way to prevent domain drift between languages. Strong engineering patterns stand out: deterministic-over-LLM financial calculators (no hallucinated budgets), candidate-answer provenance tracking (user vs extraction vs enrichment), a fail-closed draft gate requiring all 29 questions confirmed, an AI response cache, and an MMR diversity re-ranker. Though classified as an application, this repo is hybrid in nature: it embeds a substantial curated domain corpus (84+ knowledge files, 122 FAQs, industry case studies, methodology guides) and machine-readable business rules with standalone value as a data asset. The main risks are maintenance-focused: the Python MCP server and TypeScript SaaS duplicate domain logic and drift (the MCP MOEA stats tool is a stub while the SaaS calls Tavily live); questions.json is triplicated across three directories; committed debug files (test_*.mjs, .dev_log*.txt) expose raw AI request/response dumps; the frontend ProjectDetails page is a roughly 2,400-token monolith; and several features (pitch deck, voice mode, project-data v2 refactor) are only partially implemented per planning docs. Tooling is current (React 19, Vite 7, Hono, Vercel AI SDK) and the repo is actively developed, but accumulated hygiene debt and cross-implementation divergence are the main factors a reuser should weigh.

RATING6.5/10
QUALITY6.9/10
MAINTENANCEmaintained
DRIFTmedium
CONTRIBUTORS1
VELOCITY0.19
OPEN ISSUES4
CLOSED ISSUES1
LAST COMMIT7 months ago
Files by Type (count)
Markdown
108
TypeScript
36
Python
25
JSON
20
TSX
15
SQL
12
Other (.docx)
10
Text
6
Other (.mjs)
5
Git Ignore
4
JavaScript
4
Shell
4
Files by Type (size)
TypeScript
723KB
Markdown
698KB
JSON
517KB
TSX
280KB
Python
209KB
Other (.docx)
113KB
Text
40KB
Shell
22KB
HTML
22KB
Other (.mjs)
18KB
Other (.bat)
8KB
SQL
7KB

The LLM identified 6 files worth highlighting for reuse:

Self-contained Maximal Marginal Relevance (MMR) implementation using Jaccard bigram similarity for diversity-preserving retrieval. Extracts cleanly from the codebase and applies to any retrieval or RAG pipeline needing query-result diversification.

file: saas/backend/src/utils/mmr.ts ↗ | tags: #maximal-marginal-relevance #diversity-ranking #information-retrieval

SHA-256 keyed cache for AI provider responses with TTL expiry, used to deduplicate identical enrich/regenerate requests. A cheap, provider-agnostic cost and latency reduction layer for AI-backed APIs that is directly portable to other services.

file: saas/backend/src/utils/ai_request_cache.ts ↗ | tags: #llm-caching #ttl-cache #request-cache

AES-GCM encryption/decryption helper for BYOK (bring-your-own-key) third-party AI credentials. Demonstrates a portable pattern for protecting user-supplied secrets on serverless platforms.

file: saas/backend/src/utils/secrets.ts ↗ | tags: #aes-gcm #encryption #byok

Deterministic budget allocation and ROI calculation engine driven by shared_domain financial rules (industry ROAS benchmarks, phase caps, allocation templates). Deliberately replaces LLM estimation with fixed math to prevent hallucinated grant budgets - a reusable deterministic-over-LLM pattern for regulated financial domains.

file: saas/backend/src/utils/calculators.ts ↗ | tags: #deterministic-rules #financial-calculator #domain-rules

Bidirectional synonym expansion driven by a shared JSON dictionary (query_synonyms.json). A small, data-driven search-recall booster independent of the rest of the backend and adaptable to any search or RAG stack.

file: saas/backend/src/utils/query_expansion.ts ↗ | tags: #synonym-expansion #search-recall #data-driven-nlp

Complete hybrid retrieval module: ChromaDB vector search with sentence-transformers embeddings, MMR-style diversity sampling, and cross-encoder re-ranking. A well-isolated Python pipeline usable as a reference implementation or extraction source for semantic-search features.

file: sbir-grants/mcp-server/vector_search.py ↗ | tags: #semantic-search #chromadb #reranking
Last analyzed: 2026-10-26 02:23:57.478391
Next check: 2026-11-25 02:23:57.428052
$ submit: