U5 · Secondary
Reachant
B2B lead-list builder for Brazil and the US. It finds businesses on Google Places by industry and city, then enriches each lead with website, contacts and decision-maker. Includes an API and an MCP server for AI agents.
Engineering decisions
- Tenant isolation derived from the logged-in user: every read goes through `scoped(Model)`, which raises if no account is set. A route missing its guard fails loudly instead of leaking another account's data.
- Two enrichment pipelines, picked per search by market. Brazil: Firecrawl for website and CNPJ (company tax ID), then BrasilAPI for legal name and partners. US: Perplexity and Serper for decision-makers. Leads are enriched in parallel with a configurable concurrency cap.
- Credits are debited with a conditional `UPDATE`, so concurrent workers can't overspend. With no balance left, the paid step is skipped and the lead keeps its basic data. Each debit logs the vendor cost to a ledger.
- Idempotent Stripe webhook: the signature is verified and every `event_id` is stored, so a replayed event or a race between workers is a no-op.
- Searches run off the request in a thread pool, and all scraping goes through a `safe_get` that blocks private IPs and re-checks every redirect (SSRF protection).
- Two-step v1 API for agents: a free estimate returns a signed token, and search creation is idempotent on that token. An MCP package exposes it to clients like Claude.
Results
- 9 tools in the MCP server.
- 558 pytest test functions across 82 files, plus 17 in the MCP package.
- 4,036 business categories for the US and 3,872 for Brazil.
- UI in Portuguese and English.
Stack
PythonFlaskPostgreSQLGoogle Places APIFirecrawlBrasilAPIPerplexityStripeMCPDocker
What it shows
Shows I can build a SaaS that spends money on third-party APIs without losing control of cost, with billing, tenant isolation and access for AI agents.
More projects
U6
NutriAppPractice software for dietitians: patient records, meal plans, lab results and scheduling, with each practitioner's data isolated at the database level. AI reads lab reports, with mandatory review, and drafts a consult-support report.
liveU7DockPlus AI Client WebsitesFast, search-friendly, on-brand websites for small businesses in Brazil and the US, built with a repeatable process I wrote as a Claude Code skill that goes from the client's Instagram and Google Business Profile to deploy.
liveU8AgentLab — agent architecture labA study lab where I test agent architectures. Users build agents with their own Anthropic or OpenAI key and can switch on a mode that runs a 5-node LangGraph graph, showing each step live and sending traces to Langfuse.
open source