{"slug": "chat-with-client-in-invoice-out", "title": "Chat with client In -> Invoice Out", "summary": "A developer built Chat2Invoice, an open-source tool that converts pasted client chat conversations into ready-to-send invoice PDFs using Google's Gemma 3 model running locally through Ollama. The app extracts invoice fields from the chat, flags anything it cannot find for human review, and generates an A4 PDF, with an optional email-sending step via Resend; all processing stays on the user's machine so sensitive client conversations never reach a cloud API.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle](https://dev.to/challenges/hacktoberfest-week2-2026-10-12)*\n\nEvery freelancer knows this moment.\n\nThe client says *\"Great work, can you send the invoice?\"* and suddenly you're digging through 200 WhatsApp messages to find the rate, the hours, the email address, and that one message where the price changed from $250 to $300.\n\nThen you open a template, retype everything, export a PDF, and email it. Ten minutes gone, for something that's already written down in the chat.\n\n**Chat2Invoice** fixes that. You paste the conversation, and a local AI turns it into a ready-to-send invoice PDF.\n\n**Who would pay for this?** Anyone who gets paid directly, outside platforms that auto-generate invoices: freelance designers, developers, writers, consultants, and small agencies who negotiate in DMs and then have to turn those DMs into paperwork.\n\nThe best part is that the chat never has to leave your machine.\n\n**Step 1: Paste the chat**\n\n**Step 2: Review what the AI found**\n\nThe AI shows what it extracted and highlights anything it couldn't find. Here it caught one field was not found in chat.\n\n**Step 3: Preview, download, send**\n\n## Struggling to learn Git?\n\nLearn Git by solving problems on [GitMission.com](https://www.gitmission.com/)\n\nPaste a client chat → local AI (Ollama) extracts invoice details → review/edit → generate an A4 PDF → download or email it.\n\n```\n# 1. Install Ollama, then pull the model (one time, ~3 GB)\nollama pull gemma3:latest\n\n# 2. Install dependencies\ncd chat2invoice\nnpm install\n\n# 3. Environment\ncp .env.example .env.local     # edit if needed\n```\n\n`.env.local`:\n\n```\nOLLAMA_AI_MODEL=gemma3:latest\nOLLAMA_HOST=http://127.0.0.1:11434\n# Optional – the \"Send Invoice via Email\" section only appears when BOTH are set:\nRESEND_API_KEY=re_xxx\nRESEND_SENDER_EMAIL=invoices@your-verified-domain.com\n```\n\n(Shell environment variables work too.) RESEND_SENDER_EMAIL must…\n\n**The open-source AI part:** [Gemma 3](https://ai.google.dev/gemma) running locally through [Ollama](https://ollama.com). No API key, no per-request bill, no server in the middle. The app talks to Ollama on `127.0.0.1:11434`, and that's where the \"understanding\" happens.\n\n**The stack:**\n\n**The flow:**\n\n`INV-2026-OCT-13-JD2N`) and issue date are auto-generated, and \"Due Now\" defaults to amount minus discount.\nI intentionally put a human checkpoint in the middle. The AI proposes, and *you* approve. A small local model will occasionally misread a message, and an invoice is a document with money on it, so the review step is a feature rather than a limitation. Missing details get flagged and asked for instead of invented.\n\n**Running it yourself** takes a minute. Pull a model with Ollama, then create `.env.local`:\n\n```\nOLLAMA_AI_MODEL=gemma3:latest\nOLLAMA_HOST=http://127.0.0.1:11434\n\n# Optional: the \"Send Invoice via Email\" section only appears when BOTH are set\nRESEND_API_KEY=re_xxx\nRESEND_SENDER_EMAIL=invoices@your-verified-domain.com\n```\n\n`RESEND_SENDER_EMAIL` must be on a domain verified in your Resend account. Skip these two lines and the app simply hides the email section, so everything else works fully offline.\n\nClient chats are some of the most sensitive text a freelancer owns. They contain real names, email addresses, rates, project details, and sometimes things covered by an NDA. Pasting that into a closed cloud API just to get a PDF is a bad trade.\n\nOpen-weight models changed the deal:\n\n`OLLAMA_AI_MODEL`). If a better open model shows up next month, swapping it in is a one-line change, with no pricing changes or deprecations to worry about.\nA closed API could do the extraction, but it couldn't make the promise that matters most to the person using this tool: *your client's conversation never left your laptop.*\n\nMy friend who is in final year in college and he is super busy trying to manage study and freelance work at the same time. So this will save him a few hours monthly.", "url": "https://wpnews.pro/news/chat-with-client-in-invoice-out", "canonical_source": "https://dev.to/0shuvo0/chat-with-client-in-invoice-out-4odg", "published_at": "2026-10-15 06:30:00+00:00", "updated_at": "2026-10-15 06:43:59.074523+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "generative-ai", "ai-products", "developer-tools"], "entities": ["Chat2Invoice", "Ollama", "Gemma 3", "Google", "Resend", "Hacktoberfest"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/chat-with-client-in-invoice-out", "markdown": "https://wpnews.pro/news/chat-with-client-in-invoice-out.md", "text": "https://wpnews.pro/news/chat-with-client-in-invoice-out.txt", "jsonld": "https://wpnews.pro/news/chat-with-client-in-invoice-out.jsonld"}}