Skip to content
Chain Defenders

Research · AI Systems

How we built AI into our own back office

We connected prospect discovery, enquiries, invoicing and reporting in one admin, using language models for first drafts and application code for calculations and document generation.

9 November 2026

The job

Chain Defenders is a team of two. Alongside security reviews, we need to find relevant projects, respond to enquiries, prepare invoices and produce reports. We built the back office behind our website to bring those tasks into one admin.

Our October 2026 portfolio entry describes the result: prospects found and scored each morning, quote requests surfaced in Telegram, and invoices, ledgers and reports generated from saved records. AI contributes to specific writing tasks within that workflow.

Where AI fits

For outreach, a language model receives selected public facts about a prospect and relevant public work from our portfolio. It produces a first-message draft that we can edit before sending. This gives the draft a concrete reason for contacting that team and an example of our work to support it.

For audit reports, the model helps draft the protocol summary from repository descriptions, names and documentation comments. The team reviews that prose alongside the report. The summary-writing step receives extracted descriptive material rather than the full contract implementation.

The research workflow follows a similar pattern: a finding provides the source material for a draft, which can be reviewed and edited before publication. Writing assistance is useful here, but technical claims and code excerpts still need checking against the original finding.

How the system works

The website and admin use Next.js, with Postgres holding the operational records. Groq provides language-model drafting. GitHub Actions runs document-generation workflows, LaTeX produces report PDFs, and Telegram brings relevant updates to the team.

Each part has a defined job. Saved records supply the facts. Application code validates inputs and calculates invoice amounts. Document templates turn those records into consistent outputs. The model helps turn selected facts into readable prose.

For outreach, the drafting flow can fall back to a plain template if a model does not answer. Report summaries can also be prepared from extracted repository facts. Keeping those paths available lets us continue the work when model access is unavailable.

What changed

Sales, invoicing and reporting now run from the same admin. We can follow a prospect through to a project and generate its documents from the records already collected, instead of assembling each invoice or report by hand.

Human work remains in the decisions: checking relevance, reviewing language, assessing findings and deciding what is ready to send or publish. The practical benefit is a connected workflow with less repeated copying and document assembly.

This is our own operational build, and the first AI project listed in our public portfolio. The outcome we can show is the working system and the tasks it brings together.

What we learned

The most useful starting point was a repetitive job with known inputs and a clear output. Giving each model call a small writing task made its result easier to inspect. Keeping calculations and document structure in ordinary code made those outputs reproducible.

For a small team, that combination is useful: automate repeated steps, draft from source material, and make review part of the workflow.

Running AI in production? We find where it costs too much, and fix it safely.

Ask for a free review