Inspiration

Sales and partnerships teams spend hours researching a company before every single outreach. They read the website, search for recent news, look up the product, and try to figure out how to position an integration. Then they write a pitch deck from scratch, format it, revise it, and send it. That process repeats for every company they target.

We wanted to automate the entire thing. Not just the writing, but the research, the charts, and the final professional PDF, all in one pipeline that takes a URL as input and returns a ready-to-send document.

What it does

PitchWeaver takes a target company website and your product details, then generates a professional partner pitch deck PDF in under 60 seconds.

It researches the target company in real time using You.com APIs, generates tailored pitch content with Gemini, creates four data visualizations (market growth, integration impact, competitive positioning, and rollout timeline), and produces two documents using the Foxit APIs: an external pitch deck and a password-protected internal strategy PDF.

The external deck includes an executive summary, integration scenarios, ROI bullets, and all four charts. The internal document includes risks, ideal contact roles, conversation starters, and next steps for your team.

How we built it

The frontend is React with TypeScript, Vite, and Tailwind CSS. The backend is FastAPI with a pipeline architecture where each stage runs in sequence and streams progress updates to the UI via Server-Sent Events.

You.com's Contents API extracts clean text from the target company's website. The Unified Search API runs three targeted queries for broader context. The News API pulls recent articles to make the pitch timely.

Gemini Flash takes the full research bundle and returns structured JSON with all pitch content and chart data. Plotly generates high-resolution PNG chart images which get injected into DOCX templates using python-docx. The Foxit Document Generation API converts those templates into PDFs. The Foxit PDF Services API applies password protection to the internal document.

Figma Make was used to prototype the full user flow before any code was written, and Kilo Code was used as the coding assistant throughout the build.

Challenges we ran into

Injecting chart images into DOCX templates before sending them to the Foxit Document Generation API required a specific approach. The images needed to be pre-embedded using python-docx with field names in alt-text as placeholders, rather than relying on Foxit to handle image injection directly. Getting that pipeline to work reliably took significant debugging.

Streaming progress updates from a multi-step async backend to the frontend with SSE also required careful handling, especially making sure each step's status was emitted correctly without blocking the pipeline or dropping events.

Keeping Gemini's output consistent enough to be used as structured data for both the document templates and chart generation required tight prompt engineering with explicit JSON schemas.

Accomplishments that we're proud of

The full pipeline works end-to-end in a single API call with live streaming updates. You paste a URL, click generate, and watch each step complete in real time before downloading two polished PDFs.

The internal and external document split is something we are genuinely proud of. It mirrors a real sales workflow where the deck you send externally and the notes your team uses internally are different documents with different audiences. Password-protecting the internal PDF using Foxit PDF Services makes that split actually secure, not just a cosmetic separation.

The quality of the pitch output also exceeded expectations. Because it is grounded in real-time research from You.com rather than hallucinated details, the integration scenarios and executive summaries feel specific and credible.

What we learned

Real-time web research is a much stronger foundation for document generation than relying on an LLM's training data. You.com's Contents API returns clean, structured text from any website, which made the research stage reliable and fast. The News API is what makes the pitch feel current rather than generic.

Streaming UX matters more than we expected. Showing live step progress during a 30 to 60 second pipeline makes the wait feel active and keeps the user engaged. A loading spinner alone would have felt slow.

Prompt design for structured JSON output requires the same rigor as API design. The output schema has to be strict enough that downstream services (templates, chart generators, formatters) never break on unexpected data shapes.

What's next for PitchWeaver

The most obvious next step is CRM integration so teams can generate pitches directly from existing accounts in HubSpot or Salesforce without entering details manually.

Beyond that, saved template libraries would let teams maintain consistent brand voice and structure across every pitch without rebuilding it each time. Multi-company batch generation would let a team queue up 20 target companies and wake up to 20 ready pitch decks.

Longer term, PitchWeaver could track which pitch versions perform best and feed that signal back into the generation process so the output improves over time based on real outcomes.

Built With

Share this project:

Updates